gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-grid5k] 56/73: fix startup


From: gnunet
Subject: [taler-grid5k] 56/73: fix startup
Date: Tue, 14 Dec 2021 15:10:38 +0100

This is an automated email from the git hooks/post-receive script.

marco-boss pushed a commit to branch master
in repository grid5k.

commit 40c077f955b7fd365379981a111c7363da41084a
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Wed Dec 8 16:50:03 2021 +0100

    fix startup
---
 experiment/scripts/database.sh   |  1 +
 experiment/scripts/monitor.sh    | 21 ++++++++++++++-------
 experiment/scripts/taler-perf.sh |  2 +-
 3 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/experiment/scripts/database.sh b/experiment/scripts/database.sh
index 76ebd43..f0be778 100755
--- a/experiment/scripts/database.sh
+++ b/experiment/scripts/database.sh
@@ -11,6 +11,7 @@ function setup_disks() {
     mkdir /mnt/sdb || true
     mount /dev/sdb /mnt/sdb || true
     if [ ! -L /var/lib/postgresql/13/main/pg_wal ]; then
+      rm -rf /mnt/sdb/pg_wal || true
       mv /var/lib/postgresql/13/main/pg_wal/ /mnt/sdb
       ln -s /mnt/sdb/pg_wal /var/lib/postgresql/13/main/pg_wal
       chown -R postgres:postgres /var/lib/postgresql/13/main/pg_wal/
diff --git a/experiment/scripts/monitor.sh b/experiment/scripts/monitor.sh
index 90f9fcf..8d9dd56 100755
--- a/experiment/scripts/monitor.sh
+++ b/experiment/scripts/monitor.sh
@@ -71,15 +71,22 @@ function add_wallet_nodes_to_prometheus() {
 function add_exchanges_to_prometheus() {
   if [[ "$1" == "init" ]]; then 
     cat /etc/monitor/exchange-exporters.yaml.tpl >> 
/etc/monitor/prometheus.yaml
-  fi
 
-  for EXCH in $(get_exchanges); do 
-    if ! grep -q "${EXCH}" /etc/monitor/prometheus.yaml;
-    then
-      sed -i "/<EXCHANGES_HERE>/a  \ \ \ \ \ \ - '${EXCH}'" \
+    for i in $(seq $((${NUM_EXCHANGE_PROCESSES:-10}-1))); do
+      let "i+=10000"
+      sed -i "/<EXCHANGES_HERE>/a  \ \ \ \ \ \ - '${EXCHANGE_DOMAIN}:${i}'" \
               /etc/monitor/prometheus.yaml
-    fi
-  done
+    done
+
+  else
+    for EXCH in $(get_exchanges); do 
+      if ! grep -q "${EXCH}" /etc/monitor/prometheus.yaml;
+      then
+        sed -i "/<EXCHANGES_HERE>/a  \ \ \ \ \ \ - '${EXCH}'" \
+                /etc/monitor/prometheus.yaml
+      fi
+    done
+  fi
 }
 
 function init() {
diff --git a/experiment/scripts/taler-perf.sh b/experiment/scripts/taler-perf.sh
index 8a63cc1..253038a 100644
--- a/experiment/scripts/taler-perf.sh
+++ b/experiment/scripts/taler-perf.sh
@@ -6,7 +6,7 @@ source ~/scripts/helpers.sh
 function update_processes() {
   case "$1" in 
     prometheus)
-      ssh -o StrictHostKeyChecking=no ${MONITOR_DOMAIN} "/bin/bash -c 
/root/scripts/monitor.sh"
+      ssh -A -o StrictHostKeyChecking=no ${MONITOR_DOMAIN} "/bin/bash -c 
/root/scripts/monitor.sh"
       ;;
     *)
       echo "Unknown argument '$1' for function ${FUNCNAME[0]}"

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]