[Pkg-xen-devel] Bug#681343: xcp-xapi: wait_for_xapi() function in init.d script does not work

Ian Campbell ijc at hellion.org.uk
Thu Jul 12 18:40:53 UTC 2012


On Thu, 2012-07-12 at 12:10 -0600, Thomas Goirand wrote:
> On Thu Jul 12 2012 11:38:58 AM CST, Bastian Blank <waldi at debian.org> wrote:
> 
> > On Thu, Jul 12, 2012 at 05:35:08PM +0400, George Shuklin wrote:
> > > +                             # Check whether the md5 of the create-templates binary
> > > matches the one +                             # used previously. If not, recreate
> > > the templates. +                             if [ -e
> > > /usr/lib/xcp/lib/create_templates ]; then +                                             if !
> > > md5sum -c --status $TEMPLATES_MD5_STAMP ; then
> > > /usr/lib/xcp/lib/regenerate-templates start +                                                 
> > >           md5sum /usr/lib/xcp/lib/create_templates > $TEMPLATES_MD5_STAMP
> > 
> > Whas is this and why is it in the init script instead of the postinst
> > script?
> > 
> > Bastian
> 
> hi,
> 
> this creates the templates so that later you can
> use:
> xe template-list name-label=Debian\ Squeeze [...]
> then use this template UUID when doing:
> xe vm-create
> 
> if this isn't done, then xe template-list is empty.
> 
> When you install xcp-xapi with apt-get, xapi is not
> running, so it can't be done in the postinst. We
> have to wait until the administrator configures
> TOOLSTACK=xapi and reboots. Which is why doing it in
> the init script makes sense.

It may (or may not) also make sense to do this in the postinst iff xapi
is actually running? This way users will immediately get new templates
on upgrade without requiring manual steps or a reboot.

Ian.




More information about the Pkg-xen-devel mailing list