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

How do I set search domains in /etc/resolv.conf, when using static IPs in kernel parameters #285

Open
whowutwut opened this issue Mar 22, 2022 · 2 comments

Comments

@whowutwut
Copy link

I saw in the last merge on #280 that filetranspiler was deprecated. This is great as I do want to move off it... so last night, I finally got around to changing my deployment to all use the kernel parameters to set the static IPs and it looks like it worked for the most part.

However, it seems my cluster comes up only with short names:

# oc get nodes
NAME      STATUS   ROLES    AGE   VERSION
master0   Ready    master   9h    v1.22.3+b93fd35
master1   Ready    master   9h    v1.22.3+b93fd35
master2   Ready    master   9h    v1.22.3+b93fd35
worker0   Ready    worker   8h    v1.22.3+b93fd35
worker1   Ready    worker   8h    v1.22.3+b93fd35
worker3   Ready    worker   8h    v1.22.3+b93fd35

On debugging, I think the difference here is that I lost the DOMAIN property that I set in /etc/sysconfig/network-scripts/ifcfg-<int> before i ran it through filetranspiler and that added a search domain into my /etc/resolv.conf on the CoreOS node. This is missing now...

And hostnamectl on core@master0, and all the various hostname commands (-s -f -d) all return the short host name... When I manually modify /etc/resolv.conf and add search <domain> then the hostname commands seem to return what I'm looking for.

Looking for some help in how I would get this back in.. Thanks!

@christianh814
Copy link
Contributor

@whowutwut

Are you isn't DHCP or static IPs?

@acsulli
Copy link

acsulli commented Apr 8, 2022

My anecdotal experience is that, in the absence of explicitly setting the hostname as the FQDN, the name that appears when doing oc get nodes is the name it uses to lookup the node in DNS. I'm guessing that it's able to find the nodes by that short name, which is why that's all that appears.

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