[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: openshift v3 on centos 7 won't use its own domain





On Fri, Jan 8, 2016 at 10:31 AM, Candide Kemmler <candide intrinsic world> wrote:
I installed OSv3 on a virtual server running centOS 7, set up the router and added DNS records to point both a subdomain and *.subdomain to the server's IP. I can access the server using the subdomain but then I'm immediately redirected to the authentication dialog and from then on OpenShift will always use the server's IP. If try to replace the IP with the subdomain, I get immediately redirected to the auth dialog again.

You didn't specify how you installed, but based on your description, I'm going to make the following assumptions:
- By OSv3, you actually mean Origin, and if not specifying the version during install you most likely installed v1.1.
- It sounds like you may have installed using openshift-ansible.
- Since you mentioned it was on a virtual server, I'm also going to assume that you ran the playbooks/byo/config.yml playbook to install.
- Just knowing how openshift-ansible sets defaults for the hostnames used, I'm also going to assume that you most likely didn't override the openshift_hostname and openshift_public_hostname values.
- I'm also assuming that hostname -f returns either a bare hostname (no domain), or localhost.localdomain

All that said, I suspect the issue is that because you didn't override the hostname values, and that hostname -f didn't returrn something that appeared to be an fqdn (our test for this is very naive and not comprehensive by any means) that it fell back to using the IP address associated with the default route on the box in place of the hostname.

If you attempt to reach the master api or console endpoints using a hostname that is not configured in the master config file as part of the assetConfig (either through the masterPublicURL/publicURL settings or through configuring SNI certificates) the server will redirect you to the masterPublicURL/publicURL accordingly. masterPublicURL is used by the api endpoint and publicURL is used by the console endpoint.

Now, assuming that I assumed correctly, the easiest solution is probably to just run the uninstall playbook: playbooks/adhoc/uninstall.yml and then modify your inventory to add the openshift_hostname and openshift_public_hostname variables to your host in the inventory file (https://docs.openshift.org/latest/install_config/install/advanced_install.html#configuring-ansible). I can't remember right now if both actually need to be specified for VM deployments, but I'd rather say set both than to find out after you tried that both were actually needed.

Changing the host definitions to something like the following would probably be sufficient:
[masters]
subdomain openshift_hostname=subdomain openshift_public_hostname=subdomain

[nodes]
subdomain openshift_hostname=subdomain openshift_public_hostname=subdomain

Alternatively, you could also simply set the system hostname using the following commands (before reinstalling):
hostname <hostname>
domainname <domain>
Where <hostname>.<domain> is subdomain
 

I installed fabric8 as well but because of this I am unable to access its console.

Where should I look into to fix this?

Candide

_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users



--
Jason DeTiberus

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]