Sometimes an agent's inventory might go out of sync (usually due to some unforseen bug). If this happens, the only way to correct it would be to restart the agent VM with --cleanconfig or --purgedata option.
It would be nice to have an agent prompt command to have it do this without killing the VM. Even if it was something like the "plugins update" command where that just shuts down the PC, downloads the plugins and restarts the PC without taking down the entire VM.
which would shutdown the PC, delete the inventory.dat file, then restart the PC.
did a quick implementation - "inventory --sync" now purges the inventory and restarts the PC so the inventory is synced
master commit: 148c25cc279be5f96923c149fc0530512afdb9a0
Verified on RHQ Build#511
Entered the command inventory --sync at agent prompt.
> inventory --sync
The plugin container has been stopped.
Purged the persisted inventory found at [data/inventory.dat], sync will occur when plugin container restarts
The plugin container has been started.
Need to verify documentation for --sync option.
additionally verifying documentation, as follows:
avail: Get availability of inventoried resources
config: Manages the agent configuration
debug: Provides features to help debug the agent.
discovery: Asks a plugin to run a server scan discovery
download: Downloads a file from the RHQ Server
dumpspool: Shows the entries found in the command spool file
exit: Shuts down the agent's communications services and kills the agent
failover: Provides HA failover functionality
gc: Helps free up memory by invoking the garbage collector
getconfig: Displays one, several or all agent configuration preferences
help: Shows help for a given command
identify: Asks to identify a remote server
inventory: Provides information about the current inventory of resources
listdata: Lists and optionally deletes agent data files. USE WITH CAUTION!
log: Configures some settings for the log messages
metrics: Shows the agent metrics
native: Obtains native system information
pc: Starts and stops the plugin container and all deployed plugins
ping: Pings the RHQ Server
piql: Executes a PIQL query to search for running processes
plugins: Updates the agent plugins with the latest versions from the server
quit: Shuts down the agent's communications services and kills the agent
register: Registers this agent with the RHQ Server
schedules: Retrieves measurement schedule information for the specified resource
sender: Controls the command sender to start or stop sending commands
setconfig: Sets an agent configuration preference
setup: Sets up the agent configuration by asking a series of questions
shutdown: Shuts down all communications services without killing the agent
sleep: Puts the agent prompt to sleep for a given amount of seconds.
start: Starts the agent comm services so it can accept remote requests
timer: Times how long it takes to execute another prompt command
update: Provides agent update functionality
version: Shows information on agent version and agent environment
> inventory -?
inventory: invalid option -- ?
Syntax: inventory [--sync] [--xml] [--export=<file>] [--norecurse]
[--id=<#>] | --types | <inventory-binary-file>]
Bulk closing of issues that were VERIFIED, had no target release and where the status changed more than a year ago.