libvirtd died while uvtool was creating a VM

Bug #1257304 reported by Diogo Matsubara
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Not sure how to reproduce this one. I was running maas-test in the MAAS qa lab and got the following error:

ubuntu@lenovo-RD230-01:~/maas-test$ ./bin/maas-test --bmc-ip 192.168.22.35 --bmc-username root --bmc-password ubuntu --http-proxy=http://10.98.3.6:3128 br0
2013-12-03 09:18:22,415 INFO Checking for KVM extensions.
2013-12-03 09:18:22,429 INFO Checking for virtualised hardware...
2013-12-03 09:18:22,517 INFO Using external proxy http://10.98.3.6:3128.
2013-12-03 09:18:22,519 INFO Downloading KVM image for series=saucy, arch=amd64...
2013-12-03 09:18:24,457 INFO Done downloading KVM image for series=saucy, arch=amd64.
2013-12-03 09:18:24,457 INFO Creating virtual machine c41f87ba-5c25-11e3-8bc6-00e081ddd1cf, arch=amd64...
ERROR

======================================================================
ERROR: setUpClass (maastest.main.ConfiguredTestMAAS)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ubuntu/maas-test/maastest/cases.py", line 88, in setUpClass
    cls.fixtures.useFixture(cls.machine)
  File "/home/ubuntu/maas-test/maastest/cases.py", line 45, in useFixture
    super(ClassFixture, self).useFixture(fixture)
  File "/usr/lib/python2.7/dist-packages/fixtures/fixture.py", line 192, in useFixture
    fixture.setUp()
  File "/home/ubuntu/maas-test/maastest/kvmfixture.py", line 142, in setUp
    self.start()
  File "/home/ubuntu/maas-test/maastest/kvmfixture.py", line 267, in start
    input=template, check_call=True)
  File "/home/ubuntu/maas-test/maastest/utils.py", line 63, in run_command
    stderr.decode('ascii')))
Exception: Command 'sudo uvt-kvm create --ssh-public-key-file=/home/ubuntu/.config/maas-test/vm_ssh_id_rsa.pub --unsafe-caching --memory 2048 --disk 20 c41f87ba-5c25-11e3-8bc6-00e081ddd1cf arch=amd64 release=saucy --template -' failed (1):

Warning: this CLI is experimental and may change.
wrote ds.img with filesystem=iso9660 and diskformat=raw
libvirt: DBus Utils error : Connection is closed
Traceback (most recent call last):
  File "/usr/bin/uvt-kvm", line 597, in <module>
    main(sys.argv[1:])
  File "/usr/bin/uvt-kvm", line 593, in main
    args.func(parser, args)
  File "/usr/bin/uvt-kvm", line 436, in main_create
    unsafe_caching=args.unsafe_caching,
  File "/usr/bin/uvt-kvm", line 323, in create
    domain.create()
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 708, in create
    if ret == -1: raise libvirtError ('virDomainCreate() failed', dom=self)
libvirt.libvirtError: Connection is closed

----------------------------------------------------------------------
Ran 0 tests in 3.678s

FAILED (errors=1)

Syslog showed this error:
Dec 3 09:18:25 lenovo-RD230-01 kernel: [11447.751086] type=1400 audit(1386080305.462:55): apparmor="DENIED" operation="open" parent=2769 profile="/usr/lib/libvirt/virt-aa-helper" name="/var/lib/uvtool/libvirt/images/x-uvt-b64-Y29tLnVidW50dS5jbG91ZDpzZXJ2ZXI6MTMuMTA6YW1kNjQgMjAxMzExMTM=" pid=4967 comm="virt-aa-helper" requested_mask="r" denied_mask="r" fsuid=0 ouid=0

I noticed that dbus wasn't running so I restarted it and got the same error. Then I restarted libvirtd-bin service which fixed the issue.

Revision history for this message
Robie Basak (racb) wrote :

Hi Diogo,

Thanks for reporting this, and sorry for being so slow in responding. I've finally got round to going through uvtool issues this week.

AFAICT, this is a libvirt or libvirt packaging issue, since it seems that libvirtd died and needed restarting while being used by uvtool. I uploaded a possible fix for libvirt in 1.2.1-0ubuntu8 which added uvtool use to the AppArmor profile, though I'm a little confused as to why the helper needed access to the backing store image there anyway. It might well have been fixed by this, so I'll leave this Incomplete, pending a reproducer case with libvirt-bin >= 1.2.1-0ubuntu8 installed.

Changed in uvtool:
status: New → Incomplete
affects: uvtool → libvirt (Ubuntu)
summary: - uvtools fails to create a virtual machine
+ libvirtd died while uvtool was creating a VM
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for libvirt (Ubuntu) because there has been no activity for 60 days.]

Changed in libvirt (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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