vmware / vic

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

Error Parsing Network mask for container network global #7882

Open javierfz1980 opened 6 years ago

javierfz1980 commented 6 years ago

VIC version: vic-v1.4.0-rc2-4741-f02b3258 customer reported same issue with 1.3.1 GA

Deployment details: single vc embed psc

Details: @AngieCris @zjs Dane Ernsberger reported this issue on the vic-escalations channel. This are my findings from ui side: Trying to create a VCH with the optional Container Networks. We got it working with DHCP configuration, but it fails with Static IPs. When we enter the static IPs we receive an error: "Error parsing network mask for container network global: exactly one subnet must be specified". I’ve been doing some tests, comparing the API documentation against the UI request, and it seems like the UI is sending the correct payload on the request, please take a look at the attached screenshots.

Steps to reproduce: 1- Go to vic ui plugin and start vch creation wizard 2- On the network step try to match the screenshots information. 3- Continue with the wizard and try to create the vch

Actual behavior: Creation fails with error : "Error parsing network mask for container network global: exactly one subnet must be specified"

Expected behavior: VCH should be created.

Additional Screenshots: VCH Creation wizard - Network basic config

network-basic-config

VCH Creation wizard - Network advanced config network-advanced-config

VCH Creation wizard - Summary summary

VCH Creation wizard - error error

Request Payload request

Api documentation api doc

zjs commented 6 years ago

It looks like the API is expecting the gateway to have a routing_destinations with exactly one item in it. It looks like this value would be used to determine the subnet mask for the gateway. (This is related to, but distinct from, the ip_range, which indicates the IP addresses to assign to containers.)

It's not clear to me where in the UI the user would enter that value; perhaps the field is missing.

javierfz1980 commented 6 years ago

@zjs it is correct... it seems like the API is expecting a "routing_destinations" on the network->container->gateway payload.....

Should we add an input in the UI ? (I believe we should move it to ui then...)

could you please confirm if there should be any constrain in order to enable or disable that input ?

Thanks !

zjs commented 6 years ago

I think something should be added. It seems like it should be shown any time the gateway address field is shown and required if the user has entered a gateway address.

I'm not sure how we want the user to enter the value (CIDR notation vs. subnet mask), how we want the field to be labeled, or even whether we want the field to be separate (maybe Gateway itself should just take a value in CIDR notation? I find that unintuitive, but that's most similar to the CLI.). (@hickeng? @lweitzman?) Perhaps we should take a look at the relevant page(s) in the vSphere UI and have the format used to enter the information match that.

dbarkelew commented 6 years ago

I have a customer who is reporting this as well.

zjs commented 6 years ago

@dbarkelew, I think this may have been fixed with a UI change in 1.4.3. What version is the customer using?

I'll have to do some more research to figure out if this issue was intentionally left open.

dbarkelew commented 6 years ago

I am not 100% sure about the customer but I tested with 1.4.3 and was able to reproduce.