mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-26 03:21:44 +03:00
qemu_namespace: Don't build namespace if domain doesn't have it enabled
Even if namespaces are disabled, then due to a missing check at the
beginning of qemuDomainBuildNamespace(), the domain startup code
still tries to populate (nonexistent) domain's namespace.
Fixes: 8da362fe62
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
parent
2d93cbdea9
commit
db37396e41
@ -616,6 +616,11 @@ qemuDomainBuildNamespace(virQEMUDriverConfigPtr cfg,
|
||||
{
|
||||
VIR_AUTOSTRINGLIST paths = NULL;
|
||||
|
||||
if (!qemuDomainNamespaceEnabled(vm, QEMU_DOMAIN_NS_MOUNT)) {
|
||||
VIR_DEBUG("namespaces disabled for domain %s", vm->def->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (qemuDomainPopulateDevices(cfg, &paths) < 0)
|
||||
return -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user