virsh (ppc) fails with "missing /proc/device-tree/cpu "

Bug #1321365 reported by john.d@servergy.com
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
libvirt (Ubuntu)
Fix Released
Critical
Chuck Short
Trusty
Fix Released
Critical
Serge Hallyn

Bug Description

=====================================================
SRU Justification
Impact: Vms cannot be started on ppc
Test case: define and start a kvm vm on ppc host (as below in description)
Regression potential: This should cause no regressions, but qemu vms will now be able to read device-tree info
=====================================================

virsh # define vm01.xml
virsh # start Ubuntu-VM01
error: Failed to start domain Ubuntu-VM01
error: internal error: early end of file from monitor: possible problem:
Can't open directory /proc/device-tree/cpus/
qemu-system-ppc: -device piix3-usb-uhci,id=usb,bus=pci,addr=0x1: Bus 'pci' not found

With or without the "controller_type "pci" > statement fails:

(trusty)root@jade-rev4:/home2/qemu# cat *xml
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>Ubuntu-VM01</name>
  <uuid>38bbffe5-47e9-4a3b-84b1-1af5ff3f7194</uuid>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
  <vcpu placement='static'>1</vcpu>
  <os>
    <type arch='ppc' machine='ppce500'>hvm</type>
    <kernel>/home2/qemu/jade-kernel-2.0.bin</kernel>
    <initrd>/home2/qemu/jade-initrd-2.0.bin</initrd>
    <cmdline>console=ttyS0</cmdline>
  </os>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>destroy</on_reboot>
  <on_crash>destroy</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-ppc</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw'/>
      <source file='/home2/qemu/jade-ubuntu-14.04.qcow2.netinstall'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <controller type='usb' index='0'/>
<!-- <controller type='pci' index='0' model='pci-root'/> -->
    <memballoon model='virtio'/>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-no-shutdown'/>
  </qemu:commandline>
</domain>

virsh # start Ubuntu-VM01
error: Failed to start domain Ubuntu-VM01
error: internal error: early end of file from monitor: possible problem:
Can't open directory /proc/device-tree/cpus/
qemu-system-ppc: -device piix3-usb-uhci,id=usb,bus=pci,addr=0x1: Bus 'pci' not found

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: libvirt-bin 1.2.2-0ubuntu13
ProcVersionSignature: Ubuntu 3.13.0-24.46-powerpc-e500mc 3.13.9
Uname: Linux 3.13.0-24-powerpc-e500mc ppc
ApportVersion: 2.14.1-0ubuntu3
Architecture: powerpc
Date: Tue May 20 11:39:39 2014
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: libvirt
UpgradeStatus: Upgraded to trusty on 2014-04-29 (21 days ago)
modified.conffile..etc.libvirt.libvirt.conf: [modified]
mtime.conffile..etc.libvirt.libvirt.conf: 2014-05-15T15:07:48.854124

Revision history for this message
john.d@servergy.com (john-d-0) wrote :
Revision history for this message
john.d@servergy.com (john-d-0) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks for submitting this bug. The KernLog.txt explains the cause:

68 May 20 11:26:44 jade-rev4 kernel: [68937.255168] type=1400 audit(1400603204.426:99): apparmor="DENIED" operation="open" profile="libvirt-38bbffe5-47e9-4a3b-84b1-1af5ff3f7194" name="/proc/device-tree/cpus/" pid=23525 comm="qemu-system-ppc" requested_mask=" 68 r" denied_mask="r" fsuid=122 ouid=0

Changed in libvirt (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hi Chuck,

assigning this to you since you are working on packaging the new version. Could you please add the line

/proc/device-tree/** r,

to the file debian/apparmor/libvirt-qemu
?

Changed in libvirt (Ubuntu):
assignee: nobody → Zulnedi (zul)
assignee: Zulnedi (zul) → Chuck Short (zulcss)
Changed in libvirt (Ubuntu Trusty):
assignee: nobody → Serge Hallyn (serge-hallyn)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This likely needs this:
@{PROC}/device-tree/ r,
@{PROC}/device-tree/** r,

Revision history for this message
john.d@servergy.com (john-d-0) wrote :

Does Ubuntu test virsh with ppc ?

  Specifically <type arch='ppc' machine='ppce500'>hvm</type>

 On e500mc kernels ?

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Hi John,

as far as I know we do not. The kernel which you are using comes from Ben Collins at Servergy, so bringing him in on some of these issues (especially the shutdown one) would be good.

The fix for this particular bug unfortunately is being gated on libvirt 1.2.5 entering utopic, which should happen next week. I'll SRU it to trusty as soon as it's available in utopic.

Revision history for this message
john.d@servergy.com (john-d-0) wrote :

I work with Ben; The kernel is now supported by the Ubuntu kernel group ; I am not sure how these procedures work but I would like to be able to test virsh related patches as they are made available to trusty.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote : Re: [Bug 1321365] Re: virsh (ppc) fails with "missing /proc/device-tree/cpu "

Quoting <email address hidden> (<email address hidden>):
> I work with Ben; The kernel is now supported by the Ubuntu kernel group
> ; I am not sure how these procedures work but I would like to be able
> to test virsh related patches as they are made available to trusty.

Hi Ben,

this isn't my forte, but you should be able to gate a jenkins instance
on archive uploads of qemu and libvirt. If you'd like help with this
I'd suggest talking to psivaa on freenode #ubuntu-server. (Others there
should also be able to help)

Note that a new libvirt is expected to be published to utopic next week.

Changed in libvirt (Ubuntu):
importance: High → Critical
Changed in libvirt (Ubuntu Trusty):
importance: High → Critical
description: updated
Revision history for this message
Stéphane Graber (stgraber) wrote : Please test proposed package

Hello <email address hidden>, or anyone else affected,

Accepted libvirt into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/libvirt/1.2.2-0ubuntu13.1.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in libvirt (Ubuntu Trusty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libvirt - 1.2.2-0ubuntu13.2

---------------
libvirt (1.2.2-0ubuntu13.2) utopic; urgency=medium

  * debian/apparmor/libvirt-qemu: add device-tree access for ppc
    (LP: #1321365)
 -- Serge Hallyn <email address hidden> Thu, 05 Jun 2014 12:06:17 -0500

Changed in libvirt (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
CSRedRat (csredrat) wrote :
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Please see comment #10 if you'd like to be helpful.

tags: added: verification-done
tags: removed: verification-needed
Revision history for this message
Colin Watson (cjwatson) wrote : Update Released

The verification of the Stable Release Update for libvirt has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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

This bug was fixed in the package libvirt - 1.2.2-0ubuntu13.1.1

---------------
libvirt (1.2.2-0ubuntu13.1.1) trusty-proposed; urgency=medium

  * debian/apparmor/libvirt-qemu: add device-tree access for ppc
    (LP: #1321365)
 -- Serge Hallyn <email address hidden> Thu, 05 Jun 2014 11:26:22 -0500

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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