vmware / vic

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

Improve VCH vSphere API target check #3479

Open andrewtchin opened 7 years ago

andrewtchin commented 7 years ago

Add a service on the VCH to check VCH-vSphere connection Set the status check in vic-init Discuss more with Emma and George

vburenin commented 7 years ago

User statement: The reason we need this feature is actually to insure PortLayer starts without problems. One of the most obscure issues was an access to vSphere API that could fail with very unclear description. However, we can get this feature a little further by having a separate channel to return any error that may happen on ApiCheck, PortLayer, docker-persona and vic-admin sides to vic-machine.

Details: For this purpose one of the components that starts first(vic-admin?) should open a temporary backchannel(tcp-connection) that will send important messages from VCH to vic-machine to keep user informed what is going on at that moment. Channel should be authenticated using some randomly generated credentials during VCH deployment.

Adding a separate service just for the purpose of diagnostics looks like an overkill that may significantly increase the size of the produced ISO image, increase overall complexity and make product less stable.

Acceptance criteria:

  1. vic-admin provides error messaging service
  2. test is provided that exercises this feature
  3. design doc is produced detailing the implementation
emlin commented 7 years ago

should open a temporary backchannel(tcp-connection) that will send important messages from VCH to vic-machine

Currently we're using VM guestinfo for this communication

emlin commented 7 years ago

Besides of vSphere API status check, we also need to check if VCH services are successfully initialized. And then add mark into guestinfo, which will be used by vic-machine create/ls/inspect for status check, to provide more valuable error message

emlin commented 7 years ago

1160 should be considered in this issue as well

emlin commented 7 years ago

Copied from #1160, which is closed for dependency to this issue

If the VCH appliance cannot connect to the target, but vic-machine can, then we need a useful error. It should direct the user at the --management-network option as it's likely that either: a. the VCH cannot get an IP address on the management network. b. the VCH does not have a route to the specified target.