Bug #5483

Network label empty after cloning vware vm using image and distributed switch for network

Added by Ronny M about 3 years ago. Updated 7 months ago.

Status:Closed
Priority:Normal
Assigned To:Ivan Necas
Category:Compute resources - VMware
Target version:Team Ivan Iteration 7
Difficulty: Bugzilla link:1262913
Found in release:1.5.0 Pull request:https://github.com/theforeman/foreman/pull/4074, https://github.com/theforeman/foreman/pull/2714
Story points-
Velocity based estimate-
Release1.14.1Release relationshipAuto

Description

Foreman 1.5.0 RC2 (and RC1)
exsi5, Vspere 5.0.0
CentOS 6.2

When creating a vmware vm using image (template) with a distributed switch configured the cloned vm has an inactive network and empty label.

Attached the following screendumps.

New vm with name clonevm.localdomain config, before submit (Nic type: VMXNET3 and Network: DvPortGroup):
-new_clonevm_config.png

Created VM (clonevm.localdomain) with inactive dvPortGroup.
- clonevm-overview.png

Empty Network Label in edit page of cloned vm:
- clonevm_network_config.png

Available labels for network config of clonevm.localdomain:
- clonevm-network_labels.png

Manual Change Network to dvPortGroup(switch2):
- clonevm-changed-network-config.png

Overview with active DvPortGroup:
- clonevm-overview-after-manual-change.png

new_clonevm_config.png (52.8 KB) Preview Ronny M, 04/29/2014 10:11 AM

clonevm-overview.png (82.1 KB) Preview Ronny M, 04/29/2014 10:11 AM

clonevm_network_config.png (31.1 KB) Preview Ronny M, 04/29/2014 10:11 AM

clonevm-network_labels.png (31.6 KB) Preview Ronny M, 04/29/2014 10:11 AM

clonevm-changed-network-config.png (32.2 KB) Preview Ronny M, 04/29/2014 10:12 AM

clonevm-overview-after-manual-change.png (81.3 KB) Preview Ronny M, 04/29/2014 10:12 AM

New_clonevm_config Clonevm-overview Clonevm_network_config Clonevm-network_labels Clonevm-changed-network-config Clonevm-overview-after-manual-change

Related issues

Related to Foreman - Bug #5630: VmWare clone from template fails if Network Adator has la... Closed 05/08/2014
Related to Foreman - Bug #7740: Installing from VMware Image breaks distributed Port Grou... Closed 09/29/2014
Related to Foreman - Bug #8047: VM creation with distributed switch fails: "A component o... Rejected 10/23/2014
Blocked by Foreman - Refactor #12494: Update fog to 1.36.0 Closed 11/16/2015

Associated revisions

Revision d4af7cae
Added by Ivan Necas 7 months ago

Fixes #5483,#11106 - pass the virtualswitch value to fog

We can't pass the network id directly to the fog, but it accepts the
virtualswitch parameter, that we can use to point to the right value.

Also, it fixes another issue, where we used the vsphere network id to
match against the interface network value, in case of portgroup, but a
`key` value should be used instead, as the key and id might differ in
some situations.

History

#1 Updated by Dominic Cleal about 3 years ago

  • Category set to Compute resources

#2 Updated by Ronny M about 3 years ago

Hope you can reproduce this.

Because I also have this while creating a host thats not based on an image.

Doesn't mater if I use dvPortGroup or dvSwitch2-DVUplinks-253. (Although not sure if both should be available for selection)

Not sure why but during the 10 test that I did that where about creating a host (not image) I once got the below unexpected error but host was still created.

Warning!
undefined method `json?' for nil:NilClass

#3 Updated by Ronny M about 3 years ago

Might have to do with host name "new"?

Started GET "/hosts/new.localdomain" for 192.168.88.1 at 2014-04-29 12:19:08 -0700
Processing by HostsController#new as
Operation FAILED: undefined method `json?' for nil:NilClass
Rendered common/500.html.erb (4.0ms)
Completed 500 Internal Server Error in 8ms (Views: 6.1ms | ActiveRecord: 0.4ms)

#4 Updated by Ronny M about 3 years ago

Yes can reproduce. Hosts with name new produce the undefined method `json?' for nil:NilClass error.

Luckily we don't create host with such a name in production.

#5 Updated by Dominic Cleal about 3 years ago

  • Related to Bug #5630: VmWare clone from template fails if Network Adator has labels in VmWare added

#6 Updated by Dominic Cleal almost 3 years ago

  • Category changed from Compute resources to Compute resources - VMware

#7 Updated by Dominic Cleal over 2 years ago

  • Related to Bug #7740: Installing from VMware Image breaks distributed Port Group support added

#8 Updated by Dominic Cleal over 2 years ago

  • Related to Bug #8047: VM creation with distributed switch fails: "A component of the virtual machine is not accessible on the host." added

#9 Updated by Chris Pisano over 2 years ago

I am seeing the same behavior without distributed port groups.

#10 Updated by Ivan Necas almost 2 years ago

Does it even make sense to talk about labels for non-distributed port groups?

Ad. the original issue, we've seen this behavior, if some VMs were mistakenly set
to the specific network, but non-distributed ports, the standard network started
being used as the default one.

The solution seems to not group the network interface just but the network name, but
having there also selection for every possible label.

#11 Updated by Ivan Necas almost 2 years ago

  • Status changed from New to Assigned
  • Assigned To set to Ivan Necas
  • Target version set to Sprint 30

#12 Updated by The Foreman Bot almost 2 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2714 added

#13 Updated by Ivan Necas almost 2 years ago

  • Bugzilla link set to 1262913

#14 Updated by Dominic Cleal over 1 year ago

#15 Updated by Ivan Necas 8 months ago

  • Target version changed from Sprint 30 to Team Ivan Iteration 7

#16 Updated by The Foreman Bot 8 months ago

  • Pull request https://github.com/theforeman/foreman/pull/4074 added

#17 Updated by Ivan Necas 7 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#18 Updated by Dominic Cleal 7 months ago

  • Release set to 1.14.1

Also available in: Atom PDF