Description of problem:
taskcleaner.sh -h says that the "-R" option "Removes all Zombie tasks.". In fact, the "-R" option without the "-z" option will truncate the entire table, rather than look specifically for zombie tasks. Below is the "Usage" output:
# cd /usr/share/ovirt-engine/setup/dbutils/
# ./taskcleaner.sh -h
Usage: taskcleaner.sh [-h] [-s server] [-p PORT]] [-d DATABASE] -u USERNAME [-l LOGFILE] [-t taskId] [-c commandId] [-z] [-R] [-C] [-J] [-A] [-q] [-v]
-s SERVERNAME - The database servername for the database (def. localhost)
-p PORT - The database port for the database (def. 5432)
-d DATABASE - The database name (def. engine)
-u USERNAME - The username for the database (def. engine)
-l LOGFILE - The logfile for capturing output (def. taskcleaner.sh.log)
-t TASK_ID - Removes a task by its Task ID.
-c COMMAND_ID - Removes all tasks related to the given Command Id.
-z - Removes/Displays a Zombie task.
-R - Removes all Zombie tasks.
-C - Clear related compensation entries.
-J - Clear related Job Steps.
-A - Clear all Job Steps and compensation entries.
-q - Quite mode, do not prompt for confirmation.
-v - Turn on verbosity (WARNING: lots of output)
-h - This help text.
# ./taskcleaner.sh -u postgres -d engine -R
This will remove all async_tasks table content!!!
Caution, this operation should be used with care. Please contact support prior to running this command
Are you sure you want to proceed? [y/n]
With the "-z" option, you see the describe behavior for "-R":
# ./taskcleaner.sh -u postgres -d engine -R -z
This will remove all Zombie Tasks in async_tasks table!!!
Caution, this operation should be used with care. Please contact support prior to running this command
Are you sure you want to proceed? [y/n]
Version-Release number of selected component (if applicable):
rhevm-setup-3.3.1-0.48.el6ev.noarch
How reproducible:
100%
Steps to Reproduce:
# cd /usr/share/ovirt-engine/setup/dbutils/
# ./taskcleaner.sh -h
Actual results:
Misleading information in the "-R" option
Usage: taskcleaner.sh [-h] [-s server] [-p PORT]] [-d DATABASE] -u USERNAME [-l LOGFILE] [-t taskId] [-c commandId] [-z] [-R] [-C] [-J] [-A] [-q] [-v]
-s SERVERNAME - The database servername for the database (def. localhost)
-p PORT - The database port for the database (def. 5432)
-d DATABASE - The database name (def. engine)
-u USERNAME - The username for the database (def. engine)
-l LOGFILE - The logfile for capturing output (def. taskcleaner.sh.log)
-t TASK_ID - Removes a task by its Task ID.
-c COMMAND_ID - Removes all tasks related to the given Command Id.
-z - Removes/Displays a Zombie task.
-R - Removes all Zombie tasks.
-C - Clear related compensation entries.
-J - Clear related Job Steps.
-A - Clear all Job Steps and compensation entries.
-q - Quite mode, do not prompt for confirmation.
-v - Turn on verbosity (WARNING: lots of output)
-h - This help text.
Expected results:
More correct information in the "-R" option
Usage: taskcleaner.sh [-h] [-s server] [-p PORT]] [-d DATABASE] -u USERNAME [-l LOGFILE] [-t taskId] [-c commandId] [-z] [-R] [-C] [-J] [-A] [-q] [-v]
-s SERVERNAME - The database servername for the database (def. localhost)
-p PORT - The database port for the database (def. 5432)
-d DATABASE - The database name (def. engine)
-u USERNAME - The username for the database (def. engine)
-l LOGFILE - The logfile for capturing output (def. taskcleaner.sh.log)
-t TASK_ID - Removes a task by its Task ID.
-c COMMAND_ID - Removes all tasks related to the given Command Id.
-z - Removes/Displays a Zombie task.
-R - Removes all tasks (use with -z to clear only zombie tasks).
-C - Clear related compensation entries.
-J - Clear related Job Steps.
-A - Clear all Job Steps and compensation entries.
-q - Quite mode, do not prompt for confirmation.
-v - Turn on verbosity (WARNING: lots of output)
-h - This help text.