libvirt drops connection when attaching a disk (breaks MAAS pods)

Bug #1757210 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Incomplete
Critical
Newell Jensen
libvirt (Ubuntu)
In Progress
High
Christian Ehrhardt 

Bug Description

libvirt is dropping the connection when attaching a disk. This used to work as of last week. There;s been a new libvirt published in the archive last week.

roaksoax@rivals:~/project/maas$ sudo virsh attach-disk humane-elf /var/lib/libvirt/images/3597d020-f68c-4e32-a409-38e95c54fa94 vda --targetbus virtio --sourcetype file --config
[sudo] password for roaksoax:
error: Disconnected from qemu:///system due to end of file
error: Failed to attach disk
error: End of file while reading data: Input/output error

[Original bug report]

1. installed latest master fgrom ppa:maas-maintaienrs/experimental3
2. configured MAAS
3. added a pod, it discovered a previously created vm just fine
4. try to compose a machine, fails with the following:

2018-03-20 17:21:36 provisioningserver.rpc.pods: [critical] funny-clam: Failed to compose machine: RequestedMachine(hostname='grown-parrot', architecture='amd64/generic', cores=1, memory=1024, block_devices=[RequestedMachineBlockDevice(size=8000000000, tags=['local'])], interfaces=[RequestedMachineInterface()], cpu_speed=None)
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 500, in errback
     self._startRunCallbacks(fail)
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks
     self._runCallbacks()
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 653, in _runCallbacks
     current.result = callback(current.result, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1442, in gotResult
     _inlineCallbacks(r, g, deferred)
 --- <exception caught here> ---
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1384, in _inlineCallbacks
     result = result.throwExceptionIntoGenerator(g)
   File "/usr/lib/python3/dist-packages/twisted/python/failure.py", line 408, in throwExceptionIntoGenerator
     return g.throw(self.type, self.value, self.tb)
   File "/usr/lib/python3/dist-packages/provisioningserver/drivers/pod/virsh.py", line 922, in compose
     created_machine = yield deferToThread(conn.create_domain, request)
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 250, in inContext
     result = inContext.theWork()
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>
     inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
     return func(*args,**kw)
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 232, in wrapper
     result = func(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/provisioningserver/drivers/pod/virsh.py", line 764, in create_domain
     self.configure_pxe_boot(request.hostname)
   File "/usr/lib/python3/dist-packages/provisioningserver/drivers/pod/virsh.py", line 545, in configure_pxe_boot
     doc = etree.XML(xml)
   File "src/lxml/etree.pyx", line 3191, in lxml.etree.XML

   File "src/lxml/parser.pxi", line 1876, in lxml.etree._parseMemoryDocument

   File "src/lxml/parser.pxi", line 1757, in lxml.etree._parseDoc

   File "src/lxml/parser.pxi", line 1067, in lxml.etree._BaseParser._parseUnicodeDoc

   File "src/lxml/parser.pxi", line 600, in lxml.etree._ParserContext._handleParseResultDoc

   File "src/lxml/parser.pxi", line 710, in lxml.etree._handleParseResult

   File "src/lxml/parser.pxi", line 639, in lxml.etree._raiseParseError

 lxml.etree.XMLSyntaxError: Start tag expected, '<' not found, line 1, column 1 (<string>, line 1)

Changed in maas:
milestone: none → 2.4.0beta1
importance: Undecided → High
status: New → Triaged
importance: High → Critical
assignee: nobody → Newell Jensen (newell-jensen)
Changed in maas:
status: Triaged → In Progress
summary: - [2.4, regression] Cannot compose a machine inside
+ libvirt drops connection when attaching a disk
description: updated
Changed in libvirt (Ubuntu):
importance: Undecided → Critical
Changed in maas:
status: In Progress → Invalid
summary: - libvirt drops connection when attaching a disk
+ libvirt drops connection when attaching a disk (breaks MAAS pods)
Revision history for this message
Andres Rodriguez (andreserl) wrote :
Download full text (4.4 KiB)

segfaults in dmesg:

[ 3371.756438] libvirtd[30973]: segfault at 0 ip 00007fedded4dfc0 sp 00007fedd151b968 error 4 in libvirt.so.0.4000.0[7feddec3c000+3be000]
[ 4805.107412] libvirtd[31525]: segfault at 0 ip 00007f91d9cd0fc0 sp 00007f91cdca1968 error 4 in libvirt.so.0.4000.0[7f91d9bbf000+3be000]
[15423.386397] audit: type=1400 audit(1521577024.561:297): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libvirt-78362b05-1953-4f62-8d42-688e1f678b38" pid=27624 comm="apparmor_parser"
[15423.520312] audit: type=1400 audit(1521577024.697:298): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="libvirt-78362b05-1953-4f62-8d42-688e1f678b38" pid=27627 comm="apparmor_parser"
[15423.649667] audit: type=1400 audit(1521577024.825:299): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="libvirt-78362b05-1953-4f62-8d42-688e1f678b38" pid=27630 comm="apparmor_parser"
[15423.810695] audit: type=1400 audit(1521577024.989:300): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="libvirt-78362b05-1953-4f62-8d42-688e1f678b38" pid=27633 comm="apparmor_parser"
[15430.420974] audit: type=1400 audit(1521577031.597:301): apparmor="STATUS" operation="profile_load" profile="unconfined" name="libvirt-a88f6bf8-d2a5-4b5b-be07-dd5b35b89c62" pid=27953 comm="apparmor_parser"
[15430.604322] audit: type=1400 audit(1521577031.781:302): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="libvirt-a88f6bf8-d2a5-4b5b-be07-dd5b35b89c62" pid=27956 comm="apparmor_parser"
[15430.741907] audit: type=1400 audit(1521577031.917:303): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="libvirt-a88f6bf8-d2a5-4b5b-be07-dd5b35b89c62" pid=27964 comm="apparmor_parser"
[15430.870221] audit: type=1400 audit(1521577032.045:304): apparmor="STATUS" operation="profile_replace" info="same as current profile, skipping" profile="unconfined" name="libvirt-a88f6bf8-d2a5-4b5b-be07-dd5b35b89c62" pid=27967 comm="apparmor_parser"
[15431.106981] audit: type=1400 audit(1521577032.285:305): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="libvirt-a88f6bf8-d2a5-4b5b-be07-dd5b35b89c62" pid=27998 comm="apparmor_parser"
[15449.281278] audit: type=1400 audit(1521577050.457:306): apparmor="STATUS" operation="profile_remove" profile="unconfined" name="libvirt-78362b05-1953-4f62-8d42-688e1f678b38" pid=28643 comm="apparmor_parser"
[15493.783935] libvirtd[6334]: segfault at 0 ip 00007ffa7a8f7fc0 sp 00007ffa6c8c4968 error 4 in libvirt.so.0.4000.0[7ffa7a7e6000+3be000]
[15581.752429] audit: type=1400 audit(1521577182.929:307): apparmor="STATUS" operation="profile_remove" profile="unconfined" name="libvirt-a88f6bf8-d2a5-4b5b-be07-dd5b35b89c62" pid=29520 comm="apparmor_parser"
[15590.329550] libvirtd[29048]: segfault at 0 ip 00007f58b25fafc0 sp 00007f58a55c9968 error 4 in libvirt.so.0.4000.0[7f58b24e9000+3be000]
[16154.160134] libvirtd[29651]: segfault at 0 ip 00007fb437ab1fc0 sp 00007fb42aa80968 error 4 in libvirt.so.0.4000.0[7fb4379a0000+3be000]
[16313.228980] libvirtd[31102]: segfault at 0 ip 00007fa2186f8fc0 sp 00007fa20aec6968 error 4 i...

Read more...

Changed in maas:
status: Invalid → Incomplete
David Britton (dpb)
Changed in libvirt (Ubuntu):
importance: Critical → High
assignee: nobody → ChristianEhrhardt (paelzer)
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
Thanks for the report, but it is an already known issue, see bug 1756394 (you are two days late to the party) :-)

But on the good side, fix is known and in PPA: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3200

Just a short remaining delay to release it as I have to verify things a bit more and get 4 related changes upstream accepted.

Closing as dup

Changed in libvirt (Ubuntu):
status: New → In Progress
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.