Skip to content
Snippets Groups Projects
Commit 7862c678 authored by Utz-Uwe Haus's avatar Utz-Uwe Haus
Browse files

adapt MIO config creation to sage mero config query tool hctl

parent d8e37a7b
Branches
Tags
2 merge requests!3Jsc ci update,!2update JSC-CI branch to devel
......@@ -196,7 +196,7 @@ mio-config-PM1.yaml: generate-mio-config.sh
./generate-mio-config.sh 102 && mv mio-config.yaml $@
mio-config-PM2.yaml: generate-mio-config.sh
./generate-mio-config.sh 103 && mv mio-config.yaml $@
mio-config-PM2.yaml: generate-mio-config.sh
mio-config-PM3.yaml: generate-mio-config.sh
./generate-mio-config.sh 104 && mv mio-config.yaml $@
mio-config-C1.yaml: generate-mio-config.sh
./generate-mio-config.sh 105 && mv mio-config.yaml $@
......
......@@ -8,9 +8,18 @@ if test $# -ne 1; then
exit 1
fi
HOSTNAME=`hostname`
if test -f /etc/mero/conf.xc; then
# fetch from file (mainly for single-host installation)
MERO_HA_IP=`grep 'M0_CST_HA' /etc/mero/conf.xc |sed -s 's/^.*@M0_CST_HA.* "\([^"]*\)".*$/\1/'`
CLOVIS_IP=`grep 'M0_CST_CONFD' /etc/mero/conf.xc |sed -s 's/^.*@M0_CST_CONFD.* "\([^"]*\)".*$/\1/'|sed -s "s/\(.*\):1$/\1:$1/"`
HOSTNAME=`hostname`
else
# find the full address of the CST_HA service on the host we're running on
MERO_HA_IP=`hctl mero status | grep -2 CST_HA|grep -2 "$HOSTNAME" |head -2|tail -1|sed -e 's/^.*\[[^]]\+] [^ ]\+:[^ ]\+ \+\([^ ]\+\).*$/\1/'`
# find the part of the local clovis service address that we stick our mero-id onto
CLOVIS_IP=`hctl mero status | grep -A10 "$HOSTNAME" |grep -A1 CST_RMS|grep -v CST_RMS|head -1|sed -e 's/^.*\[[^]]\+] [^ ]\+:[^ ]\+ \+\([^ ]\+\).*$/\1/' | sed -e 's/\(.*\):[0-9]\+ $/\1:$1/'`
endif
cat >mio-config.yaml <<EOF
# auto-generated MIO config file for $HOSTNAME
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment