[RFC] Expanding hooks API for running several scripts by one call virHookCall

Hi, all. I have the proposal about subject. Libvirt hook calls only one script (/etc/libvirt/hooks/<driver>) now. This is not convenient if scripts for hook are provided by many vendors. Script one vendor can replace previously installed script other vendor. Let's use usual linux scheme - running all scripts from directory /etc/libvirt/hooks/<driver>.d in alphabetical order. If we find script in old place we will execute it before others in subdirectory for backward compatibility. I want to implement patch for this scheme. What is your opinion? Dmitry

On Tue, Jun 16, 2020 at 02:44:02PM +0000, Dmitry Nesterenko wrote:
Hi, all.
I have the proposal about subject. Libvirt hook calls only one script (/etc/libvirt/hooks/<driver>) now. This is not convenient if scripts for hook are provided by many vendors. Script one vendor can replace previously installed script other vendor. Let's use usual linux scheme - running all scripts from directory /etc/libvirt/hooks/<driver>.d in alphabetical order. If we find script in old place we will execute it before others in subdirectory for backward compatibility. I want to implement patch for this scheme. What is your opinion?
Sounds pretty reasonable to me. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|

On 6/16/20 4:44 PM, Dmitry Nesterenko wrote:
Hi, all.
I have the proposal about subject. Libvirt hook calls only one script (/etc/libvirt/hooks/<driver>) now. This is not convenient if scripts for hook are provided by many vendors. Script one vendor can replace previously installed script other vendor. Let's use usual linux scheme - running all scripts from directory /etc/libvirt/hooks/<driver>.d in alphabetical order. If we find script in old place we will execute it before others in subdirectory for backward compatibility.
Agreed with Dan. Although, we tend to implement missing functionality in libvirt. However, the hooks are viewed as our response to policy based decisions (we don't like to implement policy in libvirt - it's never ending race with user needs).
I want to implement patch for this scheme. What is your opinion?
Even better! Michal
participants (3)
-
Daniel P. Berrangé
-
Dmitry Nesterenko
-
Michal Privoznik