You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by bvbharatk <gi...@git.apache.org> on 2015/09/08 07:23:10 UTC

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

GitHub user bvbharatk opened a pull request:

    https://github.com/apache/cloudstack/pull/784

    CLOUDSTACK-8799 fixed the defalut routes

    CLOUDSTACK-8799 made changes to fix CsRedundant.py

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bvbharatk/cloudstack CLOUDSTACK-8799

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/784.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #784
    
----
commit 3effdbeddd9c315ae6fc459fb353bfe7a4bbe08f
Author: Bharat Kumar <bh...@citrix.com>
Date:   2015-09-04T07:14:46Z

    CLOUDSTACK-8799 fixed the defalut routes
    CLOUDSTACK-8799 made changes to fix CsRedundant.py

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by bvbharatk <gi...@git.apache.org>.
Github user bvbharatk commented on the pull request:

    https://github.com/apache/cloudstack/pull/784#issuecomment-140278884
  
    commit ids
     b66dcda49f370e6fc91ebff889a694f17826ca44
    1a02773b556a0efa277cf18cd099fc62a4e27706
    



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by wido <gi...@git.apache.org>.
Github user wido commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/784#discussion_r39248790
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py ---
    @@ -95,9 +95,25 @@ def get_control_if(self):
                     return ip
             return None
     
    +    def check_if_link_exists(self,dev):
    +        cmd="ip link show dev %s"%dev
    +        result=CsHelper.execute(cmd)
    +        if(len(result)!=0):
    +           return True
    +        else:
    +           return False
    +
    +    def check_if_link_up(self,dev):
    +        cmd="ip link show dev %s | tr '\n' ' ' | cut -d ' ' -f 9"%dev
    --- End diff --
    
    We should keep as much logic in Python as possible. The performance difference is small, but with tr and grep you spawn subprocessess again.
    
    But as @remibergsma says. Try to open that file in /sys and parse the contents. You can use the simple Python file functions.
    
    No need to execute IP. The less subprocesses we execute, the better.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by bvbharatk <gi...@git.apache.org>.
Github user bvbharatk commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/784#discussion_r39242678
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py ---
    @@ -105,8 +121,17 @@ def process(self):
                 ip = CsIP(dev, self.config)
     
                 for address in self.dbag[dev]:
    +                if(address["nw_type"]!="public"):
    +                    continue
    +
    +                #check if link is up
    +                if (not self.check_if_link_exists(dev)):
    +                    logging.info("link %s dose not exist, so not processing"%dev)
    --- End diff --
    
    fixed the typos.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by bvbharatk <gi...@git.apache.org>.
Github user bvbharatk commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/784#discussion_r39033655
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py ---
    @@ -95,9 +95,17 @@ def get_control_if(self):
                     return ip
             return None
     
    +    def check_if_link_up(self,dev):
    +        cmd="ip link show dev %s | tr '\n' ' ' | cut -d ' ' -f 9"%dev
    --- End diff --
    
    Hi, 
    
    the output of Ip link show command is not expected to changes so in this case i think hardcoding the limiters is not an issue. 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by kishankavala <gi...@git.apache.org>.
Github user kishankavala commented on the pull request:

    https://github.com/apache/cloudstack/pull/784#issuecomment-139513737
  
    After applying patch, was able to create VPC successfully.
    LGTM.
    Sub-process optimization is good to have. This PR will unblock the VPC creation.
    
    2015-09-11 15:59:15,169 DEBUG [c.c.a.t.Request] (AgentManager-Handler-8:null) Seq 297-1810728525179650071: Processing:  { Ans: , MgmtId: 233845178473044, via: 297, Ver: v1, Flags: 110, [{"com.cloud.agent.api.StartAnswer":{"vm":{"id":34,"name":"r-34-VM","type":"DomainRouter","cpus":1,"minSpeed":500,"maxSpeed":500,"minRam":268435456,"maxRam":268435456,"arch":"x86_64","os":"Debian GNU/Linux 5.0 (64-bit)","platformEmulator":"Debian GNU/Linux 5","bootArgs":" vpccidr=10.5.1.0/24 domain=cs2cloud.internal dns1=4.2.2.2 template=domP name=r-34-VM eth0ip=169.254.1.43 eth0mask=255.255.0.0 type=vpcrouter disable_rp_filter=true baremetalnotificationsecuritykey=s67s-w0ooifUaTiCWhF24OUfj8JSRhTKTs6N-2rlWY2tkkPo-F0nZOv1lKTIyXXs0ir4vv0hatiUHFaddZxiDw baremetalnotificationapikey=c9SUcsu8zctnSQmy43yhQB0HJM2HTDsRjEXd85s9IJOobOBRLaGZBa22vDH4IozJpIW8PHXVAFWu_W9qtdvYIA host=10.147.28.47 port=8080","enableHA":true,"limitCpuUse":false,"enableDynamicallyScaleVm":false,"vncPassword":"UOXbgiNACZU3NN8Rv6uvNg",
 "vncAddr":"10.147.28.43","params":{},"uuid":"4da3b373-17bc-4b4a-8b34-f32459faf341","disks":[{"data":{"org.apache.cloudstack.storage.to.VolumeObjectTO":{"uuid":"5e291e11-8043-4b67-9b41-aa55e71e8236","volumeType":"ROOT","dataStore":{"org.apache.cloudstack.storage.to.PrimaryDataStoreTO":{"uuid":"954526cd-d0f1-4a9e-b80a-902baad3faa2","id":3,"poolType":"Filesystem","host":"10.147.28.43","path":"/var/lib/libvirt/images","port":0,"url":"Filesystem://10.147.28.43/var/lib/libvirt/images/?ROLE=Primary&STOREUUID=954526cd-d0f1-4a9e-b80a-902baad3faa2"}},"name":"ROOT-34","size":3145728000,"path":"5e291e11-8043-4b67-9b41-aa55e71e8236","volumeId":34,"vmName":"r-34-VM","accountId":2,"format":"QCOW2","provisioningType":"THIN","id":34,"deviceId":0,"hypervisorType":"KVM"}},"diskSeq":0,"path":"5e291e11-8043-4b67-9b41-aa55e71e8236","type":"ROOT","_details":{"managed":"false","storagePort":"0","storageHost":"10.147.28.43","volumeSize":"3145728000"}}],"nics":[{"deviceId":0,"networkRateMbps":-1,"defaultNic"
 :false,"pxeDisable":true,"nicUuid":"588f728c-9de8-4b04-8fd4-7b03226c9ef2","uuid":"4c825977-669f-4777-9a44-a312952321c8","ip":"169.254.1.43","netmask":"255.255.0.0","gateway":"169.254.0.1","mac":"0e:00:a9:fe:01:2b","broadcastType":"LinkLocal","type":"Control","isSecurityGroupEnabled":false}]},"result":true,"wait":0}},{"com.cloud.agent.api.check.CheckSshAnswer":{"result":true,"wait":0}},{"com.cloud.agent.api.GetDomRVersionAnswer":{"templateVersion":"Cloudstack Release 4.6.0 Sun Jul 26 22:08:05 UTC 2015","scriptsVersion":"d6222468f4f35d173be74954631b18d2\n","result":true,"details":"Cloudstack Release 4.6.0 Sun Jul 26 22:08:05 UTC 2015&d6222468f4f35d173be74954631b18d2\n","wait":0}},{"com.cloud.agent.api.PlugNicAnswer":{"result":true,"details":"success","wait":0}},{"com.cloud.agent.api.routing.GroupAnswer":{"results":["null - success: null","null - success: [INFO] update_config.py :: Processing incoming file => ip_associations.json\n[INFO] Processing JSON file ip_associations.json\n"],"r
 esult":true,"wait":0}},{"com.cloud.agent.api.Answer":{"result":true,"details":"Nothing to do","wait":0}},{"com.cloud.agent.api.NetworkUsageAnswer":{"routerName":"r-34-VM","bytesSent":0,"bytesReceived":0,"result":true,"wait":0}}] }



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by remibergsma <gi...@git.apache.org>.
Github user remibergsma commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/784#discussion_r39178692
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py ---
    @@ -95,9 +95,25 @@ def get_control_if(self):
                     return ip
             return None
     
    +    def check_if_link_exists(self,dev):
    +        cmd="ip link show dev %s"%dev
    +        result=CsHelper.execute(cmd)
    +        if(len(result)!=0):
    +           return True
    +        else:
    +           return False
    +
    +    def check_if_link_up(self,dev):
    +        cmd="ip link show dev %s | tr '\n' ' ' | cut -d ' ' -f 9"%dev
    --- End diff --
    
    If you only want the state, why not simply do this? No magic needed.
    `cat /sys/class/net/eth0/operstate`


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by wido <gi...@git.apache.org>.
Github user wido commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/784#discussion_r39176449
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py ---
    @@ -95,9 +95,25 @@ def get_control_if(self):
                     return ip
             return None
     
    +    def check_if_link_exists(self,dev):
    +        cmd="ip link show dev %s"%dev
    +        result=CsHelper.execute(cmd)
    +        if(len(result)!=0):
    +           return True
    +        else:
    +           return False
    +
    +    def check_if_link_up(self,dev):
    +        cmd="ip link show dev %s | tr '\n' ' ' | cut -d ' ' -f 9"%dev
    --- End diff --
    
    I still think that we should do the splitting in Python.
    
    Execute ip with the -o flag so it is a one-liner and split with Python afterwards.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by wilderrodrigues <gi...@git.apache.org>.
Github user wilderrodrigues commented on the pull request:

    https://github.com/apache/cloudstack/pull/784#issuecomment-139137040
  
    Okay, @bvbharat ... thanks for the update. :)
    
    Cheers,
    Wilder


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by wido <gi...@git.apache.org>.
Github user wido commented on the pull request:

    https://github.com/apache/cloudstack/pull/784#issuecomment-139915266
  
    This one was merged, but it wasn't closed since something went wrong with the commit to master.
    
    @remibergsma, help? Any idea on how to close this PR?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by wido <gi...@git.apache.org>.
Github user wido commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/784#discussion_r39018553
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py ---
    @@ -95,9 +95,17 @@ def get_control_if(self):
                     return ip
             return None
     
    +    def check_if_link_up(self,dev):
    +        cmd="ip link show dev %s | tr '\n' ' ' | cut -d ' ' -f 9"%dev
    --- End diff --
    
    Indeed and also use the -o flag for 'ip':
    
     ip -o link show dev <dev>
    
    Then split the string using Python.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by wido <gi...@git.apache.org>.
Github user wido commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/784#discussion_r39176487
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py ---
    @@ -105,8 +121,17 @@ def process(self):
                 ip = CsIP(dev, self.config)
     
                 for address in self.dbag[dev]:
    +                if(address["nw_type"]!="public"):
    +                    continue
    +
    +                #check if link is up
    +                if (not self.check_if_link_exists(dev)):
    +                    logging.info("link %s dose not exist, so not processing"%dev)
    --- End diff --
    
    Typo in the logs here. dose = does


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by bvbharatk <gi...@git.apache.org>.
Github user bvbharatk closed the pull request at:

    https://github.com/apache/cloudstack/pull/784


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by remibergsma <gi...@git.apache.org>.
Github user remibergsma commented on the pull request:

    https://github.com/apache/cloudstack/pull/784#issuecomment-143234582
  
    This broke VPC default gateways, which was fixed in #738. Looking into a solution now.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by bvbharatk <gi...@git.apache.org>.
Github user bvbharatk commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/784#discussion_r39242176
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py ---
    @@ -95,9 +95,25 @@ def get_control_if(self):
                     return ip
             return None
     
    +    def check_if_link_exists(self,dev):
    +        cmd="ip link show dev %s"%dev
    +        result=CsHelper.execute(cmd)
    +        if(len(result)!=0):
    +           return True
    +        else:
    +           return False
    +
    +    def check_if_link_up(self,dev):
    +        cmd="ip link show dev %s | tr '\n' ' ' | cut -d ' ' -f 9"%dev
    --- End diff --
    
    Hi, 
    
    just out of curiosity why should we do the splitting in python and what is wrong in doing it this way.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by bvbharatk <gi...@git.apache.org>.
Github user bvbharatk commented on the pull request:

    https://github.com/apache/cloudstack/pull/784#issuecomment-138885057
  
    Hi @wilderrodrigues 
    
    will update once i am done testing against vpc networks.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by DaanHoogland <gi...@git.apache.org>.
Github user DaanHoogland commented on the pull request:

    https://github.com/apache/cloudstack/pull/784#issuecomment-139990182
  
    @wido you can ask @bvbharatk to close it or add the message
      This closes #784
     to a related PR commit (same functionality, I would suggest)


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by bhaisaab <gi...@git.apache.org>.
Github user bhaisaab commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/784#discussion_r38914728
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py ---
    @@ -95,9 +95,17 @@ def get_control_if(self):
                     return ip
             return None
     
    +    def check_if_link_up(self,dev):
    +        cmd="ip link show dev %s | tr '\n' ' ' | cut -d ' ' -f 9"%dev
    --- End diff --
    
    can we use a better string processing here, instead of using hardcoded cut/trim limits?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by wido <gi...@git.apache.org>.
Github user wido commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/784#discussion_r38897976
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsRedundant.py ---
    @@ -261,20 +261,9 @@ def set_master(self):
     
             self.set_lock()
             logging.debug("Setting router to master")
    -        ads = [o for o in self.address.get_ips() if o.is_public()]
    -        dev = ''
    -        for o in ads:
    -            if dev == o.get_device():
    -                continue
    -            cmd2 = "ip link set %s up" % o.get_device()
    -            if CsDevice(o.get_device(), self.config).waitfordevice():
    -                CsHelper.execute(cmd2)
    -                dev = o.get_device()
    -                logging.info("Bringing public interface %s up" %
    -                             o.get_device())
    -            else:
    -                logging.error(
    -                    "Device %s was not ready could not bring it up" % o.get_device())
    +        self.address.process()
    +        logging.info("added default rotue")
    --- End diff --
    
    There is a typo here. Could you fix that?
    
    Also, the logging could be more verbose. To what is the default route pointing? We should log that as well.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by remibergsma <gi...@git.apache.org>.
Github user remibergsma commented on the pull request:

    https://github.com/apache/cloudstack/pull/784#issuecomment-140101031
  
    @bvbharatk or @ke4qqq something went wrong with the auto-close (wasn't merged properly) Could either of you close this PR please? Thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by wilderrodrigues <gi...@git.apache.org>.
Github user wilderrodrigues commented on the pull request:

    https://github.com/apache/cloudstack/pull/784#issuecomment-138818591
  
    Hi @bvbharat ,
    
    Any news on this PR? 
    
    Cheers,
    Wilder


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by wilderrodrigues <gi...@git.apache.org>.
Github user wilderrodrigues commented on the pull request:

    https://github.com/apache/cloudstack/pull/784#issuecomment-138450694
  
    Hi @bvbharatk 
    
    couple of questions regarding your changes:
    
    1. There was also an issue with VPC VRs, which was reported/fixed here -> https://issues.apache.org/jira/browse/CLOUDSTACK-8685. Have you seen this issue? Does your change affects the VPC VR (single/redundant)?
    2. How did you test it? Could you please share the results of your test reports?
    
    I would expect at least the following tests to be executed:
    
    * component/test_vpc_routers.py
    * component/test_routers.py
    * component/test_vpc_redundant.py
    * smoke/test_vm_life_cycle.py
    
    Thanks in advance.
    
    Cheers,
    Wilder
    



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-8799 fixed the defalut routes

Posted by bvbharatk <gi...@git.apache.org>.
Github user bvbharatk commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/784#discussion_r39275218
  
    --- Diff: systemvm/patches/debian/config/opt/cloud/bin/cs/CsAddress.py ---
    @@ -95,9 +95,25 @@ def get_control_if(self):
                     return ip
             return None
     
    +    def check_if_link_exists(self,dev):
    +        cmd="ip link show dev %s"%dev
    +        result=CsHelper.execute(cmd)
    +        if(len(result)!=0):
    +           return True
    +        else:
    +           return False
    +
    +    def check_if_link_up(self,dev):
    +        cmd="ip link show dev %s | tr '\n' ' ' | cut -d ' ' -f 9"%dev
    --- End diff --
    
    Hi, 
    we have used the subprocess command to find the state of the device in two more places. I have created a improvement ticket(CLOUDSTACK-8837) to track this. I will work on this later, until then 
    i guess the current changes will do.
    



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---