gnunet-svn
[Top][All Lists]
Advanced

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

[taler-grid5k] 53/141: clear dns updated


From: gnunet
Subject: [taler-grid5k] 53/141: clear dns updated
Date: Thu, 18 Nov 2021 14:49:54 +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 8f105b339910fe195b5ea29760755021f60b1f9e
Author: Boss Marco <bossm8@bfh.ch>
AuthorDate: Sat Oct 16 12:20:55 2021 +0200

    clear dns updated
---
 configs/etc/rsyslog.d/taler.conf |  1 +
 experiment/cleardns.sh           | 23 +++++++++++++++++++----
 experiment/run.sh                |  4 ++--
 3 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/configs/etc/rsyslog.d/taler.conf b/configs/etc/rsyslog.d/taler.conf
index a3bf562..c509eef 100644
--- a/configs/etc/rsyslog.d/taler.conf
+++ b/configs/etc/rsyslog.d/taler.conf
@@ -3,6 +3,7 @@ module(load="omprog")
 module(load="mmutf8fix")
 if $programname startswith 'taler' then {
   action(type="mmutf8fix" replacementChar="?")
+# 
https://grafana.com/docs/loki/latest/clients/promtail/scraping/#rsyslog-output-configuration
   action(type="omfwd"
          protocol="tcp"
          target="<MONITOR_DOMAIN_HERE>"
diff --git a/experiment/cleardns.sh b/experiment/cleardns.sh
index f71c17b..24ac4a3 100644
--- a/experiment/cleardns.sh
+++ b/experiment/cleardns.sh
@@ -4,15 +4,30 @@ set -eux
 
 source .env
 
-# Delete all old dns entries of the previous experitment
-while IFS='=' read -r name value; do
-  if [[ $name == *"_DOMAIN" || $name == *"_CNAME" ]] && [[ $value == 
*".${DNS_ZONE}" ]]; then 
-    nsupdate -k /root/ddns.key -v << EOF
+function del_ddn() {
+  nsupdate -k /root/ddns.key -v << EOF
 server ${DNS_HOST}
 zone ${DNS_ZONE}
 update delete ${value} A
 send
 EOF
+}
+
+# Delete all old dns entries of the previous experitment
+while IFS='=' read -r name value; do
+  if [[ $name == *"_DOMAIN" ]] && [[ $value == *".${DNS_ZONE}" ]]; then 
+    if [[ $value == "wallet"* ]]: then 
+      # We will probably never use more than 20 wallet hosts 
+      for (( i=0; i < 20; i++ )) ;
+      do
+        if nslookup "wallet-${i}.${DNS_ZONE}"; 
+        then
+          del_ddn "wallet-${i}.${DNS_ZONE}"
+       fi
+      done
+    else
+      del_ddn "${value}"
+    fi
   fi
 done < .env
 
diff --git a/experiment/run.sh b/experiment/run.sh
index 8b025d5..bc2bee9 100644
--- a/experiment/run.sh
+++ b/experiment/run.sh
@@ -34,9 +34,9 @@ case "${HOSTNAME}" in
     sleep $[ ( $RANDOM % 10 )  + 1 ]s
     for (( i = 0; i < ${NUM_WALLET_HOSTS}; ++i )) 
     do 
-      if ! nslookup wallet-${i}.${DNS_ZONE} ; 
+      if ! nslookup "wallet-${i}.${DNS_ZONE}"; 
       then
-        set_ddn wallet-${i}.${DNS_ZONE}
+        set_ddn "wallet-${i}.${DNS_ZONE}"
        break
       fi
     done

-- 
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]