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

don't update /etc/hosts by default #319

Open
evgeni opened this issue Feb 2, 2018 · 1 comment
Open

don't update /etc/hosts by default #319

evgeni opened this issue Feb 2, 2018 · 1 comment

Comments

@evgeni
Copy link
Member

evgeni commented Feb 2, 2018

satellite-clone currently updates /etc/hosts unless overwrite_etc_hosts is set to false. I would argue that changing /etc/hosts (and esp setting 127.0.0.1 {{ hostname }} … should not be done by default.

Thus, instead of the current approach, I would propose to:

  • default overwrite_etc_hosts to false
  • add a check that the new (cloned) hostname resolves properly to one of the IPs of the target system
  • tell the user to set overwrite_etc_hosts to true if the check fails and they really want to carry on
  • maybe even change that task to update (only add {{ ip }} {{ hostname }}) instead of overwrite the whole file?

@sthirugn as git blame says it was you who added this, could you please chime in on the why and whether my ramblings make any sense? ;)

@sthirugn
Copy link
Collaborator

sthirugn commented Feb 2, 2018

Thank you @evgeni for the detailed issue description. As you already know, the Satellite install using katello-backup files will not succeed until the target server's hostname is the same as the source server's hostname. Updating central DNS is not possible in customer environment because most of the time, the target server will be built when the source server is still active. This makes updating /etc/hosts unavoidable. We wanted to give a quick way to get the cloned server up and running with minimal inputs from the user and to make the user less dependent on other teams (network/security) teams to just get a cloned server going. Although this is an easy way I agree that this may not be a preferred standard way of approaching this. I really like the approach you explained here and +1 to doing that!

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