This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.11
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.11 by this push:
     new 3212ce5  systemvm: Fixes #2805 set gateway to empty string than None 
to avoid arping on 'None' (#2806)
3212ce5 is described below

commit 3212ce51e7a54c1d82cd545a466d1c89d9bcc607
Author: Luiz Henrique <lhlmach...@gmail.com>
AuthorDate: Tue Aug 28 07:27:10 2018 -0300

    systemvm: Fixes #2805 set gateway to empty string than None to avoid arping 
on 'None' (#2806)
    
    Arping command in virtual-router was called anyway on python code.
    
    on file: merge.py
    line 239, in this code : "dp['gateway'] ='None' ''
    
    later on CsAddress.py line 303
    
    if 'gateway' in self.address:
    self.arpPing()
    
    This string 'None' makes if steatement always be true
    the solution on #2806 makes dp['gateway'] =''
    
    Cannot be None type because there is a string operation later on code.
    
    Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com>
---
 systemvm/debian/opt/cloud/bin/merge.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/systemvm/debian/opt/cloud/bin/merge.py 
b/systemvm/debian/opt/cloud/bin/merge.py
index 0aaa340..eccb194 100755
--- a/systemvm/debian/opt/cloud/bin/merge.py
+++ b/systemvm/debian/opt/cloud/bin/merge.py
@@ -236,7 +236,7 @@ class updateDataBag:
                 if('localgw' in self.qFile.data['cmd_line']):
                     dp['gateway'] = self.qFile.data['cmd_line']['localgw']
                 else:
-                    dp['gateway'] = 'None'
+                    dp['gateway'] = ''
             dp['nic_dev_id'] = num
             dp['nw_type'] = nw_type
             qf = QueueFile()

Reply via email to