Skip to content

Commit

Permalink
<fix>[vpc]: fix real zvr server name
Browse files Browse the repository at this point in the history
Resolves/Related: ZSTAC-56099
  • Loading branch information
unrollable committed May 23, 2023
1 parent 9986271 commit efe0252
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion data/file-lists/zvr-monitor.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

id -u vyos > /dev/null 2>&1 && USER="vyos" || USER="zstack"
[ x"$USER" == x"vyos" ] && SERVER="/opt/vyatta/sbin/zvr" || SERVER="/usr/local/bin/zvr"

HOMDIR=/home/$USER/zvr
LOGFILE=$HOMDIR/zvrMonitor.log
Expand All @@ -20,7 +21,7 @@ fi

##check zvr status
uri=http://$manageNicIp:7272/test
pid=$(ps aux | grep -w 'zvr' | grep -v grep | awk '{print $2}' | head -1)
pid=$(ps aux | grep -w $SERVER | grep -v grep | awk '{print $2}' | head -1)
if [ x$pid = x"" ]; then
echo "$(date '+%Y-%m-%d %H:%M:%S') zstack virtual router is stopped " >> $LOGFILE
else
Expand Down
3 changes: 2 additions & 1 deletion data/file-lists/zvr-reboot.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

id -u vyos > /dev/null 2>&1 && USER="vyos" || USER="zstack"
[ x"$USER" == x"vyos" ] && SERVER="/opt/vyatta/sbin/zvr" || SERVER="/usr/local/bin/zvr"
HOMDIR=/home/$USER/zvr
LOGFILE=$HOMDIR/zvrReboot.log
BOOTSTRAPINFO=$HOMDIR/bootstrap-info.json
Expand Down Expand Up @@ -80,7 +81,7 @@ fi

##check zvr versoin
uri=http://$manageNicIp:7272/test
pid=$(ps aux | grep -w '/usr/local/bin/zvr' | grep -v grep | awk '{print $2}')
pid=$(ps aux | grep -w $SERVER | grep -v grep | awk '{print $2}')
if [ x$pid = x"" ]; then
echo "$(date '+%Y-%m-%d %H:%M:%S') zstack virtual router is stopped, restart zstack virtual router" >> $LOGFILE
restart_zvr
Expand Down
2 changes: 1 addition & 1 deletion utils/const_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ PermitEmptyPasswords no
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes
PasswordAuthentication no
X11Forwarding yes
X11DisplayOffset 10
Expand Down
Binary file modified zvr/zvr_loongarch64
Binary file not shown.
Binary file modified zvrboot/zvrboot_loongarch64
Binary file not shown.

0 comments on commit efe0252

Please sign in to comment.