set different VirtualDevice.key

Bug #1892961 reported by Yingji Sun
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Yingji Sun
Stein
Fix Released
Undecided
Elod Illes
Train
Fix Released
Undecided
Yingji Sun
Ussuri
Fix Released
Undecided
Yingji Sun
Victoria
Fix Released
Undecided
Yingji Sun

Bug Description

When creating an instance with multiple nics on vsphere 7, such as,

Create server using ports: "networks": [{"port": "1ff1fd0e-a7c1-400d-8ee4-d8b6c94ed33b"}, {"port": "87aee6b2-c76a-4f10-9eab-a23ff9694b34"}],

it will report error as below.

2020-02-03 22:56:02.654 13279 ERROR nova.compute.manager [req-b1ec16f5-e529-4c98-9a4c-4cb8782489d2 a2fa852dc11546dfaf4bb2d9c0460dcf ee69d923dc594779a5775abd2077bea8 - default default] [instance: a80f85ce-2c16-4022-b01e-fb6953243fc0] Instance failed to spawn: VimFaultException: Network interface 'VirtualE1000' uses network 'nsx.LogicalSwitch:3a603a1c-4df4-4b09-afd1-ac9b56979f5e', which is not accessible.

The root cause is that starting from vsphere 7, VirtualDevice.key cannot be the same any more.

Original the request to vcenter is

--> deviceChange = (vim.vm.device.VirtualDeviceSpec) [
--> (vim.vm.device.VirtualDeviceSpec) {
--> operation = "add",
--> device = (vim.vm.device.VirtualE1000) {
--> key = -47,
--> backing = (vim.vm.device.VirtualEthernetCard.OpaqueNetworkBackingInfo) {
--> opaqueNetworkId = "9c0d11f9-8388-465f-9a78-988134d44ab7",
--> opaqueNetworkType = "nsx.LogicalSwitch"
--> },
--> connectable = (vim.vm.device.VirtualDevice.ConnectInfo) {
--> startConnected = true,
--> allowGuestControl = true,
--> connected = true,
--> },
--> addressType = "manual",
--> macAddress = "fa:16:3e:58:a9:24",
--> wakeOnLanEnabled = true,
--> externalId = "1ff1fd0e-a7c1-400d-8ee4-d8b6c94ed33b",
--> },
--> },
--> (vim.vm.device.VirtualDeviceSpec) {
--> operation = "add",
--> device = (vim.vm.device.VirtualE1000) {
--> key = -47,
--> backing = (vim.vm.device.VirtualEthernetCard.OpaqueNetworkBackingInfo) {
--> opaqueNetworkId = "00b14b88-4650-40c9-8216-f188b3f865cf",

--> opaqueNetworkType = "nsx.LogicalSwitch"
--> },
--> connectable = (vim.vm.device.VirtualDevice.ConnectInfo) {
--> startConnected = true,
--> allowGuestControl = true,
--> connected = true,
--> },
--> addressType = "manual",
--> macAddress = "fa:16:3e:fc:d7:20",
--> wakeOnLanEnabled = true,
--> externalId = "87aee6b2-c76a-4f10-9eab-a23ff9694b34",
--> },
--> },

We need to change 'key' to different values.

Yingji Sun (yingjisun)
Changed in nova:
assignee: nobody → Yingji Sun (yingjisun)
Yingji Sun (yingjisun)
Changed in nova:
status: New → In Progress
Yingji Sun (yingjisun)
Changed in nova:
status: In Progress → Fix Committed
Yingji Sun (yingjisun)
Changed in nova:
status: Fix Committed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.opendev.org/713565
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=a5d153a4c64f6947531823c0df91be5cbc491977
Submitter: Zuul
Branch: master

commit a5d153a4c64f6947531823c0df91be5cbc491977
Author: yingjisun <email address hidden>
Date: Wed Feb 26 21:31:41 2020 +0800

    Set different VirtualDevice.key

    In vSphere 7.0, the VirtualDevice.key cannot be the same any more.
    So set different values to VirtualDevice.key

    Change-Id: I574ed88729d2f0760ea4065cc0e542eea8d20cc2
    Closes-Bug: #1892961

Changed in nova:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/749415

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/749418

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/ussuri)

Reviewed: https://review.opendev.org/749418
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0ea5bcca9d7bebf835b173c5e75dc89e666bcb99
Submitter: Zuul
Branch: stable/ussuri

commit 0ea5bcca9d7bebf835b173c5e75dc89e666bcb99
Author: yingjisun <email address hidden>
Date: Wed Feb 26 21:31:41 2020 +0800

    Set different VirtualDevice.key

    In vSphere 7.0, the VirtualDevice.key cannot be the same any more.
    So set different values to VirtualDevice.key

    Change-Id: I574ed88729d2f0760ea4065cc0e542eea8d20cc2
    Closes-Bug: #1892961
    (cherry picked from commit a5d153a4c64f6947531823c0df91be5cbc491977)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/752843

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (stable/train)

Change abandoned by Yingji Sun (<email address hidden>) on branch: stable/train
Review: https://review.opendev.org/752843
Reason: Abandon this and re cherry-pick from ussuri

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/train)

Reviewed: https://review.opendev.org/752843
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=75c0327a67bf12f4b18d6bb1561fc34bb7081264
Submitter: Zuul
Branch: stable/train

commit 75c0327a67bf12f4b18d6bb1561fc34bb7081264
Author: yingjisun <email address hidden>
Date: Wed Feb 26 21:31:41 2020 +0800

    Set different VirtualDevice.key

    In vSphere 7.0, the VirtualDevice.key cannot be the same any more.
    So set different values to VirtualDevice.key

    Change-Id: I574ed88729d2f0760ea4065cc0e542eea8d20cc2
    Closes-Bug: #1892961
    (cherry picked from commit a5d153a4c64f6947531823c0df91be5cbc491977)
    (cherry picked from commit 0ea5bcca9d7bebf835b173c5e75dc89e666bcb99)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/stein)

Reviewed: https://review.opendev.org/749415
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0e3f9a4b3fe2137c2c92d345d44f8a932a2e7c14
Submitter: Zuul
Branch: stable/stein

commit 0e3f9a4b3fe2137c2c92d345d44f8a932a2e7c14
Author: yingjisun <email address hidden>
Date: Wed Feb 26 21:31:41 2020 +0800

    Set different VirtualDevice.key

    In vSphere 7.0, the VirtualDevice.key cannot be the same any more.
    So set different values to VirtualDevice.key

    Change-Id: I574ed88729d2f0760ea4065cc0e542eea8d20cc2
    Closes-Bug: #1892961
    (cherry picked from commit a5d153a4c64f6947531823c0df91be5cbc491977)
    (cherry picked from commit 0ea5bcca9d7bebf835b173c5e75dc89e666bcb99)
    (cherry picked from commit 75c0327a67bf12f4b18d6bb1561fc34bb7081264)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.