[PKG-Openstack-devel] systemd support for OpenStack

stanzgy stan.zgy at gmail.com
Mon Jul 14 16:46:11 UTC 2014


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), 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.

_[1]: http://www.freedesktop.org/software/systemd/man/systemd.exec.html


On Mon, Jul 14, 2014 at 6:42 PM, stanzgy <stan.zgy at gmail.com> wrote:

> On Mon, Jul 14, 2014 at 5:20 PM, Thomas Goirand <zigo at debian.org> wrote:
>
>> On 07/14/2014 12:23 PM, stanzgy wrote:
>> > BTW, I'm not very experienced at debian packaging. Could you waste a few
>> > minutes reviewing my commit that adding dh-systemd support for glance
>> > debian/juno branch to check if I has done it correctly?
>> > Thanks very much.
>>
>> Oh, and by the way, we shouldn't need PIDFile=/var/run/glance-api.pid.
>> systemd is smart enough to not need that (it uses cgroups...).
>>
>
> Got it.
>
>>
>> Before doing anything more in other packages, shall we try to agree to
>> have everything correct in both Glance and Keystone?
>>
>> Agreed.
>
> Thomas
>>
>>
>> _______________________________________________
>> Openstack-devel mailing list
>> Openstack-devel at lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/openstack-devel
>>
>
>
>
> --
> Best Regards,
>
> Gengyuan Zhang
> NetEase Inc.
>



-- 
Best Regards,

Gengyuan Zhang
NetEase Inc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/openstack-devel/attachments/20140715/27b028b2/attachment.html>


More information about the Openstack-devel mailing list