Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCH wizard does not create --container-network-gateway parameter in CIDR format #607

Closed
KeithRichardLee opened this issue Sep 18, 2018 · 4 comments
Assignees
Milestone

Comments

@KeithRichardLee
Copy link

VIC-UI version:
v1.4.1.1262

Platform details:
Windows Server 2012 R2

Browser details:
FireFox 60.2 ESR

Additional details:
Fresh install of VIC

Steps to reproduce:
Create a VCH in the vSphere Client using following parameters taken from the vic-machine command which was auto generated.

./vic-machine-linux create --name VCH_01 --compute-resource /SA-Datacenter/host/SA-Compute --image-store SA-Shared-01-Remote/VCH_01_IDS --base-image-size 8GB --volume-store SA-Shared-01-Remote/VCH_01_VDS:default --bridge-network pg-Bridge --bridge-network-range 172.16.0.0/12 --public-network pg-Public --public-network-ip 192.168.0.97/24 --public-network-gateway 192.168.0.10 --dns-server 172.20.10.10 --client-network pg-Clients --client-network-ip 10.2.10.97/24 --client-network-gateway 172.20.10.10/24:10.2.10.10 --management-network pg-SA-Management --management-network-ip 172.20.10.97/24 --management-network-gateway 172.20.10.10/24:172.20.10.10 --container-network pg-Containers:container-nw --container-network-ip-range pg-Containers:10.1.10.100-10.1.10.200 --container-network-gateway pg-Containers:10.1.10.10 --container-network-dns pg-Containers:10.1.10.10 --container-network-firewall pg-Containers:published --tls-cname VCH_01 --certificate-key-size 2048 --no-tlsverify --user Administrator@VSPHERE.LOCAL --thumbprint AE:22:9A:DC:83:01:A3:27:F6:31:16:44:99:F9:C3:60:66:19:56:25 --target sa-vcsa-01.vclass.local/SA-Datacenter --registry-ca ca.crt --ops-user administrator@vsphere.local

Actual behavior:
From above in bold, it can be seen the auto generated vic-machine command is missing the CIDR format for the --container-network-gateway parameter. It is "pg-Containers:10.1.10.10". Alas, the VCH wizard generated vic-machine command will fail if ran.

Expected behavior:
"--container-network-gateway pg-Containers:10.1.10.10" should be in a CIDR format such as "--container-network-gateway pg-Containers:10.1.10.10/24"

@KeithRichardLee
Copy link
Author

Issue exists in v1.4.3 also

@zjs
Copy link
Member

zjs commented Sep 18, 2018

It looks like this is closely related to both #606 and #568.

The documentation indicates that the format for the container network gateway field should be a CIDR, but the UI appears to instruct users to enter an IP address:

<input class="form-control" id="container-network-gateway" type="text" placeholder="IP address" formControlName="containerNetworkGateway">
<span class="tooltip-content" *ngIf="form.get('containerNetworks').controls[i].controls.containerNetworkGateway.hasError('required')">
Container network gateway cannot be empty
</span>
<span class="tooltip-content" *ngIf="form.get('containerNetworks').controls[i].controls.containerNetworkGateway.hasError('pattern')">
Gateway address is not valid
</span>

The UI appears to validate that an IP address (not CIDR) is entered:

containerNetworkGateway: [{ value: '', disabled: true }, [
Validators.required,
Validators.pattern(ipPattern)
]],

It seems like there are several parts to this fix:

@zjs zjs removed their assignment Sep 18, 2018
@zhoumeina
Copy link
Contributor

@zjs, does it mean we should modify gateway in ui to only allow CIDR format input?

@zhoumeina
Copy link
Contributor

fixed by :#619

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants