You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2019/07/10 20:18:49 UTC
[cloudstack] branch master updated: vr: Fix vpc router in UNKNOWN
state (#3465)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/master by this push:
new b7988a3 vr: Fix vpc router in UNKNOWN state (#3465)
b7988a3 is described below
commit b7988a3e5f1ef9774aefcb76a10be0cc00c4358f
Author: Wei Zhou <w....@global.leaseweb.com>
AuthorDate: Wed Jul 10 22:18:37 2019 +0200
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.
---
systemvm/debian/opt/cloud/bin/checkrouter.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/systemvm/debian/opt/cloud/bin/checkrouter.sh b/systemvm/debian/opt/cloud/bin/checkrouter.sh
index bb6c9f8..c0d2ea7 100755
--- a/systemvm/debian/opt/cloud/bin/checkrouter.sh
+++ b/systemvm/debian/opt/cloud/bin/checkrouter.sh
@@ -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