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

Restarting Rancher loses changes to Host names #3414

Closed
sshipway opened this issue Jan 26, 2016 · 8 comments
Closed

Restarting Rancher loses changes to Host names #3414

sshipway opened this issue Jan 26, 2016 · 8 comments
Assignees
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release

Comments

@sshipway
Copy link

Rancher 0.56
Our docker hosts are cloned in VMware and consequently have the same hostname internally (though different IP addresses via DHCP).
When they register with Rancher, the Hosts are given the same hostname; however we can edit this to identify the VM number.
However, when Rancher is restarted (such as to upgrade) then these changes are lost, and the Host names revert to the actual VM hostnames.

@sshipway
Copy link
Author

In fact, it seems that any changes to hostnames are reverted after a few minutes to whatever the host in question thinks its hostname is

@vincent99 vincent99 added the kind/bug Issues that are defects reported by users or that we know have reached a real release label Jan 26, 2016
@vincent99 vincent99 added this to the Milestone 1/27/2016 milestone Jan 26, 2016
@ibuildthecloud
Copy link
Contributor

@sshipway Yep we broke this. Basically we wanted if the hostname of the server changed for that to be reflected in the UI. Kind of forgot about users renaming the host. We will fix this so both situations work.

@sshipway
Copy link
Author

Thanks; I can see the benefit for some of hostname changes trickling through, however many people (including us) who use VMWare or equivalent will have a chain of identical clones docker hosts with the same name using DHCP, and you then end up with everything called 'host' ....
Hard to support both cases, though I suppose you could have a flag for if the hostname was overridden

@roynasser
Copy link

+1 to follow. noticed the same

@roynasser
Copy link

On a related note, where does the agent get the hostname from?

vagrant@ubuntu-03:~$ hostname
ubuntu-03
vagrant@ubuntu-03:~$ cat /etc/hostname
ubuntu-03

image

@vincent99
Copy link
Contributor

@sshipway The new behavior we were thinking would be that the name field is empty/null by default and the host agent continuously updates the hostname field.

Then the UI would show the name if set, and the hostname otherwise, so you could override the display if you want to without fighting the agent.

But now that I'm typing this out... @ibuildthecloud This will break metadata unless we do the same name || hostname logic when producing the answers file, because only name is magic there.

@vincent99
Copy link
Contributor

This is (will be) in 0.57

@tfiduccia
Copy link

Version - master UI 2/4 (you will see it in next build, which will be 0.58)
Verified fixed

Comment: After the hostname is changed, the API is not sending a change request to UI, so to see it you have to refresh the page. There is a separate issue entered for getting change request for Host info changes - #3523

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues that are defects reported by users or that we know have reached a real release
Projects
None yet
Development

No branches or pull requests

7 participants