ustcweizhou commented on a change in pull request #3227: ubuntu16:  fix three 
issues with ubuntu 16.04 hosts
URL: https://github.com/apache/cloudstack/pull/3227#discussion_r279762470
 
 

 ##########
 File path: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
 ##########
 @@ -914,6 +915,20 @@ public boolean configure(final String name, final 
Map<String, Object> params) th
             throw new CloudRuntimeException(e.getMessage());
         }
 
+        // destroy default network, see 
https://libvirt.org/sources/java/javadoc/org/libvirt/Network.html
+        try {
+            Network network = conn.networkLookupByName("default");
+            s_logger.debug("Found libvirt default network, destroying it and 
setting autostart to false");
+            if (network.isActive() == 1) {
+                network.destroy();
+            }
+            if (network.getAutostart()) {
 
 Review comment:
   @rhtyd 
   I checked the code again, the packaging/debian/cloudstack-agent.init will be 
packaged in ubuntu/debs and deployed on ubuntu servers as 
/etc/init.d/cloudstack-agent. 
   Since we do not support ubuntu 12.04 any more , and systemd is used in 
ubuntu 14.04 and later, I think this change will not break other functions.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Reply via email to