echoidcf opened a new issue #4246:
URL: https://github.com/apache/cloudstack/issues/4246


   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and master branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete 
the comments.
   -->
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   VR
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on master 
branch.
   -->
   
   ~~~
   All version is affected
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, 
advanced networking, etc.  N/A otherwise
   -->
   multiple public networks
   
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   in this file
   
/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
   
   if (addVif) {
                       plugPublicNic(vmMo, vlanId, ip);
                       publicNicInfo = vmMo.getNicDeviceIndex(publicNeworkName);
                       if (publicNicInfo.first().intValue() >= 0) {
                           networkUsage(controlIp, "addVif", "eth" + 
publicNicInfo.first());
                       }
                   }
   Whenever a new public nic in VR is needed, plugPublicNic is called.
   and plugPublicNic get nic infos via vmware API and did not sort the result. 
(should be vmMo.getNicDevices(true))
   VirtualDevice[] nicDevices = vmMo.getNicDevices();
   
   You sort the nic devices in vmMo.getNicDeviceIndex(publicNeworkName); like 
below, why not in plugPublicNic()???
   List<VirtualDevice> nics = getNicDevices(true);
   
   In our environment, some VR devices looks like this (via vmware mob 
browser), which should not be a problem.
   But cloudstack will attach the the new network to the 4th 
virtualethernetcard device which is 4002, and cut down everything in public 
network.
    
   NAME TYPE    VALUE
   device       VirtualDevice[] 
   device[200]  VirtualIDEController
   device[201]  VirtualIDEController
   device[300]  VirtualPS2Controller
   device[100]  VirtualPCIController
   device[400]  VirtualSIOController
   device[600]  VirtualKeyboard
   device[700]  VirtualPointingDevice
   device[500]  VirtualMachineVideoCard
   device[12000]        VirtualMachineVMCIDevice
   device[1000] VirtualLsiLogicController
   device[3000] VirtualCdrom
   device[4006] VirtualVmxnet3
   device[4005] VirtualVmxnet3
   device[4003] VirtualVmxnet3
   device[4002] VirtualVmxnet3
   device[4000] VirtualVmxnet3
   device[2000] VirtualDisk
   device[4001] VirtualVmxnet3
   device[4004] VirtualVmxnet3
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal 
test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   
   <!-- Paste example playbooks or commands between quotes below -->
   ~~~
   We do not have exactly way to make esxi/vcenter return result like this.
   Maybe a upgrade and restart the vcenter.
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   4003 SHOULD be connected to 2nd public network
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   2nd is connected to 4002 and original 4002 configuration is overwrited.
   ~~~
   


----------------------------------------------------------------
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:
[email protected]


Reply via email to