
On Thu, Sep 29, 2016 at 11:33:04 +0300, Nikolay Shirokovskiy wrote:
Hi, all.
In virtuozzo mgmt we do not use libvirt-guests service. First because we need do extra steps on domain start and second we want to decice whether to suspend or to shutdown a domain on per domain basis. Starting is not the problem but system shutdown is. As domain in systemd based systems is just another unit we need to set ordering dependency so that domain will not be killed before mgmt service as ba79e387 do for libvirt-guest service. So let's remove this hardcode. I see 2 options.
I don't see hard dependency anywhere in libvirtd.service, it just says Before=libvirt-guests.service
1. Take dependant service name from config. 2. Introduce intermediate service that will specify real dependency. Looks like this one is more flexible.
Do you just need to stick another service between libvirtd and libvirt-guests? If so, it should be fairly easy to do with just two additional lines in the new services: foo.service [Unit] Before=libvirt-guests.service After=libvirtd.service In case you want to get rid of libvirt-guests completely, just disable it and you can even avoid the Before=libvirt-guests.service line in your new service, although keeping it there won't hurt. Jirka