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

Gaudenz Steinlin gaudenz at debian.org
Mon Dec 15 08:44:14 UTC 2014


Thomas Goirand <thomas at goirand.fr> writes:

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

I don't see a reason why this should not work, but I wonder why you
don't just add an override_dh_systemd_enable target wich first uses
pkgos to generate the service files and then just calls
dh_systemd_enable. This seems like the more obvious solution to me.

Having this in a separate target would probably also make it possible to
build packages without systemd by just not build depending on
dh-systemd.

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

I don't understand the problem you are trying to solve here. Why are you
not just adding the #DEBHELPER# at the end of the postinst where you
want it to be? I don't see how the debhelper inserted snippets don't
give you control over where they are called. But maybe I'm missing
something.

Gaudenz



More information about the Openstack-devel mailing list