[PKG-Openstack-devel] Bug#770706: Bug#770706: Bug#770706: Bug#770706: Bug#770706: keystone.service does not start, /var/run/keystone not created

Thomas Goirand thomas at goirand.fr
Sun Dec 14 07:38:41 UTC 2014


On 12/05/2014 03:04 AM, Gaudenz Steinlin wrote:
> OK I tested keystone on unstable now and this works as it should. It's
> definitely an improvement over the current unit file which does not work
> at all. I did not go down the route to do a full openstack installation
> but I also installed nova and the service units there work too. I did
> not go all the way to have a working setup, but the problems I have seem
> to be unrelated to the systemd unit files.
> 
> One thing I noticed is that all services are disabled by default even
> though they were configured through debconf and should be ready to use.
> Is this intentional as an off by default behavior or is this a bug. How
> is this handled with sysvinit?
> 
> Gaudenz

Hi,

I have found out what happened. Indeed, this issue is that we're not
calling dh_systemd_enable. Or rather, openstack-pkg-tools is generating
the *.service files in the override_dh_installinit target, which happens
after the dh_systemd_enable in the standard dh sequence. So I wrote this:

   # Generate the systemd unit file
   # Note: because dh_systemd_enable is called by the
   # dh sequencer *before* dh_installinit, we have
   # to process it manually.
   for i in `ls debian/*.init.in` ; do \
      pkgos-gen-systemd-unit $$i ; \
      MYSERVICE=`echo $$i | sed 's/debian\///'` ; \
      MYSERVICE=`echo $$MYSERVICE | sed 's/.init.in/.service/'` ; \
      dh_systemd_enable $$MYSERVICE ; \
   done

in the override_dh_installinit. This works, then, except for keystone
where there's no #DEBHELPER# in the postinst (because I wanted to keep
the control of when invoke-rc.d is called, ie after the daemon starts,
the admin tenant is created, and the keystone endpoint is registered).
This means that for Keystone, we need to manually add what
dh_systemd_enable does. Then I've been asking myself what would happen
in Wheezy, and it's looking like the only thing that will happen is that
it's going to add a dependency on init-system-helpers, which IMO is
quite fine, because it's already available from the official
wheezy-backports.

Since the release team already expressed their opinion that fixing
systemd issues the way I proposed was fine, I hope to make it happen
before Jessie is released, with what's currently in the Git for
openstack-pkg-tools (version 20). I would welcome some reviews.

Thoughts anyone?

Thomas Goirand (zigo)



More information about the Openstack-devel mailing list