Skip to content

Commit

Permalink
delete: allow destroy_pod fail if vm die
Browse files Browse the repository at this point in the history
Sometimes the destroy pod command could fail
trying to use vm sockets messsage :
write unix
@-\u003e/var/run/cc-oci-runtime/CDI/ga-ctl.sock

If destroy_pod fails but the VM is destroyed
we get what we wanted, lets lets continue with
the delete process.

Signed-off-by: Jose Carlos Venegas Munoz <[email protected]>
  • Loading branch information
jcvenegas committed Jun 28, 2017
1 parent 29f8aa2 commit 5121969
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/oci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,8 @@ cc_oci_stop (struct cc_oci_config *config,
if (cc_pod_is_pod_container(config)) {
g_debug("Cannot delete container %s (pid %u) - "
"it is a pod container", state->id, state->pid);
} else if (! cc_proxy_hyper_destroy_pod(config)) {
} else if (! cc_proxy_hyper_destroy_pod(config) &&
kill (config->vm->pid, 0) != 0) {
g_critical ("failed to destroy pod");
return false;
}
Expand Down

0 comments on commit 5121969

Please sign in to comment.