/etc/qemu-ifup not allowed by apparmor
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
Matt Riedemann | ||
Newton |
Fix Committed
|
High
|
Matt Riedemann | ||
Ocata |
Fix Committed
|
High
|
Matt Riedemann | ||
Ubuntu Cloud Archive |
Invalid
|
Undecided
|
Unassigned | ||
Newton |
Fix Released
|
High
|
Unassigned | ||
libvirt (Ubuntu) |
Fix Released
|
Critical
|
Unassigned | ||
Yakkety |
Fix Released
|
Medium
|
Unassigned | ||
nova (Ubuntu) |
Invalid
|
High
|
Unassigned | ||
Yakkety |
Fix Released
|
High
|
Unassigned |
Bug Description
SRU - Nova
[Impact]
OpenStack deployments using vif types `tap`, `ivs`, `iovisor`, `midonet`, and `vrouter` are unable to boot instances using libvirt 1.3.1 from Ubuntu 16.04 (as used by the Newton Ubuntu Cloud Archive). Note that this impacts the nova package which is currently in yakkety-
[Test case]
Using an OpenStack cloud deployed with one of the above SDN's boot an instance.
The instance will fail to boot with a libvirt error.
Note cloud must be deployed using the -proposed packages from the Newton UCA.
[Regression Potential]
Minimal - the patch restores the previous behaviour for older libvirt versions, ensuring compatibility with documented libvirt version baselines in OpenStack Nova.
---
SRU - libvirt
[Impact]
* Please do note that this SRU statement is about the libvirt portion
of it, this is a fix of essentially an API break from Xenial to
Yakkety. This is independent to any decision to the Openstack context
discussion about the change to drop specifying a path at all.
* Before 9c17d665fdc5f (v1.3.2 which means 1.3.1 in Xenial for us) it
was possible to have the following interface configuration:
<interface type='ethernet'/>
<script path=''/>
</interface>
This resulted in -netdev tap,script=,.. Fortunately, qemu helped
us to get away with this as it just ignored the empty script
path. However, after the commit mentioned above it's libvirtd
who is executing the script. Unfortunately without special
case-ing empty script path.
* The fix adds the special casing that qemu had into libvirts handling
of the interface definition.
[Test Case]
* That is tricky as the way openstack is using to shove that in
seems to not care on xml validation as much as e.g. virsh.
If normally adding a device like
<interface type='ethernet'>
<script path=''/>
<model type='virtio'/>
</interface>
At least in xenial AND yakkety blocked by the XML validation.
But if trying to work around like with path='""'
this gives "-netdev tap,script=
the fix does not apply as this is '""' and not ''.
So to add the above snippet you have to edit it in via --skip-
validate like
$ virsh edit --skip-validate zesty-on-x-test
This on older libvrit gave: -netdev tap,script=
Which qemu understood as nop. But newer libvirt refuses.
* Error:
error: Failed to start domain <name>
error: Cannot find '' in path: No such file or directory
* Expected:
Starting the domain as-is without calling a script,
but also without complaining about being empty.
[Regression Potential]
* Regression should be low because of:
* The fix is upstream for a while now without follow on fix
* We are essentially going back to how it was
* There is no case like "I had '' set in my setup but now it is
a no-op which makes me fail" because if one had '' it failed until
now.
* Fix is in zesty for a few days without new fallout being reported
* also it passed several levels of testing (on the case and general
regression testing)
* Due to extra xml checks a device like path='' is not even definable.
So only those who run --skip-validate or similar are affected in
the first place.
[Other Info]
* n/a
----
I have VMs failing to start with 2017-02-17 15:38:44.458 264015 ERROR nova.compute.
Log excerpt:
http://
Seems to be that /etc/qemu-ifup is being blocked by apparmor:
type=AVC msg=audit(
type=PATH msg=audit(
root@ubuntu-
#
# This profile is for the domain whose UUID matches this file.
#
#include <tunables/global>
profile libvirt-
#include <abstractions/
#include <libvirt/
}
root@ubuntu-
# DO NOT EDIT THIS FILE DIRECTLY. IT IS MANAGED BY LIBVIRT.
"/var/
"/var/
"/var/
"/run/
"/var/
"/run/
"/var/
"/var/
# for qemu guest agent channel
owner "/var/lib/
/dev/vhost-net rw,
root@ubuntu-
libvirt-bin: /etc/apparmor.
root@ubuntu-
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii libvirt-bin 1.3.1-1ubuntu10
Seeing identical behavior on Xenial
ubuntu@
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii libvirt-bin 1.3.1-1ubuntu10.8 amd64 programs for the libvirt library
tags: | added: regression-update |
description: | updated |
Changed in nova: | |
importance: | Undecided → High |
Changed in nova (Ubuntu): | |
status: | New → Triaged |
Changed in nova (Ubuntu Yakkety): | |
status: | New → Triaged |
Changed in nova (Ubuntu): | |
importance: | Undecided → High |
Changed in nova (Ubuntu Yakkety): | |
importance: | Undecided → High |
tags: |
added: verification-newton-done removed: verification-newton-needed |
tags: |
added: verification-done removed: verification-needed |
tags: |
added: verification-needed removed: verification-done |
/etc/qemu-ifup is a non-standard command. Can you give details of how you setup your system to use this?
WORKAROUND: add the following to /etc/apparmor. d/abstractions/ libvirt- qemu:
/etc/qemu-ifup ixr,
and restart your VMs.