-
Notifications
You must be signed in to change notification settings - Fork 1k
CloudStack: fix data-server DNS resolution #1004
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
CloudStack: fix data-server DNS resolution #1004
Conversation
CloudStack DNS resolution should be done against the DNS search domain (with the final dot, DNS resolution does not work with e.g. Fedora 34) LP: #1942232
|
Hey @olivierlemasle , thanks for this PR. I have some questions over at https://bugs.launchpad.net/cloud-init/+bug/1942232 . I'll leave this PR open while we have a conversation over there. |
|
Hi @onitake @joschi36, With Fedora 34, something changed compared to Fedora 33, and the |
|
This is a bit odd. I remember that we specifically had to add a dot, so data-server would not be searched in the network/VPC domain. Maybe this has changed on the CloudStack side? But maybe I'm mistaken. |
|
It's hard to know the "right" solution without more context, but is there any harm in trying the FQDN first, and then try the relative address if that fails? |
|
Given the discussion on https://bugs.launchpad.net/cloud-init/+bug/1942232 , it seems it was never intended for |
I don't fully agree. Yes, the justification given by @smoser for adding the dot didn't seem conclusive, but I'd prefer a clarification first. |
|
On another note: If the trailing dot in cloud-init is removed, the CloudStack documentation needs to be updated as well. For reference: apache/cloudstack-documentation#132 |
|
I see. I mistook your comments in launchpad as justification for removing the dot. We can wait to see if @smoser has any further information. |
|
@weizhouapache What do you think? You commented on the Launchpad issue that the dot should be removed. IMHO, there is a risk that the wrong DNS server could be asked about the host configuration. Imagine for example someone writing Google's DNS servers and a custom domain into their VM's /etc/resolv.conf. This would cause the DNS request to never reach the virtual router, and consequently cloud-init not getting the correct data-server address. If someone impersonates the data-server and introduces a suitable record into public DNS, you'd have a serious security issue. Obviously, resolving Perhaps this should be solved on the virtual router instead? If it always returns a correct result for |
|
FYI, I did some additional tests in another environment (original tests in the Launchpad ticket):
Again, |
|
same results in ubuntu 18.04 (but it works in centos 5.5 created from default template in cloudstack) @onitake
|
|
Is there any reason we shouldn't do my previous suggestion?
|
|
Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close. If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging mitechie, and he will ensure that someone takes a look soon. (If the pull request is closed and you would like to continue working on it, please do tag mitechie to reopen it.) |
weizhouapache
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
|
I don't think we want to let this one die just yet. @onitake , you had the reservations with taking the relative approach. Do you still have reservations? If so, can you explain what they are? Would they be satisfied by my suggestion to try the |
|
@TheRealFalcon @onitake @olivierlemasle I just had an idea in cloudstack. I will test it and update you next week. |
|
@TheRealFalcon @onitake @olivierlemasle small update 1: I am not going to fix it in cloudstack, as it is a cloudstack issue in my opinion. refer to https://askubuntu.com/questions/1068131/ubuntu-18-04-local-domain-dns-lookup-not-working Update2 : no idea if it is related to |
|
@weizhouapache , "I am not going to fix it in cloudstack, as it is a cloudstack issue in my opinion." I'm not sure I understand what you mean by this. Was that first "cloudstack" supposed to say "cloud-init", or did you mean to say it's not a cloudstack issue? |
@TheRealFalcon |
|
I'm going to go ahead and merge this. We got feedback and evidence from multiple people that the current solution doesn't work but that this proposed solution does work. Additionally, I have asked for feedback multiple times about any possible reservations and/or workarounds and have not heard anything. |
@TheRealFalcon |
|
Thank you @TheRealFalcon for merging this! |
|
side question - what is to expect with regards of the backward compatibility here, if this has been tested only with ACS 4.15? |
|
Hi @synergiator |
|
thank you for the explanation - indeed the implementation seems to be independent of the ACS version. |
Proposed Commit Message
Additional Context
Test Steps
Checklist: