projects
/
gnt-info
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc77f0d
)
simple emulator for gnt-cluster
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 17 Feb 2020 18:09:40 +0000
(19:09 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Mon, 17 Feb 2020 18:09:40 +0000
(19:09 +0100)
this enables you to use gnt-* commands on machines without ganeti
installation
emulator/gnt-cluster
[new file with mode: 0755]
patch
|
blob
diff --git a/emulator/gnt-cluster
b/emulator/gnt-cluster
new file mode 100755
(executable)
index 0000000..
7c79eea
--- /dev/null
+++ b/
emulator/gnt-cluster
@@ -0,0
+1,24
@@
+#!/bin/sh -e
+
+op=$1 ; shift
+
+if [ "$op" = "command" ] ; then
+
+ show_machine=0
+ if [ $1 = '-M' ] ; then # FIXME --machine
+ shift
+ show_machine=1
+ fi
+
+ for host in lib10 lib15 lib20 ; do
+
+ prefix=''
+ test $show_machine && prefix="$host: "
+ #echo "# ssh $host $*"
+ ssh $host $* | sed "s/^/$prefix/"
+
+ done
+else
+ echo "UNKNOWN [$op] $*"
+ exit 1
+fi