Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-10350

problem adding new shared network NIC to VM "A NIC with this MAC address exits for network:"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Duplicate
    • 4.11.0.0
    • None
    • Network Devices
    • Security Level: Public (Anyone can view this level - this is the default.)
    • None

    Description

      After upgrading a working 4.9.2 setup to 4.11.0.0 we've noticed that we're unable to add a NIC (shared network) to a running VM via GUI.
      The Error is "A NIC with this MAC address exits for network: (uuid of the current (other NIC) network)"
      Using cloudmonkey and giving a self-computed MAC-address does not rise the error and works as expected.

      After digging into the code, I think I've found the problem, but am too bad in java to provide a sustainable fix.

      I've attached a patch which obviously (with own manual tests) fixes that issue by simply commenting out the respective codeblock.

      As far as I dug into the code, the third parameter of NicProfile is handled by 

      NetUtils.long2Mac(NetUtils.createSequenceBasedMacAddress(ipVO.getMacAddress(), NetworkModel.MACIdentifier.value())

      inside

      NicProfileHelperImpl.java

      I assume createSequenceBasedMacAddress can handle null as MAC, but doesn't get called at all if 

      _nicDao.findByNetworkIdAndMacAddress(networkId, macAddress) results != null if macAddress is null.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sseitz Stephan Seitz
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: