Bug 536110 (RHQ-496) - provide a way to startup the Agent and have it default the rhq.agent.name to the system's FQDN - this will allow for easier non-interactive Agent installs
Summary: provide a way to startup the Agent and have it default the rhq.agent.name to ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: RHQ-496
Product: RHQ Project
Classification: Other
Component: Agent
Version: 1.0
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: ---
Assignee: John Mazzitelli
QA Contact: Corey Welton
URL: http://jira.rhq-project.org/browse/RH...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-16 15:00 UTC by Ian Springer
Modified: 2013-08-06 00:34 UTC (History)
1 user (show)

Fixed In Version: 1.2
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Ian Springer 2008-05-16 15:00:00 UTC
Starting the agent via:

rhq-agent.sh -l -u -c master-rhq-agent-config.xml -d

is currently not possible unless rhq.agent.name is explicitly set in master-rhq-agent-config.xml.

I'm thinking we could support -Ddefault.agent.name.to.fqdn=true and/or -Drhq.agent.name=`hostname`


Comment 1 Charles Crouch 2008-05-16 15:18:01 UTC
-Drhq.agent.name=`hostname`  is too platform specific

Comment 2 John Mazzitelli 2008-10-30 12:50:55 UTC
I fixed this without realizing this JIRA existed :)  svn rev 1867

Comment 3 John Mazzitelli 2008-10-30 12:51:45 UTC
Here's the relevant code change:

                    if ((m_configuration.getAgentName() == null) || (m_configuration.getAgentName().length() == 0)) {
                        // the agent name isn't defined yet - let's auto-generate one for the user
                        try {
                            String hostname = InetAddress.getLocalHost().getCanonicalHostName();
                            m_configuration.getPreferences().put(AgentConfigurationConstants.NAME, hostname);
                            m_configuration.getPreferences().flush();
                            LOG.info(AgentI18NResourceKeys.AGENT_NAME_AUTO_GENERATED, hostname);
                        } catch (Exception e) {
                            throw new IllegalStateException(MSG.getMsg(AgentI18NResourceKeys.AGENT_NAME_NOT_DEFINED), e);
                        }
                    }


Comment 4 Corey Welton 2009-02-09 20:10:43 UTC
QA Verified.

Comment 5 Jeff Weiss 2009-02-09 21:36:15 UTC
<mazz> -Drhq.agent.configuration-setup=true
 or whatever the real pref name is
 I actually never tried that - but, I think it might work
 the agent accepts -D command line options
 see rhq-agent.sh --help
 rhq.agent.configuration-setup-flag
 that's the real name
 ah - I got it right the first time : }
 oh, no I didn't... forgot "-flag"
 

Comment 6 Red Hat Bugzilla 2009-11-10 21:10:31 UTC
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-496



Note You need to log in before you can comment on or make changes to this bug.