projects
/
gnt-info
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b84caed
)
kill ganeti instance kvm
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 30 Apr 2019 12:07:26 +0000
(14:07 +0200)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Tue, 30 Apr 2019 12:07:26 +0000
(14:07 +0200)
gnt-kill-instance.sh
[new file with mode: 0755]
patch
|
blob
diff --git a/gnt-kill-instance.sh
b/gnt-kill-instance.sh
new file mode 100755
(executable)
index 0000000..
d6b5e4b
--- /dev/null
+++ b/
gnt-kill-instance.sh
@@ -0,0
+1,8
@@
+#!/bin/sh -xe
+
+instance=$1
+test -z "$instance" && echo "Usage:$0 instance [0|intefrace]" && exit 1
+
+on_node=`gnt-instance list --no-header -o pnode $instance`
+pid=`ssh $on_node cat /var/run/ganeti/kvm-hypervisor/pid/$instance || exit 1`
+ssh $on_node "kill -9 $pid"