Bug 1590544 - RFE: split autostart code
Summary: RFE: split autostart code
Keywords:
Status: NEW
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-12 20:09 UTC by Yuri Arabadji
Modified: 2018-07-18 16:05 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Yuri Arabadji 2018-06-12 20:09:09 UTC
We're doing some nasty things with storage (blkdevs mangling, DM, caching, etc) and would like the libvirtd availability and domain auto-starting be split into separate entities, so that we could hook into the middle.

Currently, on libvirtd startup, domains marked as such are autostarted. Which means there's no way for us to either:
1) start libvirtd.service; do our work that involves using libvirt routines; start "autostarted" domains
2) do our work involving communication with libvirtd daemon (e.g. virsh domblklist) before it's started; proceed with libvirtd startup (which would start autostart'ed domains)

We can't use hooks in 1) (otherwise I wouldn't log this RFE) because https://www.libvirt.org/hooks.html#recursive AND because (probably?) hook would be invoked after domains are autostart'ed.

Ideas are welcome.

Thanks.

Comment 1 Daniel Berrangé 2018-06-13 09:19:10 UTC
Honestly if you have such complex ordering requirements wrt autostart, the best approach is to not use libvirt's autostart feature at all. Create your own system unit file that depends on libvirtd.service, and have this do startup of storage and guests in whatever manner you need.

Comment 2 Yuri Arabadji 2018-06-13 13:32:14 UTC
Thanks, Daniel, that's one of the direction we're heading to. 

But still, this enhancement would be a good addition to https://bugzilla.redhat.com/show_bug.cgi?id=1401054 . I mean, if you have split the shutdown part, why not split the start-up.


Note You need to log in before you can comment on or make changes to this bug.