You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@git.apache.org on 2017/05/23 12:50:26 UTC

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

borisstoyanov 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_r117981173
 
 

 ##########
 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:
   @rhtyd @ustcweizhou I can't reproduce this on 4.9.2 without the fix. Here's what I've tried:
   
   1. I've created a 2 tier VPC
   2. Deployed a VM into Tier1
   3. When it started, I've added a new NIC (Tier2) 
   4. Restarted the VM
   5. VM booted up with no problem, IPs got assigned
   
   ![screen shot 2017-05-23 at 3 48 54 pm](https://cloud.githubusercontent.com/assets/13551960/26354927/6d022e56-3fcf-11e7-9c28-69abade2f527.png)
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services