]> xenbits.xensource.com Git - libvirt.git/commitdiff
lxc: fix starting a domain with non-strict numa memory mode
authorLuyao Huang <lhuang@redhat.com>
Mon, 20 Apr 2015 13:33:31 +0000 (15:33 +0200)
committerJán Tomko <jtomko@redhat.com>
Mon, 20 Apr 2015 13:50:43 +0000 (15:50 +0200)
 # virsh -c lxc:/// start helloworld
 error: Failed to start domain helloworld
 error: internal error: guest failed to start: Unknown
 failure in libvirt_lxc startup

Return success when there are no cpuset.mems to be set,
instead of failing without setting an error.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/lxc/lxc_cgroup.c

index 3c4078461dabac77a4fbacd795be876a80139af3..5e959a2ea98c15edd64a1e0681fb8fcdf8afa740 100644 (file)
@@ -82,8 +82,10 @@ static int virLXCCgroupSetupCpusetTune(virDomainDefPtr def,
     }
 
     if (virDomainNumatuneGetMode(def->numa, -1) !=
-        VIR_DOMAIN_NUMATUNE_MEM_STRICT)
+        VIR_DOMAIN_NUMATUNE_MEM_STRICT) {
+        ret = 0;
         goto cleanup;
+    }
 
     if (virDomainNumatuneMaybeFormatNodeset(def->numa, nodemask,
                                             &mask, -1) < 0)