vmware / vic

vSphere Integrated Containers Engine is a container runtime for vSphere.
http://vmware.github.io/vic
Other
639 stars 173 forks source link

Cosmetic - nicer error when all hosts not connected to DVS #1647

Open cormachogan opened 8 years ago

cormachogan commented 8 years ago

VIC Version:

0.1 / master / 3190

This is simply a request to see if we could make a nicer error/warning when some of the hosts in the cluster are not attached to the DVS, and thus do not have access to the bridge network (this is a deployment to a vCenter obviously)

Here is the error:

root@photon-NaTv5i8IA [ /workspace/vic ]# ./vic-machine-linux create --bridge-network Bridge-DPG --image-datastore vsanDatastore  -t 'administrator@vsphere.local:VMware123!@10.27.51.103' --compute-resource Mgmt
INFO[2016-07-25T09:37:17Z] ### Installing VCH ####
INFO[2016-07-25T09:37:17Z] Generating certificate/key pair - private key in ./virtual-container-host-key.pem
INFO[2016-07-25T09:37:18Z] Validating supplied configuration
INFO[2016-07-25T09:37:18Z] Firewall status: ENABLED on "/CNA-DC/host/Mgmt/10.27.51.10"
INFO[2016-07-25T09:37:18Z] Firewall status: ENABLED on "/CNA-DC/host/Mgmt/10.27.51.8"
INFO[2016-07-25T09:37:18Z] Firewall status: ENABLED on "/CNA-DC/host/Mgmt/10.27.51.9"
INFO[2016-07-25T09:37:18Z] Firewall configuration OK on hosts:
INFO[2016-07-25T09:37:18Z]   "/CNA-DC/host/Mgmt/10.27.51.10"
INFO[2016-07-25T09:37:18Z]   "/CNA-DC/host/Mgmt/10.27.51.8"
INFO[2016-07-25T09:37:18Z]   "/CNA-DC/host/Mgmt/10.27.51.9"
INFO[2016-07-25T09:37:18Z] License check OK on hosts:
INFO[2016-07-25T09:37:18Z]   "/CNA-DC/host/Mgmt/10.27.51.10"
INFO[2016-07-25T09:37:18Z]   "/CNA-DC/host/Mgmt/10.27.51.8"
INFO[2016-07-25T09:37:18Z]   "/CNA-DC/host/Mgmt/10.27.51.9"
INFO[2016-07-25T09:37:18Z] DRS check OK on:
INFO[2016-07-25T09:37:18Z]   "/CNA-DC/host/Mgmt/Resources"
INFO[2016-07-25T09:37:18Z] Creating virtual app "virtual-container-host"
INFO[2016-07-25T09:37:18Z] Creating appliance on target
INFO[2016-07-25T09:37:18Z] Network role "external" is sharing NIC with "management"
INFO[2016-07-25T09:37:18Z] Network role "client" is sharing NIC with "management"
ERRO[2016-07-25T09:37:20Z] Operation failed: A specified parameter was not correct: spec.deviceChange.device.port.switchUuid - (&{{} %!!(MISSING)s(*types.InvalidArgument=&{{{<nil> [{{} com.vmware.vim.vpxd.dvs.nonHostMember.label [{{} host 10.27.51.8} {{} dvs DSwitch}] Host 10.27.51.8 is not a member of VDS DSwitch}]}} spec.deviceChange.device.port.switchUuid}) A specified parameter was not correct: spec.deviceChange.device.port.switchUuid})
ERRO[2016-07-25T09:37:20Z] Unable to create appliance VM: Operation failed: A specified parameter was not correct: spec.deviceChange.device.port.switchUuid - (&{{} %!s(*types.InvalidArgument=&{{{<nil> [{{} com.vmware.vim.vpxd.dvs.nonHostMember.label [{{} host 10.27.51.8} {{} dvs DSwitch}] Host 10.27.51.8 is not a member of VDS DSwitch}]}} spec.deviceChange.device.port.switchUuid}) A specified parameter was not correct: spec.deviceChange.device.port.switchUuid})
INFO[2016-07-25T09:37:20Z] Collecting a0522635-224e-4171-92b1-7edaf726b39f vpxd.log
ERRO[2016-07-25T09:37:21Z] --------------------
ERRO[2016-07-25T09:37:21Z] vic-machine-linux failed: Creating the appliance failed with Operation failed: A specified parameter was not correct: spec.deviceChange.device.port.switchUuid - (&{{} %!s(*types.InvalidArgument=&{{{<nil> [{{} com.vmware.vim.vpxd.dvs.nonHostMember.label [{{} host 10.27.51.8} {{} dvs DSwitch}] Host 10.27.51.8 is not a member of VDS DSwitch}]}} spec.deviceChange.device.port.switchUuid}) A specified parameter was not correct: spec.deviceChange.device.port.switchUuid}). Exiting...

root@photon-NaTv5i8IA [ /workspace/vic ]#

Expected behavior:

Could we product a more human readable error? Even though all the information is in there, the output is not pretty.

Actual behavior:

As above.

hickeng commented 8 years ago

I'm seeing the same issue for dVS not found:

ERRO[2016-08-24T21:03:06Z] --------------------
ERRO[2016-08-24T21:03:06Z] network 'VMExternal' not found
ERRO[2016-08-24T21:03:06Z] Unable to check hosts in vDS for "VMExternal": ServerFaultCode:
Error processing attribute "type" with value ""

while parsing MoRef for ManagedObject of type vmodl.ManagedObject
at line 2, column 259

while parsing property "obj" of static type ManagedObject

while parsing serialized DataObject of type vmodl.query.PropertyCollector.ObjectSpec
at line 2, column 248

while parsing property "objectSet" of static type ArrayOfObjectSpec

while parsing serialized DataObject of type vmodl.query.PropertyCollector.FilterSpec
at line 2, column 161

while parsing call information for method RetrieveProperties
at line 2, column 66

while parsing SOAP body
at line 2, column 60

while parsing SOAP envelope
at line 2, column 0

while parsing HTTP request for method retrieveContents
on object of type vmodl.query.PropertyCollector
at line 1, column 0
ERRO[2016-08-24T21:03:06Z] Create cannot continue: configuration validation failed
ERRO[2016-08-24T21:03:06Z] --------------------
ERRO[2016-08-24T21:03:06Z] vic-machine-linux failed: validation of configuration failed
mdubya66 commented 8 years ago

Moving to Icebox per 9/20 Triage. Needs release note

stuclem commented 7 years ago

Already in the release notes, so removing the kind/note tag.