Re: RFC: Post-install behavior of libvirt(-client)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 14, 2012 at 03:17:40PM -0700, Eric Blake wrote:
> On 02/14/2012 01:37 AM, Martin Kletzander wrote:
> > Hello everyone,
> > 
> > I have a small bug #786770 [1] assigned and I discussed this with few
> > people from our team but I'm still not sure what should be the proper
> > fix for this bug.
> 
> > Thinking about this a little more, I see two more "unconsistencies"
> > let's say:
> >  - we are starting libvirt-guests if it is enabled (rpm post script
> > should not start services)
> 
> Ultimately, I see two possible useful behaviors:
> 
> 1. We install but don't start services.  Since both libvirtd and
> libvirt-guests have a Default-Start: 3 4 5 (for init script) or
> [Install]WantedBy=multi-user.target (for systemd), then the user will
> get both services running after their next reboot (by virtue of their
> defaults), but not beforehand.
> 
> If the user wants to start the services before rebooting, then they
> should start both services - if the user starts libvirtd but not
> libvirt-guests, it is their own fault for not realizing that
> libvirt-guests was useful.
> 
> 2. We install services, and if it is the initial install, we also
> default those services to start immediately.  And, since libvirt-client
> can be installed without libvirtd, we make sure that the libvirt-guests
> init script has sane default behavior when it cannot connect to a
> running libvirtd.
> 
> Where is it written that rpms may not start services?  Finding a
> concrete policy on the matter should influence our answer...

It is a basic Fedora requirement that you may *not* start any
services during %post scripts. The reason for this is that the
RPMs need to be installable in virutal chroot directories for
the purposes of building RPMs.

The only permissable things are

 - Mark the service to be started by default
 - Issue a conditional restart - ie, if we detect the service
   already running, it is permissable to restart it.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]