← Back to team overview

openstack team mailing list archive

devstack and api-paste.ini

 

Hi all,

There have been some recent changes to the devstack script w.r.t. nova/api-paste.ini that puzzle me. There's the template api-paste.ini with various tokens that need to be substituted, and some of them are commented out.

E.g.

# admin_user = %SERVICE_USER%
# admin_password = %SERVICE_PASSWORD%

Fair enough, but then stack.sh runs a sed script and effectively removes those comments.

E.g. (from stash.sh)

The lines marked with "<<<<<" find the token (which may be commented out) and then replace the entire line.

sed -e "
/^admin_token/i admin_tenant_name = $SERVICE_TENANT_NAME
/admin_tenant_name/s/^.*$/admin_tenant_name = $SERVICE_TENANT_NAME/;
/admin_user/s/^.*$/admin_user = nova/; <<<<<
/admin_password/s/^.*$/admin_password = $SERVICE_PASSWORD/; <<<<<
s,%SERVICE_TENANT_NAME%,$SERVICE_TENANT_NAME,g;
s,%SERVICE_TOKEN%,$SERVICE_TOKEN,g;
" -i $NOVA_CONF_DIR/api-paste.ini

Is it just me, or would it would be much less confusing if the config template was closer to the final result without the need for magic sed incantations to remove commented out settings? Is that template config used elsewhere where it might need those comments to remain in place? (If so, I haven't been able to find 'em.)

Thanks!

Ken

Follow ups