Renaming hosts managed by Satellite
Hello,
Forgive my inexperience if this is question is too basic...
We are currently managing a small/medium RHEL 5 environment using Satellite 5.4. We have a few servers whose naming conventions was less than practical and are going to be renaming the servers to reflect a more pragmatic naming convention.
My question is, what is the best way to handle this from a Satellite perspective? Do I simply delete the existing server profile from Satellite, change the hostname of the server and then re-register the server using 'rhn-register?' Or is there a simpler/better way to do this?
If I do delete the profile, wouldn't that also have he effect of losing any history regarding that server in the Satellite environment? I'm not sure if that's a huge deal since we haven't, since I've been in this position...for less than a year...needed to reference the history of events for a given server. But also, because of my lack of experience in this area, I don't know if there are any repercussions that I'm not aware of...or if there is a much simpler way to do this.
Any help or guidance is appreciated. Thanks!!
Responses
You shouldn't need to remove the server (client) and re-subscribe it. A hardware refresh SHOULD pick up the new hostname after it's changed.
You can actually simply rename the client from the portal.
Login to your portal, click on the Systems link and click the host you would like to rename.
Under the properties tab you can rename the profile.
Hopefully that helps. If you're simply pursuing this for aesthetics, I believe this would work. If you need something else more technical, let us know.
I will investigate whether you can rename your client from the client itself.
When I register my host I use the following:
rhnreg_ks --activationkey=<blah> --profilename=`hostname | cut -f1 -d.` --force
I do NOT recommend doing this after the host has been registered, since you will have to clean up the orphaned guest (which you could script that cleanup I believe using the API).
I think he was planning on changing the hostnames on the servers themselves; and then wanted to know how to make the satellite server reflect those changes. Correct?
If so, then changing the names in satellite will only change the profile's name. The hostname on the clients will not be touched.
Though you could script the hostname to change in the satellite (via remote command) and then have it schedule a hardware refresh to have the satellite pick up the change.
Yes, that will work. the next time the client systems check-in with the satellite the refresh will run and everything should update to reflect the new names. if you want it to reflect immediately, just run "rhn_check" after the change. Otherwise it will be, I think, it's up to a random 4 hours before they do check-in.
And remember to click "clear" after you schedule the refresh. Or else you will continue working with the sub-set of boxes. I forget sometimes myself.
Have fun!