Destroy libvirt domains with signal 60/23960/1
authorLukasz Kostyra <l.kostyra@samsung.com>
Fri, 4 Jul 2014 12:39:17 +0000 (14:39 +0200)
committerLukasz Kostyra <l.kostyra@samsung.com>
Mon, 7 Jul 2014 06:49:12 +0000 (08:49 +0200)
[Feature]       Libvirt now destroys its domains with signal.
[Cause]         Destroying a domain in other way requires setns, which might not be available on
                some systems.
[Solution]      Tell libvirt to destroy a domain with signal.
[Verification]  Build, install, run tests. All should pass.

Change-Id: I9d990488dd9a049feba2c02b070be2e4320029db

server/container-admin.cpp

index 9bc3c2e..b624817 100644 (file)
@@ -237,7 +237,7 @@ void ContainerAdmin::shutdown()
 
     setSchedulerLevel(SchedulerLevel::FOREGROUND);
 
-    if (virDomainShutdown(mDom.get()) < 0) {
+    if (virDomainShutdownFlags(mDom.get(), VIR_DOMAIN_SHUTDOWN_SIGNAL) < 0) {
         LOGE(mId << ": Error while shutting down the container:\n"
              << libvirt::libvirtFormatError());
         throw ContainerOperationException();