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

DNS configuration for the SmartOS slaves #155

Closed
joaocgreis opened this issue Aug 14, 2015 · 3 comments
Closed

DNS configuration for the SmartOS slaves #155

joaocgreis opened this issue Aug 14, 2015 · 3 comments

Comments

@joaocgreis
Copy link
Member

As seen recently in nodejs/node-v0.x-archive#25858 , DNS configuration is sensitive for the tests. The test machines should be configured to use Google DNS servers, and using other servers may cause tests to fail, as discussed in nodejs/node-v0.x-archive#8056 .

I changed the DNS configuration in the SmartOS slaves by editing /etc/resolv.conf. I am now looking for a way to make this permanent and documented.

I have very little experience with SmartOS, by my research it seems the proper place to change the DNS configuration in SmartOS is in the zone (VM) configuration: https://wiki.smartos.org/display/DOC/How+to+create+a+zone+%28+OS+virtualized+machine+%29+in+SmartOS . Can we access this configuration?

Another way would be to add the servers to /etc/resolv.conf in the ansible script, with something like (untested):

    - name: Remove 4.2.2.2 from the list of DNS servers
      lineinfile: dest=/etc/resolv.conf state=absent regexp='^(\s*)nameserver(\s+)4.2.2.2(\s*)$'
      tags: general

    - name: Add 8.8.8.8 to the list of DNS servers
      lineinfile: dest=/etc/resolv.conf state=present regexp='^(\s*)nameserver(\s+)8.8.8.8(\s*)$' line='nameserver 8.8.8.8'
      tags: general

    - name: Add 8.8.4.4 to the list of DNS servers
      lineinfile: dest=/etc/resolv.conf state=present regexp='^(\s*)nameserver(\s+)8.8.4.4(\s*)$' line='nameserver 8.8.4.4'
      tags: general

However, I don't know if/when this gets overwritten.

So, should I test the ansibles changes above carefully and open a PR, can we access the zone configuration or should this be done in some other way?

@chorrell
Copy link

If this is a machine on the Joyent Public Cloud you would not be able to modify the zone configuration. However, /etc/resolv.conf should only be populated at provision time so any modifications you make should persist after a reboot. Also note that depending on which data center you provision to I think the 4.2.2.2 entry might not always be added. I'm not 100% on that though. It's probably easier to just ensure you have the Google DNS servers and no other entries.

@joaocgreis
Copy link
Member Author

@chorrell that's what I needed to know, thank you! PR it is then.

joaocgreis added a commit to JaneaSystems/build that referenced this issue Aug 17, 2015
DNS tests are sensible to which DNS servers are used. Google DNS servers
are known to work and should provide a stable DNS environment to run the
tests.

Fixes: nodejs/node-v0.x-archive#25858
Fixes: nodejs#155
joaocgreis added a commit to JaneaSystems/build that referenced this issue Aug 21, 2015
DNS tests are sensible to which DNS servers are used. Google DNS servers
are known to work and should provide a stable DNS environment to run the
tests.

Fixes: nodejs/node-v0.x-archive#25858
Fixes: nodejs#155
PR-URL: nodejs#156
Reviewed-By: Rod Vagg <[email protected]>
Reviewed-By: Wyatt Preul <[email protected]>
Reviewed-By: Johan Bergström <[email protected]>
@joaocgreis
Copy link
Member Author

Fixed by 18b3608.

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

2 participants