On Thu, Jan 22, 2015 at 04:22:36PM +0100, Michal Privoznik wrote:
On 16.01.2015 18:36, Daniel P. Berrange wrote:
> In many cases where we invoke virSystemdTerminateMachine the
> process(es) will have already gone away on their own accord.
> In these cases we log an error message that the machine does
> not exist. We should catch this particular error and simply
> ignore it, so we don't pollute the logs.
> ---
> src/util/virsystemd.c | 25 ++++++++++++++++++++-----
> 1 file changed, 20 insertions(+), 5 deletions(-)
>
> diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c
> index 3eea5c2..29a2e63 100644
> --- a/src/util/virsystemd.c
> +++ b/src/util/virsystemd.c
> @@ -340,18 +340,22 @@ int virSystemdTerminateMachine(const char *name,
> int ret;
> DBusConnection *conn;
> char *machinename = NULL;
> + DBusError error;
> +
> + dbus_error_init(&error);
This will suffer the same issue we already have in the code in
virSystemdCreateMachine if libvirt is built without DBUS.
Yep, this patch will need re-working once my other patch to
change virDBusCallMethod to take a virErrorPtr is merged.
I'll not push this series until after the release now, since
it is a feature rather than bugfix
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|