[PATCH 0/2] Support hooks placed in several files

Dmitry Nesterenko posted 2 patches 2 weeks ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200621211639.385175-1-dmitry.nesterenko@virtuozzo.com
src/util/virhook.c | 168 +++++++++++++++++++++++++++++++++++++++------
1 file changed, 146 insertions(+), 22 deletions(-)

[PATCH 0/2] Support hooks placed in several files

Posted by Dmitry Nesterenko 2 weeks ago
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.
These patches are changing behaviour of hooks to 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
as first for backward compatibility.

Dmitry Nesterenko (2):
  virthook: refactoring for support hooks placed in several files
  virhook: support hooks placed in several files

 src/util/virhook.c | 168 +++++++++++++++++++++++++++++++++++++++------
 1 file changed, 146 insertions(+), 22 deletions(-)

-- 
2.18.4

Re: [PATCH 0/2] Support hooks placed in several files

Posted by Michal Privoznik 2 weeks ago
On 6/21/20 11:16 PM, Dmitry Nesterenko wrote:
> 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.
> These patches are changing behaviour of hooks to 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
> as first for backward compatibility.
> 
> Dmitry Nesterenko (2):
>    virthook: refactoring for support hooks placed in several files
>    virhook: support hooks placed in several files
> 
>   src/util/virhook.c | 168 +++++++++++++++++++++++++++++++++++++++------
>   1 file changed, 146 insertions(+), 22 deletions(-)
> 

What I am missing here is:
- documentation (we have docs/hooks.html.in documenting how the hook 
scripts are handled)
- news.xml - this is user visible change that is possibly interesting to 
them


Otherwise looking good.

Michal