Renaming hosts managed by Satellite

Latest response

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.

Steve,

 

You are correct. I plan to change the host name of the server and then would like that change reflected in Satellite.

 

So, if I understand this correctly I would:

 

  1. Change the hostname
  2. Log into Satellite
  3. Select server(s)
  4. Select Manage (from the top right of the screen)
  5. From the 'Misc' tab, I would then select "Update Hardware Profile" and confirm that action

This would then, I assume, gather the latest hardware / host information which would, after this  process, show the new names of the hosts in my Systems list.

 

Do I have that correct?

 

Thanks so much to everyone for the very quick response!!

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!

Steve,

 

Thanks so much for your help.

 

I'll make sure to post a response here when I'm done to verify the results.

Indeed, I misunderstood.  I thought the OP was going to simply rename them in Satellite.

thanks for the clarification!

Ok....finally back to this...

 

So, I renamed the host by editing the /etc/sysconfig/network file. Next, I restarted the server (possibly not necessary, but just in case...) Once it came back up, I went into Satellite, scheduled the hardware refresh and ran rhn_check from the server.

 

Finally, so that it would show up correctly in the System list, I edited the Properties of the System in Satellite and changed the display name.

 

So far as I can tell, all is well.

Great to see you got this sorted out Dan, and thanks for letting us know how you resolved it.