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

On the getting started page, we should use the request data to determine the way the user is accessing the OVA #1172

Open
1 task
zjs opened this issue Nov 29, 2017 · 9 comments
Labels
area/ui The Getting Started page component/fileserver The Getting Started page and associated fileserver kind/defect Behavior that is inconsistent with what's intended product/ova Related to the OVA packaging of vSphere Integrated Containers severity/2-serious High usability or functional impact. Often has no workaround.

Comments

@zjs
Copy link
Member

zjs commented Nov 29, 2017

VIC Product version:

vic-v1.3.0-rc2-2628-9e2a95b6.ova

Deployment details:

N/A

Steps to reproduce:

N/A

Actual behavior:

As of #1066, we use the OVA's hostname from its point of view when rendering links to other services hosted on the OVA.

Expected behavior:

We should use the hostname from the user's point of view. In complex networking scenarios, the OVA may be behind NAT or reverse proxy. In those cases, the OVA's hostname or IP address from its point of view may not be reachable by the user. The request contains the hostname that worked for the user to access the OVA — it's likely that's what they would expect to be used when clicking links.

Additional details as necessary:

This has an added benefit of removing the need for sub-process execution:

func getHostname(ovf lib.Environment, vmIP net.IP) string {
// Until we gix transient hostnames, use the static hostname reported by hostnamectl.
// os.Hostname() returns the kernel hostname, with no regard to transient or static classifications.
// fqdn, err := os.Hostname()
// var url string
// if err == nil && fqdn != "" {
// return fqdn
// } else {
// return vmIP.String()
// }
command := "hostnamectl status --static"
// #nosec: Subprocess launching with variable.
out, err := exec.Command("/bin/bash", "-c", command).Output()
if err != nil {
log.Errorf(err.Error())
return vmIP.String()
}
outString := strings.TrimSpace(string(out))
if outString == "" {
return vmIP.String()
}
return outString
}

Acceptance Criteria

  • We can run a full workflow against an OVA which is hidden behind NAT.
@zjs zjs added kind/defect Behavior that is inconsistent with what's intended team/lifecycle labels Nov 29, 2017
@mlh78750
Copy link
Contributor

mlh78750 commented Dec 5, 2017

@pdaigle how common do you think the appliance having a different DNS name behind NAT will be for customers?

@mlh78750
Copy link
Contributor

mlh78750 commented Dec 5, 2017

@stuclem Do we have this limitation documented anywhere? We might need to release note this if we decide not to fix for 1.3.

@stuclem
Copy link
Contributor

stuclem commented Dec 6, 2017

@mlh78750 and @zjs, no we do not document this limitation. Is there a workaround?

@mdubya66
Copy link
Contributor

mdubya66 commented Dec 6, 2017

added to 1.3 for further investigation and response from @pdaigle

@mdubya66 mdubya66 added the status/need-info Additional information is needed to make progress label Dec 6, 2017
@zjs
Copy link
Member Author

zjs commented Dec 6, 2017

@stuclem: The release note for this would be [a wordsmithed version of] something like: The "Getting Started" page of the VIC Appliance includes links to other services running on the VIC Appliance. The way those links are constructed assume that users connect to the appliance using its IP or FQDN (i.e., that it is not hidden behind NAT or a reverse proxy).

I don't think we want to try to fix this for 1.3; I suspect we haven't tested this case at all so even if we fix the Getting Started page, it's likely that other things don't handle this case well either.

@mlh78750
Copy link
Contributor

mlh78750 commented Dec 7, 2017

Additionally, the work around could be to add the FDQN that the appliance knows itself as to the /etc/hosts file (or the windows equiv) of the client machine pointing to the translated IP the client sees and everything will work.

@stuclem stuclem added the impact/doc/note Requires creation of or changes to an official release note label Dec 11, 2017
@stuclem
Copy link
Contributor

stuclem commented Jan 9, 2018

Attempted release note:

  • Services are not available if accessed through NAT or a reverse proxy. #1172
    The Getting Started page of the appliance includes links to the services running on the appliance. These links are constructed assuming that users connect to the appliance by using its IP or FQDN, and that it is not hidden behind NAT or a reverse proxy.

    Workaround: Add the FDQN by which the appliance identifies itself to the /etc/hosts file of the client machine, pointing to the translated IP address that the client sees.

@mlh78750 @zjs is this OK?

@stuclem
Copy link
Contributor

stuclem commented Jan 11, 2018

Thanks @zjs. Removing kind/note.

@stuclem stuclem removed the impact/doc/note Requires creation of or changes to an official release note label Jan 11, 2018
@andrewtchin andrewtchin added the status/needs-estimation The issue needs to be estimated by the team label Feb 14, 2018
@mdharamadas1 mdharamadas1 removed the status/needs-estimation The issue needs to be estimated by the team label May 17, 2018
@ghost
Copy link

ghost commented May 17, 2018

Ensure that any changes to the getHostname function do not affect the psc registration process.
The links can be generated by using the request host headers from the http request.

Additionally, we should also ensure that this line is functional with a "hidden" hostname.

@zjs zjs added product/ova Related to the OVA packaging of vSphere Integrated Containers severity/2-serious High usability or functional impact. Often has no workaround. area/ui The Getting Started page component/fileserver The Getting Started page and associated fileserver and removed priority/p2 status/need-info Additional information is needed to make progress labels Jan 28, 2019
@zjs zjs removed their assignment Jan 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui The Getting Started page component/fileserver The Getting Started page and associated fileserver kind/defect Behavior that is inconsistent with what's intended product/ova Related to the OVA packaging of vSphere Integrated Containers severity/2-serious High usability or functional impact. Often has no workaround.
Projects
None yet
Development

No branches or pull requests

6 participants