[PATCH 2/2] Fix error when starting a container after an error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The typical case for the problem is starting a domain needing a network
that isn't started. Even after starting the network, we get an unknown error
when starting the container.

This is due to dynamic security label not being removed.
---
 src/lxc/lxc_process.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lxc/lxc_process.c b/src/lxc/lxc_process.c
index 1c0d4e5..d7eb8bc 100644
--- a/src/lxc/lxc_process.c
+++ b/src/lxc/lxc_process.c
@@ -1372,6 +1372,7 @@ int virLXCProcessStart(virConnectPtr conn,
             VIR_FREE(vm->def->seclabels[0]->model);
             VIR_FREE(vm->def->seclabels[0]->label);
             VIR_FREE(vm->def->seclabels[0]->imagelabel);
+            VIR_DELETE_ELEMENT(vm->def->seclabels, 0, vm->def->nseclabels);
         }
     }
     for (i = 0; i < nttyFDs; i++)
-- 
2.1.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]