[GitHub] rhtyd commented on a change in pull request #2082: CLOUDSTACK-9017 : VPC VR DHCP broken for multihomed guest VMs

2017-05-18 Thread git
rhtyd commented on a change in pull request #2082: CLOUDSTACK-9017 : VPC VR 
DHCP broken for multihomed guest VMs
URL: https://github.com/apache/cloudstack/pull/2082#discussion_r117178421
 
 

 ##
 File path: systemvm/patches/debian/config/opt/cloud/bin/cs_dhcp.py
 ##
 @@ -34,16 +34,14 @@ def merge(dbag, data):
 return dbag
 
 
-def search(dbag, name):
+def search(dbag, name, gateway):
 """
 Dirty hack because CS does not deprovision hosts
 """
 hosts = []
 for o in dbag:
 if o == 'id':
 continue
-print "%s %s" % (dbag[o]['host_name'], name)
-if dbag[o]['host_name'] == name:
+print "%s %s %s" % (dbag[o]['host_name'], name, gateway)
+if dbag[o]['host_name'] == name and dbag[o]['default_gateway'] == 
gateway :
 hosts.append(o)
-for o in hosts:
 
 Review comment:
   @niteshsarda I would put this on hold until we've some insights from 
@ustcweizhou @DaanHoogland and others
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on a change in pull request #2082: CLOUDSTACK-9017 : VPC VR DHCP broken for multihomed guest VMs

2017-05-15 Thread git
rhtyd commented on a change in pull request #2082: CLOUDSTACK-9017 : VPC VR 
DHCP broken for multihomed guest VMs
URL: https://github.com/apache/cloudstack/pull/2082#discussion_r116440523
 
 

 ##
 File path: systemvm/patches/debian/config/opt/cloud/bin/cs_dhcp.py
 ##
 @@ -34,16 +34,14 @@ def merge(dbag, data):
 return dbag
 
 
-def search(dbag, name):
+def search(dbag, name, gateway):
 """
 Dirty hack because CS does not deprovision hosts
 """
 hosts = []
 for o in dbag:
 if o == 'id':
 continue
-print "%s %s" % (dbag[o]['host_name'], name)
-if dbag[o]['host_name'] == name:
+print "%s %s %s" % (dbag[o]['host_name'], name, gateway)
+if dbag[o]['host_name'] == name and dbag[o]['default_gateway'] == 
gateway :
 hosts.append(o)
-for o in hosts:
 
 Review comment:
   I'll let @ustcweizhou, @remibergsma and @DaanHoogland comment on this -- 
have you guys seen such an issue?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on a change in pull request #2082: CLOUDSTACK-9017 : VPC VR DHCP broken for multihomed guest VMs

2017-05-15 Thread git
rhtyd commented on a change in pull request #2082: CLOUDSTACK-9017 : VPC VR 
DHCP broken for multihomed guest VMs
URL: https://github.com/apache/cloudstack/pull/2082#discussion_r116437439
 
 

 ##
 File path: systemvm/patches/debian/config/opt/cloud/bin/cs_dhcp.py
 ##
 @@ -34,16 +34,14 @@ def merge(dbag, data):
 return dbag
 
 
-def search(dbag, name):
+def search(dbag, name, gateway):
 """
 Dirty hack because CS does not deprovision hosts
 """
 hosts = []
 for o in dbag:
 if o == 'id':
 continue
-print "%s %s" % (dbag[o]['host_name'], name)
-if dbag[o]['host_name'] == name:
+print "%s %s %s" % (dbag[o]['host_name'], name, gateway)
+if dbag[o]['host_name'] == name and dbag[o]['default_gateway'] == 
gateway :
 hosts.append(o)
-for o in hosts:
 
 Review comment:
   Cool, thanks @ustcweizhou 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on a change in pull request #2082: CLOUDSTACK-9017 : VPC VR DHCP broken for multihomed guest VMs

2017-05-15 Thread git
rhtyd commented on a change in pull request #2082: CLOUDSTACK-9017 : VPC VR 
DHCP broken for multihomed guest VMs
URL: https://github.com/apache/cloudstack/pull/2082#discussion_r116431317
 
 

 ##
 File path: systemvm/patches/debian/config/opt/cloud/bin/cs_dhcp.py
 ##
 @@ -34,16 +34,14 @@ def merge(dbag, data):
 return dbag
 
 
-def search(dbag, name):
+def search(dbag, name, gateway):
 """
 Dirty hack because CS does not deprovision hosts
 """
 hosts = []
 for o in dbag:
 if o == 'id':
 continue
-print "%s %s" % (dbag[o]['host_name'], name)
-if dbag[o]['host_name'] == name:
+print "%s %s %s" % (dbag[o]['host_name'], name, gateway)
+if dbag[o]['host_name'] == name and dbag[o]['default_gateway'] == 
gateway :
 hosts.append(o)
-for o in hosts:
 
 Review comment:
   @ustcweizhou @niteshsarda on searching should we be removing the hosts from 
databag? i.e. should be keep or remove:
   ```
   for o in hosts:
   del(dbag[o])
   ```
   
   By removing the `del` code, the search method effectively does nothing other 
than printing stuff.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on a change in pull request #2082: CLOUDSTACK-9017 : VPC VR DHCP broken for multihomed guest VMs

2017-05-15 Thread git
rhtyd commented on a change in pull request #2082: CLOUDSTACK-9017 : VPC VR 
DHCP broken for multihomed guest VMs
URL: https://github.com/apache/cloudstack/pull/2082#discussion_r116431317
 
 

 ##
 File path: systemvm/patches/debian/config/opt/cloud/bin/cs_dhcp.py
 ##
 @@ -34,16 +34,14 @@ def merge(dbag, data):
 return dbag
 
 
-def search(dbag, name):
+def search(dbag, name, gateway):
 """
 Dirty hack because CS does not deprovision hosts
 """
 hosts = []
 for o in dbag:
 if o == 'id':
 continue
-print "%s %s" % (dbag[o]['host_name'], name)
-if dbag[o]['host_name'] == name:
+print "%s %s %s" % (dbag[o]['host_name'], name, gateway)
+if dbag[o]['host_name'] == name and dbag[o]['default_gateway'] == 
gateway :
 hosts.append(o)
-for o in hosts:
 
 Review comment:
   @ustcweizhou @niteshsarda on searching should we be removing the hosts from 
databag? i.e. should be keep or remove:
   ```
   for o in hosts:
   del(dbag[o])
   ```
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rhtyd commented on a change in pull request #2082: CLOUDSTACK-9017 : VPC VR DHCP broken for multihomed guest VMs

2017-05-15 Thread git
rhtyd commented on a change in pull request #2082: CLOUDSTACK-9017 : VPC VR 
DHCP broken for multihomed guest VMs
URL: https://github.com/apache/cloudstack/pull/2082#discussion_r116431317
 
 

 ##
 File path: systemvm/patches/debian/config/opt/cloud/bin/cs_dhcp.py
 ##
 @@ -34,16 +34,14 @@ def merge(dbag, data):
 return dbag
 
 
-def search(dbag, name):
+def search(dbag, name, gateway):
 """
 Dirty hack because CS does not deprovision hosts
 """
 hosts = []
 for o in dbag:
 if o == 'id':
 continue
-print "%s %s" % (dbag[o]['host_name'], name)
-if dbag[o]['host_name'] == name:
+print "%s %s %s" % (dbag[o]['host_name'], name, gateway)
+if dbag[o]['host_name'] == name and dbag[o]['default_gateway'] == 
gateway :
 hosts.append(o)
-for o in hosts:
 
 Review comment:
   @ustcweizhou @niteshsarda on searching should we be removing the hosts from 
databag? i.e. should be keep or remove:
   ```
   for o in hosts:
   del(dbag[o])
   ```
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services