Support Migration Notice: To update migrated JIRA cases click here to open a new case use www.vmware.com/go/sr | vFabric Hyperic 5.7.0 is Now Available

Hyperic HQ

GenericPlugin.getPlatformName() doesn't look at platform.name property if set in agent.properties

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 4.6.0.1
  • Fix Version/s: 5.0
  • Component/s: Agent / PDK
  • Case Links:
  • HQ Fix Version:
    7 August 2012
  • Regression:
    No
  • Tags:

Description

When the agent is initializing it's storage provider it calls GenericPlugin.getPlatformName() to determine the hostname the agent is on. In 99% of the use cases this is acceptable and an overriding platform.name isn't needed. However, there are times when DHCP alters the hostname to be the fqdn which is out of customer's control. Example would be hostname on agent setup is vmc123 however DHCP resets hostname to be vmc123.vmware.com. When hostname is unstable customers will set platform.name to keep there from being issues during auto discovery, however, GenericPlugin.getPlatformName() doesn't look there.

Activity

Hide
Wes Schlichter added a comment -

Discussion from triage is to add an optional flag to agent.properties to ignore the hostname the agent was installed on. This would have the least impact on customers using platform.name already.

Show
Wes Schlichter added a comment - Discussion from triage is to add an optional flag to agent.properties to ignore the hostname the agent was installed on. This would have the least impact on customers using platform.name already.
Hide
Maya Anderson added a comment -

GenericPlugin.getPlatformName() does look at platform.name propety, after GenericPlugin has been initialized.
However, GenericPlugin has to be initializes so that GenericPlugin.getPlatformName() can fetch the overriding property from the props file. Unfortunately, AgentDaemon.configure() is called before that initialization.
Therefore, I've changed AgentDaemon.configure() to fetch the overriding property directly because it's not yet initialized in GenericPlugin when GenericPlugin.getPlatformName() is called.
This way the platform.name is used consistently and would always override the default hostname.
See https://fisheye.springsource.org/changelog/hq?cs=19a347668e9a4b2c88e745f2faea93667a993f97 .

Wes, would it have any impact on customers using platform.name already?

Show
Maya Anderson added a comment - GenericPlugin.getPlatformName() does look at platform.name propety, after GenericPlugin has been initialized. However, GenericPlugin has to be initializes so that GenericPlugin.getPlatformName() can fetch the overriding property from the props file. Unfortunately, AgentDaemon.configure() is called before that initialization. Therefore, I've changed AgentDaemon.configure() to fetch the overriding property directly because it's not yet initialized in GenericPlugin when GenericPlugin.getPlatformName() is called. This way the platform.name is used consistently and would always override the default hostname. See https://fisheye.springsource.org/changelog/hq?cs=19a347668e9a4b2c88e745f2faea93667a993f97 . Wes, would it have any impact on customers using platform.name already?
Hide
Amalia Rabinovitch-Avraham added a comment -

both platform.name and platform.fqdn need to be set.

Verified on build #194.

Show
Amalia Rabinovitch-Avraham added a comment - both platform.name and platform.fqdn need to be set. Verified on build #194.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved:
    Last comment:
    1 year, 27 weeks ago