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

Re: [libvirt] [PATCH 2/3] Introduce two new methods for triggering controlled shutdown/reboot

> The virDomainShutdownFlags and virDomainReboot APIs allow the caller
> to request the operation is implemented via either acpi button press
> or a guest agent. For containers, a couple of other methods make
> sense, a message to /dev/initctl, and direct kill(SIGTERM|HUP) of
> the container init process.

Indeed - this is a nice way to tie in your earlier patches.

> Signed-off-by: Daniel P. Berrange <berrange redhat com>
> ---
>  include/libvirt/libvirt.h.in |  4 ++++
>  tools/virsh-domain.c         | 18 ++++++++++++++----
>  2 files changed, 18 insertions(+), 4 deletions(-)

Alas, you are missing documentation of the new flags in
src/libvirt.c (not that the existing flags were documented
there yet), as well as missing an update to this portion
of libvirt.c:virDomainShutdownFlags() (and its reboot

    /* At most one of these two flags should be set.  */
        virReportInvalidArg(flags, "%s",
                            _("flags for acpi power button and guest agent are mutually exclusive"));
        goto error;

That should be updated to check that now at most one of the
four flags are present.

Everything else looks okay, but to ensure we get decent
documentation, I'll defer ack until you post v2.

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