[libvirt] [PATCH for 3.0.x] Disable use of namespaces by default

When namespaces are enabled there is currently breakage when using disk hotplug and when using AppArmor Signed-off-by: Daniel P. Berrange <berrange@redhat.com> --- I'm suggesting this for 3.0.x branch - we'll leave them enabled in master on the basis that we'll actually fix the real bugs there. src/qemu/qemu_conf.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 6613d59..aa05b46 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -317,13 +317,6 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged) if (!(cfg->namespaces = virBitmapNew(QEMU_DOMAIN_NS_LAST))) goto error; -#if defined(__linux__) - if (privileged && - virProcessNamespaceAvailable(VIR_PROCESS_NAMESPACE_MNT) == 0 && - virBitmapSetBit(cfg->namespaces, QEMU_DOMAIN_NS_MOUNT) < 0) - goto error; -#endif /* defined(__linux__) */ - #ifdef DEFAULT_LOADER_NVRAM if (virFirmwareParseList(DEFAULT_LOADER_NVRAM, &cfg->firmwares, -- 2.9.3

On 01/18/2017 11:49 AM, Daniel P. Berrange wrote:
When namespaces are enabled there is currently breakage when using disk hotplug and when using AppArmor I guess you can also add these scenarios to the list: Starting domains with hostdev devices fails. Starting domains with disks of type block fails.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> ---
I'm suggesting this for 3.0.x branch - we'll leave them enabled in master on the basis that we'll actually fix the real bugs there.
src/qemu/qemu_conf.c | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 6613d59..aa05b46 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -317,13 +317,6 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged) if (!(cfg->namespaces = virBitmapNew(QEMU_DOMAIN_NS_LAST))) goto error;
-#if defined(__linux__) - if (privileged && - virProcessNamespaceAvailable(VIR_PROCESS_NAMESPACE_MNT) == 0 && - virBitmapSetBit(cfg->namespaces, QEMU_DOMAIN_NS_MOUNT) < 0) - goto error; -#endif /* defined(__linux__) */ - #ifdef DEFAULT_LOADER_NVRAM if (virFirmwareParseList(DEFAULT_LOADER_NVRAM, &cfg->firmwares,
Tested-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com> -- Mit freundlichen Grüßen/Kind regards Boris Fiuczynski IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martina Köderitz Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294

On Wed, Jan 18, 2017 at 10:49:59AM +0000, Daniel P. Berrange wrote:
When namespaces are enabled there is currently breakage when using disk hotplug and when using AppArmor
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> ---
I'm suggesting this for 3.0.x branch - we'll leave them enabled in master on the basis that we'll actually fix the real bugs there.
src/qemu/qemu_conf.c | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 6613d59..aa05b46 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -317,13 +317,6 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged) if (!(cfg->namespaces = virBitmapNew(QEMU_DOMAIN_NS_LAST))) goto error;
-#if defined(__linux__) - if (privileged && - virProcessNamespaceAvailable(VIR_PROCESS_NAMESPACE_MNT) == 0 && - virBitmapSetBit(cfg->namespaces, QEMU_DOMAIN_NS_MOUNT) < 0) - goto error; -#endif /* defined(__linux__) */ - #ifdef DEFAULT_LOADER_NVRAM if (virFirmwareParseList(DEFAULT_LOADER_NVRAM, &cfg->firmwares, --
Having this on 3.0.x would be nice since I'm currently looking getting 3.0 into the next Debian stable. Cheers, -- Guido

On Thu, Jan 19, 2017 at 11:55:20AM +0100, Guido Günther wrote:
On Wed, Jan 18, 2017 at 10:49:59AM +0000, Daniel P. Berrange wrote:
When namespaces are enabled there is currently breakage when using disk hotplug and when using AppArmor
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> ---
I'm suggesting this for 3.0.x branch - we'll leave them enabled in master on the basis that we'll actually fix the real bugs there.
src/qemu/qemu_conf.c | 7 ------- 1 file changed, 7 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 6613d59..aa05b46 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -317,13 +317,6 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged) if (!(cfg->namespaces = virBitmapNew(QEMU_DOMAIN_NS_LAST))) goto error;
-#if defined(__linux__) - if (privileged && - virProcessNamespaceAvailable(VIR_PROCESS_NAMESPACE_MNT) == 0 && - virBitmapSetBit(cfg->namespaces, QEMU_DOMAIN_NS_MOUNT) < 0) - goto error; -#endif /* defined(__linux__) */ - #ifdef DEFAULT_LOADER_NVRAM if (virFirmwareParseList(DEFAULT_LOADER_NVRAM, &cfg->firmwares, --
Having this on 3.0.x would be nice since I'm currently looking getting 3.0 into the next Debian stable.
I've pushed it into v3.0-maint now Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
participants (3)
-
Boris Fiuczynski
-
Daniel P. Berrange
-
Guido Günther