Project

General

Profile

Bug #5483

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

Added by Ronny M about 5 years ago. Updated 11 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources - VMware
Target version:
Team Backlog:
Fixed in Releases:
Found in Releases:

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 View new_clonevm_config.png 52.8 KB Ronny M, 04/29/2014 10:11 AM
clonevm-overview.png View clonevm-overview.png 82.1 KB Ronny M, 04/29/2014 10:11 AM
clonevm_network_config.png View clonevm_network_config.png 31.1 KB Ronny M, 04/29/2014 10:11 AM
clonevm-network_labels.png View clonevm-network_labels.png 31.6 KB Ronny M, 04/29/2014 10:11 AM
clonevm-changed-network-config.png View clonevm-changed-network-config.png 32.2 KB Ronny M, 04/29/2014 10:12 AM
clonevm-overview-after-manual-change.png View clonevm-overview-after-manual-change.png 81.3 KB 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 labels in VmWareClosed2014-05-08
Related to Foreman - Bug #7740: Installing from VMware Image breaks distributed Port Group supportClosed2014-09-29
Related to Foreman - Bug #8047: VM creation with distributed switch fails: "A component of the virtual machine is not accessible on the host."Rejected2014-10-23
Blocked by Foreman - Refactor #12494: Update fog to 1.36.0Closed2015-11-16

Associated revisions

Revision d4af7cae (diff)
Added by Ivan Necas over 2 years 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.

Revision 443412c1 (diff)
Added by Ivan Necas over 2 years 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.
(cherry picked from commit d4af7cae07f78bd047290e68af37b55122e0ed4b)

History

#1 Updated by Dominic Cleal about 5 years ago

  • Category set to Compute resources

#2 Updated by Ronny M about 5 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 5 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 5 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 5 years ago

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

#6 Updated by Dominic Cleal over 4 years ago

  • Category changed from Compute resources to Compute resources - VMware

#7 Updated by Dominic Cleal about 4 years ago

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

#8 Updated by Dominic Cleal about 4 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 about 4 years ago

I am seeing the same behavior without distributed port groups.

#10 Updated by Ivan Necas over 3 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 over 3 years ago

  • Status changed from New to Assigned
  • Assignee set to Ivan Necas
  • Target version set to 1.7.2

#12 Updated by The Foreman Bot over 3 years ago

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

#13 Updated by Ivan Necas over 3 years ago

  • Bugzilla link set to 1262913

#14 Updated by Dominic Cleal over 3 years ago

#15 Updated by Ivan Necas over 2 years ago

  • Target version changed from 1.7.2 to 1.15.3

#16 Updated by The Foreman Bot over 2 years ago

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

#17 Updated by Ivan Necas over 2 years ago

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

#18 Updated by Dominic Cleal over 2 years ago

  • Legacy Backlogs Release (now unused) set to 210

Also available in: Atom PDF