Skip to content
This repository has been archived by the owner on Jun 13, 2023. It is now read-only.

Configure dnsmasq to resolve the cluster's subdomain #218

Closed
wants to merge 2 commits into from

Conversation

gbenhaim
Copy link
Contributor

@gbenhaim gbenhaim commented May 7, 2018

Allow dnsmasq to resolve the cluster's subdomain
Configure the dns server of the masters/nodes to resolve
the cluster's "subdomain".

*.{{ openshift_master_default_subdomain }} names will be resolved to
the ip of the node that runs the Openshift router.

Signed-off-by: gbenhaim [email protected]

gbenhaim added 2 commits May 7, 2018 15:08
Signed-off-by: gbenhaim <[email protected]>
Configure the dns server of the masters/nodes to resolve
the cluster's "subdomain".

*.{{ openshift_master_default_subdomain }} names will be resolved to
the ip of the node that runs the Openshift router.

Signed-off-by: gbenhaim <[email protected]>
@gbenhaim gbenhaim requested a review from aglitke May 7, 2018 20:34
@gbenhaim
Copy link
Contributor Author

gbenhaim commented May 7, 2018

Not sure why, but now it redirects the DNS request to the upstream dns server:

Failed to provision volume with StorageClass "kubevirt": create volume error: 
error creating volume Post http://heketi-storage-app-storage.cloudapps.example.com/volumes: 
dial tcp: lookup heketi-storage-app-storage.cloudapps.example.com on 192.168.200.1:53: no such host

Even though curl works fine:

 curl heketi-storage-app-storage.cloudapps.example.com/hello
Hello from Heketi

Also, anyone has an idea how to extract openshift_master_default_subdomain from the cluster?

@gbenhaim gbenhaim changed the title Use custom subdomain Configure dnsmasq to resolve the cluster's subdomain May 7, 2018
@gbenhaim
Copy link
Contributor Author

gbenhaim commented May 7, 2018

@jarrpa

@jarrpa
Copy link
Contributor

jarrpa commented May 9, 2018

@gbenhaim Are the config changes in /etc/dnsmasq.conf persisting? I've always put my changes in a new file under /etc/dnsmasq.d/ so as not to interfere with other configurations that the system may be maintaining/updating.

Also, I do not know how to get the default subdomain from OpenShift itself. I think you'd have to look in the master config files and grep for the line that sets it.

Copy link
Contributor

@alexxa alexxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gbenhaim Please see the comments.

- hosts: masters[0]
force_handlers: True
tasks:
- name: Switch do the default project
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switch do/Switch to

force_handlers: True
tasks:
- set_fact:
subdomain: "cloudapps.example.com"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it a openshift_master_default_subdomain variable?

@@ -15,6 +15,8 @@ openshift_enable_excluders=false
template_service_broker_install=false
openshift_use_manageiq=false
openshift_install_examples=false
# Domain name that will be used by the Openshift router
openshift_master_default_subdomain=cloudapps.example.com
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see where it's used.

@@ -0,0 +1,66 @@
# Configure the dns of the masters and nodes
# with the ip and and subdomain of the cluster's router.
# After runnin this playbook on a master/node, openshift routes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/runnin/running
s/a master/node/master and node machines/
s/openshift/OpenShift

@@ -0,0 +1,66 @@
# Configure the dns of the masters and nodes
# with the ip and and subdomain of the cluster's router.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/ip and and/IP and/

@@ -0,0 +1,66 @@
# Configure the dns of the masters and nodes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/dns/DNS

@gbenhaim
Copy link
Contributor Author

Maybe adding the wildcard DNS entry to the upstream server will help.
lago-project/lago#722

@rthallisey
Copy link
Collaborator

Once @alexxa comments are addressed looks good to me.

@dyasny
Copy link

dyasny commented May 21, 2018

I was just fighting this same issue in downstream test CI, and had an extensive debugging session with @sdodson. There are very specific things openshift-ansible does that you need to adjust the infrastructure to, like making sure nodes/masters have an fqdn hostname set and external domain settings via NM

@gbenhaim
Copy link
Contributor Author

No needed anymore.

@gbenhaim gbenhaim closed this Jun 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants