Re: [PATCH] Hook log the exit status of the hook not 256

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 24, 2013 at 08:05:30PM +0100, Guido Günther wrote:
> Adjust the docs accordingly. See http://bugs.debian.org/701570.

Ping?

> ---
>  docs/hooks.html.in |    5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/docs/hooks.html.in b/docs/hooks.html.in
> index 5f9963d..b75fbeb 100644
> --- a/docs/hooks.html.in
> +++ b/docs/hooks.html.in
> @@ -239,13 +239,14 @@
>      <p>If a hook script returns with an exit code of 0, the libvirt daemon
>         regards this as successful and performs no logging of it.</p>
>      <p>However, if a hook script returns with a non zero exit code, the libvirt
> -       daemon regards this as a failure, logs it with return code 256, and
> +       daemon regards this as a failure, logs it's return code, and
>         additionally logs anything on stderr the hook script returns.</p>
>      <p>For example, a hook script might use this code to indicate failure,
>         and send a text string to stderr:</p>
>      <pre>echo "Could not find required XYZZY" &gt;&amp;2
>  exit 1</pre>
>      <p>The resulting entry in the libvirt log will appear as:</p>
> -    <pre>20:02:40.297: error : virHookCall:416 : Hook script execution failed: Hook script /etc/libvirt/hooks/qemu qemu failed with error code 256:Could not find required XYZZY</pre>
> +    <pre>20:02:40.297: error : virHookCall:285 : Hook script execution failed: internal error Child process (LC_ALL=C PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> +                       HOME=/root USER=root LOGNAME=root /etc/libvirt/hooks/qemu qemu prepare begin -) unexpected exit status 1: Could not find required XYZZY</pre>
>    </body>
>  </html>
> -- 
> 1.7.10.4
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list
> 

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]