RHQ Agent holding on to deployed bundle versions

Solution Unverified - Updated -

Environment

  • JBoss Operations Network (JON) 3.x

Issue

  • Within the rhq-agent in the following directory: $RHQ_AGENT/data/tmp/bundle-versions/ holds all the deployed bundles to the host server. This is taking up a large amount of space considering there have been several deployments made to a server.
    Is there a way we can either remove the tmp store if this is not required.
  • Will JON be able to re-deploy the bundles to the server if the files from the $RHQ_AGENT/data/tmp/bundle-versions/` are deleted?

Resolution

In JON 3.0, every deployed bundle is copied to the $JON_AGENT/data/tmp/bundle_version folder. They are there mainly for debugging purposes - in case that something was wrong with the deployment - copied files could be used to see what was actually downloaded. However, this folder should get deleted when the agent is restarted.

In case that restart of the JON Agent is not an option, the JON Agent command "listdata" can be used to achieve the same - for instance:

> listdata --delete --recurse bundles

where:

> listdata
Syntax: listdata [--delete] [--recurse] [--verbose] <'bundles'|path_name>

Lists files found in the data directory, optionally deleting them.
This is an advanced command for administrators use only.  You should not
delete data files unless you know what you are doing. You could render
the agent useless if you delete files that you should not.
  -v, --verbose : enables more detailed file lists
  -r, --recurse : recurse into subdirectories
  -d, --delete : delete the files that are listed
  'bundles'|path_name : the relative path under the data directory to list.
                        If 'bundles', will list data files from the bundle
                        subsystem.

Also, it is possible to execute the same command from the JON UI in the following way:

Navigate to JON UI -> select RHQ Agent resource -> Operations -> Schedules -> press New -> select "Execute Prompt Command" from the "Operation" drop down list -> enter JON Agent command in the "Command" field: listdata --delete --recurse bundles -> Schedule

The above behaviour - where each bundle deployment creates a new folder in the temp folder - has been changed in the latest version of JON 3.1.1. In this release, only the latest deployed bundle will be saved - so there will be only one directory under bundle-versions, no matter how many bundles was deployed in the past.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments