Bug 919056 - make sure the version.properties files are updated in server when appropriate
Summary: make sure the version.properties files are updated in server when appropriate
Keywords:
Status: ON_QA
Alias: None
Product: RHQ Project
Classification: Other
Component: Build System
Version: 4.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: John Mazzitelli
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-07 14:02 UTC by John Mazzitelli
Modified: 2022-03-31 04:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description John Mazzitelli 2013-03-07 14:02:46 UTC
when building in a developer's environment, we should make sure the rhq-server-agent-versions.properties file is deleted from the AS7 data/ directory when a new agent binary is detected. This may also be helpful in a production environment for people who preconfigure their agent and want to update that agent binary.

Note that there is another .properties file in /data that needs to have the same thing done to it - the rhq-client.version. That should probably have the same fix.

As good fix would be to check if the file exists - if it does, check the timestamp of the agent (or cli) binary - if the binary is newer than the .properties, that must mean the propeties was generated from an older binary and needs to be refreshed.

Comment 1 John Mazzitelli 2013-03-07 17:36:07 UTC
git commit to master: bbfa2de

to test:

1) start the server and go to Administration>Downloads to see the version info of the agent binary update jar and the CLI binary.

2) under the directory "<rhq-server-install>/jbossas/standalone/data/rhq-downloads" look for these files, they should exist:
* rhq-agent/rhq-server-agent-versions.properties
* rhq-client/rhq-client-version.properties

3) take note of their file timestamps (via "ls -l" for example)

4) press F5 in the browser to refresh Adminstration>Downloads web page, those file timestamps should not change - those files should not be rewritten. You should wait over 60 seconds since the ls -l command shows times with minute precision.

5) now change the file timestamps of the actual binary files (NOT the files you were looking at above in step 2). The actual binary files are located under the directory "<rhq-server-install>/modules/org/rhq/rhq-enterprise-server-startup-subsystem/main/deployments/rhq.ear/rhq-downloads" - specifically, these two files:
* rhq-agent/rhq-enterprise-agent-<VERSION>.jar
* rhq-client/rhq-remoting-cli-<VERSION>.zip

To change the timestamps, just use the UNIX command "touch":
> cd <rhq-server-install>/modules/org/rhq/rhq-enterprise-server-startup-subsystem/main/deployments/rhq.ear/rhq-downloads
> touch rhq-agent/rhq-enterprise-agent-*.jar
> touch rhq-client/rhq-remoting-cli-*.zip

6) now refresh the Administration>Downloads page one more time (F5)

7) look at the timestamps of the properties files again (that is, look at the "ls -l" output for the files specified in step 2 above). They should have had their timestamps changed to indicate that they have been written again.


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