DaanHoogland commented on issue #2540: problem adding new shared network NIC to VM "A NIC with this MAC address exits for network:" URL: https://github.com/apache/cloudstack/issues/2540#issuecomment-389517279 @GabrielBrascher , I think some iusers will need plugable macaddress generation algorithms but for this specific issue we could just add the following bit ``` if(null == macAddress) { try { macAddress = _networkModel.getNextAvailableMacAddressInNetwork(network.getId()) } catch (InsufficientAddressCapacityException e) { throw new CloudRuntimeException("A MAC address can not be generated for this NIC in network: " + network.getUuid()); } } ``` before ``` if(_nicDao.findByNetworkIdAndMacAddress(networkId, macAddress) != null) { throw new CloudRuntimeException("A NIC with this MAC address exists for network: " + network.getUuid()); } ``` as it seems to be a problem when the macaddress given is null. If it is an actual MAC it is a user mistake.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
