2 Replies Latest reply on Dec 10, 2008 1:31 PM by Dave Reed

    Bad name won't go away

    Dave Reed Newbie

      When adding rhq-agent to six servers, we assigned the names server1, server2, server3 and server4 but for the 5th and 6th servers someone accepted the default name so that they appear in the inventory list as SERVER5.OURDOMAIN.CHIEFDOMAIN.COM and SERVER6.OURDOMAIN.CHIEFDOMAIN.COM instead of server 5 and server6.

      When I uninventoried them and did a "--cleanconfig" to rename the agents server5 and server6, they failed to register. The console window said they were already registered, and must be registered again with the original name.

      Is there any way I can change the names to server5 and server6?

      Thanks,
      Dave

        • 1. Re: Bad name won't go away
          mazz Master

          Today, you can't do this from the UI or agent (as you've seen, the server forbids one agent to steal another agent's name or to change names).

          Read these JIRAs:

          http://jira.rhq-project.org/browse/RHQ-914
          http://jira.rhq-project.org/browse/RHQ-1245

          You can shutdown your agent, uninventory your platform from inventory, then purge your agent using the instructions in RHQ-914 and then restart the agent with --cleanconfig and set the name to the one you really want.

          If you are brave, shutdown your server and agent, execute this SQL (using a DB client connected to your database):

          update rhq_agent set name='server5' where name='SERVER5.OURDOMAIN.CHIEFDOMAIN.COM'


          the restart your agent with --cleanconfig and set the name to the one you want. (this way, you can keep the inventory you have for that agent). I don't know the full implications of doing this - I *think* it might be OK to set the name directly like this, but I can't guarantee it.

          You aren't the first person to ask this question - hopefully we'll be able to get those JIRAs addressed in the next release.

          BTW: this internal agent name should really be of no concern to the users. You can always change the RHQ Agent resource name that you see in the UI (its default is the internal agent name, but you can change this in the Inventory tab).

          • 2. Re: Bad name won't go away
            Dave Reed Newbie

             

            "mazz" wrote:

            BTW: this internal agent name should really be of no concern to the users. You can always change the RHQ Agent resource name that you see in the UI (its default is the internal agent name, but you can change this in the Inventory tab).

            That's really all I wanted to do -- to avoid an inconsistency in the UI display. It worked fine. Thanks for the tip.

            Dave