[PKG-Openstack-devel] systemd support for OpenStack

gustavo panizzo <gfa> gfa at zumbi.com.ar
Mon Jul 14 17:55:26 UTC 2014


On 07/14/2014 01:46 PM, stanzgy wrote:
> Hi zigo, I agreed with Gustavo to use the EnvironmentFile to deal with
> the logging facility.
> But after some failed tries I found it seems impossible to use
> EnvironmentFile to handle this.
> The syntax EnvironmentFile using[1] is incompatible with bash(especially
> when dealing with
> quotes and spaces),

newer versions of systemd support shell like quoting in EnvironmentFile,
204-14 does it. i just checked with ssh service file


 and seems have no control statements like if or
> while. So the following

:(

> code couldn't be done with systemd service file AFAIK.
> 
> [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
> [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file
> /var/log/nova/$NAME.log"

> 
> IMHO a workaround is to always enable logfile and offer some options in
> /etc/default
> to decide whether to enable syslog.
Agreed

i think we could

1) add a postinst script to parse, and modify, /etc/default/openstack
and /etc/default/nova.
logging options will end in $DAEMON_ARGS which we could consume from
service and init.d files

2) launch the service from a shell wrapper :(


both approaches will suit me, i need them because
https://github.com/saltstack/salt/issues/11900

i do prefer the postinst path


-- 
1AE0 322E B8F7 4717 BDEA BF1D 44BB 1BA7 9F6C 6333



More information about the Openstack-devel mailing list