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
provide a way to startup the Agent and have it default the rhq.agent.name to ...
Status: CLOSED NEXTRELEASE
Product: RHQ Project
Classification: Other
Component: Agent (Show other bugs)
1.0
All All
medium Severity medium (vote)
: ---
: ---
Assigned To: John Mazzitelli
Corey Welton
http://jira.rhq-project.org/browse/RH...
: Improvement
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-16 11:00 EDT by Ian Springer
Modified: 2013-08-05 20:34 EDT (History)
1 user (show)

See Also:
Fixed In Version: 1.2
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ian Springer 2008-05-16 11:00:00 EDT
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 11:18:01 EDT
-Drhq.agent.name=`hostname`  is too platform specific
Comment 2 John Mazzitelli 2008-10-30 08:50:55 EDT
I fixed this without realizing this JIRA existed :)  svn rev 1867
Comment 3 John Mazzitelli 2008-10-30 08:51:45 EDT
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 15:10:43 EST
QA Verified.
Comment 5 Jeff Weiss 2009-02-09 16:36:15 EST
<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 16:10:31 EST
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.