Re: [libvirt] [PATCH] Start daemon only after filesystems are mounted
On Tue, Aug 25, 2015 at 05:12:20PM +0200, Martin Kletzander wrote: When images are on mounted filesystems, there is no guarantee libvirtd will start before they are mounted. In systemd world, this is done with 'After=systemd.mount' in the service file. Signed-off-by: Martin Kletzander mklet...@redhat.com --- daemon/libvirtd.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in index 1759ac8a0946..c461f9462ae5 100644 --- a/daemon/libvirtd.service.in +++ b/daemon/libvirtd.service.in @@ -5,6 +5,7 @@ After=network.target After=dbus.service After=iscsid.service After=apparmor.service +After=systemd.mount What is this systemd.mount unit you're referring to ? AFAIK there is no such unit - systemd.mount is a man page describing the format of *.mount units. Do you instead mean to use local-fs.target which blocks until all local filesystems are mounted ? Regards, 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@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Start daemon only after filesystems are mounted
On Wed, Aug 26, 2015 at 11:41:54AM +0100, Daniel P. Berrange wrote: On Tue, Aug 25, 2015 at 05:12:20PM +0200, Martin Kletzander wrote: When images are on mounted filesystems, there is no guarantee libvirtd will start before they are mounted. In systemd world, this is done with 'After=systemd.mount' in the service file. Signed-off-by: Martin Kletzander mklet...@redhat.com --- daemon/libvirtd.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in index 1759ac8a0946..c461f9462ae5 100644 --- a/daemon/libvirtd.service.in +++ b/daemon/libvirtd.service.in @@ -5,6 +5,7 @@ After=network.target After=dbus.service After=iscsid.service After=apparmor.service +After=systemd.mount What is this systemd.mount unit you're referring to ? AFAIK there is no such unit - systemd.mount is a man page describing the format of *.mount units. Do you instead mean to use local-fs.target which blocks until all local filesystems are mounted ? I want this to apply to remote filesystems as well. I thought systemd.mount covers all activated .mount units, but it wouldn't cover neither local-fs nor remote-fs targets. So looking at systemd.special(7) man-page (oh, why is this more complicated then it must be), I think I must use both After=local-fs.target and After=remote-fs.target as well. Feel free to correct me as I admit I know nothing, to be polite, about systemd, so I'm reading wrong man pages all the time. Regards, 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 :| signature.asc Description: PGP signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Start daemon only after filesystems are mounted
On Wed, Aug 26, 2015 at 02:13:54PM +0200, Martin Kletzander wrote: On Wed, Aug 26, 2015 at 11:41:54AM +0100, Daniel P. Berrange wrote: On Tue, Aug 25, 2015 at 05:12:20PM +0200, Martin Kletzander wrote: When images are on mounted filesystems, there is no guarantee libvirtd will start before they are mounted. In systemd world, this is done with 'After=systemd.mount' in the service file. Signed-off-by: Martin Kletzander mklet...@redhat.com --- daemon/libvirtd.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in index 1759ac8a0946..c461f9462ae5 100644 --- a/daemon/libvirtd.service.in +++ b/daemon/libvirtd.service.in @@ -5,6 +5,7 @@ After=network.target After=dbus.service After=iscsid.service After=apparmor.service +After=systemd.mount What is this systemd.mount unit you're referring to ? AFAIK there is no such unit - systemd.mount is a man page describing the format of *.mount units. Do you instead mean to use local-fs.target which blocks until all local filesystems are mounted ? I want this to apply to remote filesystems as well. I thought systemd.mount covers all activated .mount units, but it wouldn't cover neither local-fs nor remote-fs targets. So looking at systemd.special(7) man-page (oh, why is this more complicated then it must be), I think I must use both After=local-fs.target and After=remote-fs.target as well. Yes, after both remote-fs.target local-fs.target sounds reasonable. Regards, 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@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
[libvirt] [PATCH] Start daemon only after filesystems are mounted
When images are on mounted filesystems, there is no guarantee libvirtd will start before they are mounted. In systemd world, this is done with 'After=systemd.mount' in the service file. Signed-off-by: Martin Kletzander mklet...@redhat.com --- daemon/libvirtd.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/libvirtd.service.in b/daemon/libvirtd.service.in index 1759ac8a0946..c461f9462ae5 100644 --- a/daemon/libvirtd.service.in +++ b/daemon/libvirtd.service.in @@ -5,6 +5,7 @@ After=network.target After=dbus.service After=iscsid.service After=apparmor.service +After=systemd.mount Documentation=man:libvirtd(8) Documentation=http://libvirt.org -- 2.5.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list