Skip to content

Commit ba26d23

Browse files
ScIT-Raphaelrs00000
andauthored
Force update serial while adding a new cluster to prevent inconsistency (hestiacp#2999)
Co-authored-by: rs00000 <rs00000@ts100.cloud.scit.ch>
1 parent b4ac1da commit ba26d23

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

bin/v-add-remote-dns-host

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,15 @@ fi
102102
cluster_cmd v-add-cron-restart-job
103103
check_result $? "$HOST connection failed" "$E_CONNECT"
104104

105+
# Loop trough domains to generate new serial
106+
for dns_user in $($BIN/v-list-sys-users plain); do
107+
for dns_domain in $($BIN/v-list-dns-domains $dns_user plain | cut -f1); do
108+
$BIN/v-rebuild-dns-domain $dns_user $dns_domain "no" "yes"
109+
done
110+
done
111+
105112
# Syncing all domains
106-
$BIN/v-sync-dns-cluster "$host"
113+
$BIN/v-sync-dns-cluster
107114
check_result $? "$HOST sync failed" "$E_CONNECT"
108115

109116
#----------------------------------------------------------#

0 commit comments

Comments
 (0)