From patchwork Wed Apr 13 15:33:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 65739 Delivered-To: patch@linaro.org Received: by 10.140.93.198 with SMTP id d64csp80383qge; Wed, 13 Apr 2016 08:35:53 -0700 (PDT) X-Received: by 10.194.3.20 with SMTP id 20mr11907850wjy.59.1460561752922; Wed, 13 Apr 2016 08:35:52 -0700 (PDT) Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com. [209.132.183.24]) by mx.google.com with ESMTPS id m197si29906187wmd.77.2016.04.13.08.35.52 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 13 Apr 2016 08:35:52 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u3DFXIcg005562; Wed, 13 Apr 2016 11:33:18 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u3DFXHmD028566 for ; Wed, 13 Apr 2016 11:33:17 -0400 Received: from colepc.redhat.com (ovpn-113-40.phx2.redhat.com [10.3.113.40]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3DFXHYH000707; Wed, 13 Apr 2016 11:33:17 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Wed, 13 Apr 2016 11:33:13 -0400 Message-Id: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu: command: don't overwrite watchdog dump action X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com The watchdog cli refactoring in 4666b762 dropped the temporary variable we use to convert to action=dump to action=pause for the qemu cli, and stored the converted value in the domain structure. Our other watchdog handling code then treated it as though the user requested action=pause, which broke action=dump handling. Revive the temporary variable to fix things. --- src/qemu/qemu_command.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) -- 2.7.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 21f505b..434c731 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3350,6 +3350,7 @@ qemuBuildWatchdogCommandLine(virCommandPtr cmd, virDomainWatchdogDefPtr watchdog = def->watchdog; char *optstr; const char *action; + int action_id; if (!def->watchdog) return 0; @@ -3376,10 +3377,12 @@ qemuBuildWatchdogCommandLine(virCommandPtr cmd, virCommandAddArg(cmd, optstr); VIR_FREE(optstr); + /* 'dump' action tells qemu to pause, then we handle the dump ourselves */ + action_id = watchdog->action; if (watchdog->action == VIR_DOMAIN_WATCHDOG_ACTION_DUMP) - watchdog->action = VIR_DOMAIN_WATCHDOG_ACTION_PAUSE; + action_id = VIR_DOMAIN_WATCHDOG_ACTION_PAUSE; - action = virDomainWatchdogActionTypeToString(watchdog->action); + action = virDomainWatchdogActionTypeToString(action_id); if (!action) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("invalid watchdog action"));