mirror of
https://github.com/apache/cloudstack.git
synced 2025-12-16 18:43:26 +01:00
vr: Fix vpc router in UNKNOWN state (#3465)
If there are more than 10 vpc tiers or public ip subnets in a VPC, eth1X will be added in vpc router. The redundant state is UNKNOWN in this case.
This commit is contained in:
parent
b509e086f9
commit
b7988a3e5f
@ -27,10 +27,10 @@ fi
|
||||
ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g')
|
||||
if [ "$ROUTER_TYPE" = "router" ]
|
||||
then
|
||||
ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi')
|
||||
ROUTER_STATE=$(ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi')
|
||||
STATUS=$ROUTER_STATE
|
||||
else
|
||||
ROUTER_STATE=$(ip addr | grep eth1 | grep state | awk '{print $9;}')
|
||||
ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}')
|
||||
if [ "$ROUTER_STATE" = "UP" ]
|
||||
then
|
||||
STATUS=MASTER
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user