virsh domtime set does not release the lock there by subsequent domtime command invocation fails (libvirt)

Bug #1865425 reported by bugproxy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
Fix Released
High
Ubuntu on IBM Power Systems Bug Triage
libvirt (Ubuntu)
Fix Released
Undecided
Canonical Server

Bug Description

== Comment: #0 - Satheesh Rajendran - 2020-02-20 05:38:17 ==
---Problem Description---
virsh domtime set does not release the lock there by subsequent domtime command invocation fails

Contact Information = <email address hidden>

---uname output---
5.4.0-14-generic #17-Ubuntu

Machine Type = power9 ppc64le

Userspace rpm: ii libvirt0:ppc64el 6.0.0-0ubuntu3 ppc64el

---Steps to Reproduce---

1. Start a guest(attached xml)
2. virsh domtime --now
3. virsh domtime --pretty
error: Timed out during operation: cannot acquire state change lock (held by agent=remoteDispatchDomainSetTime)

Testcase failed:
 (01/20) qemu.qcow2.virtio_scsi.smp2.virtio_net.Guest.Ubuntu.20.04.ppc64le.powerkvm-libvirt.virsh.domtime.positive.get_time: ERROR: Failed to recover guest time:\ncommand: '/bin/virsh domtime virt-tests-vm1 --now '\nexit_status: 1\nduration: 30.03365969657898\ninterrupted: False\npid: 227365\nencoding: 'UTF-8'\nstdout: '\n'\nstderr: 'error: Timed out during operation: cannot acquire state cha... (177.03 s)

== Comment: #3 - Murilo Opsfelder Araujo - 2020-02-20 11:14:32 ==
Upstream fix:

https://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=d61f95cf6a6fbd564e104c168d325581acd9cd8d

Related branches

Revision history for this message
bugproxy (bugproxy) wrote : guest xml

Default Comment by Bridge

tags: added: architecture-ppc64le bugnameltc-184006 severity-high targetmilestone-inin---
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: ubuntu → libvirt (Ubuntu)
Frank Heimes (fheimes)
Changed in ubuntu-power-systems:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
Changed in libvirt (Ubuntu):
assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Canonical Server Team (canonical-server)
Changed in ubuntu-power-systems:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

The offending patch is in 6.0 the fix in 6.1-rc1.
So only Focal is affected.

Thanks for the bug and fix Satheesh and Murilo!

Changed in libvirt (Ubuntu):
status: New → In Progress
Changed in ubuntu-power-systems:
status: Triaged → In Progress
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Issue reproduced (after installing qemu-guest-agent in the guest):
root@f:~# virsh domtime --now focal2
error: Timed out during operation: cannot acquire state change lock (held by agent=remoteDispatchDomainSetTime)
root@f:~# virsh domtime --pretty focal2
error: Timed out during operation: cannot acquire state change lock (held by agent=remoteDispatchDomainSetTime)

After updating to the PPA:
root@f:~# virsh domtime --now focal2
root@f:~# virsh domtime --pretty focal2
Time: 2020-03-02 10:34:02

So all works as expected and reported, just waiting for an MP review now to not have introduced any accidents.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Uploaded a fix to Focal, lets see how fast it passed proposed migration ...

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 6.0.0-0ubuntu4

---------------
libvirt (6.0.0-0ubuntu4) focal; urgency=medium

  * d/p/ubuntu/lp-1865425-*: avoid killing the monitor job in
    qemuDomainSetTimeAgent (LP: #1865425)

 -- Christian Ehrhardt <email address hidden> Mon, 02 Mar 2020 10:44:22 +0100

Changed in libvirt (Ubuntu):
status: In Progress → Fix Released
Frank Heimes (fheimes)
Changed in ubuntu-power-systems:
status: In Progress → Fix Released
bugproxy (bugproxy)
tags: added: targetmilestone-inin2004
removed: targetmilestone-inin---
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.