Github user remibergsma commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1249#discussion_r47776850
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/checkrouter.sh ---
    @@ -17,21 +17,20 @@
     # under the License.
     
     STATUS=UNKNOWN
    -INTERFACE=eth1
     ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print 
$2;}' | sed -e 's/[,\"]//g')
    -if [ $ROUTER_TYPE = "router" ]
    +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')
        STATUS=$ROUTER_STATE
     else
    -   ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print 
$9;}')
    -   if [ $ROUTER_STATE = "UP" ]
    +   ROUTER_STATE=$(ip addr | grep eth1 | grep state | awk '{print $9;}')
    --- End diff --
    
    Split the commits and added a note.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to