Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1079469 - [TEXT] taskcleaner.sh has dangerously misleading help text
[TEXT] taskcleaner.sh has dangerously misleading help text
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.3.0
All Linux
high Severity urgent
: ---
: 3.4.0
Assigned To: Eli Mesika
sefi litmanovich
infra
: ZStream
Depends On:
Blocks: 1084774 rhev3.4snapshot2
  Show dependency treegraph
 
Reported: 2014-03-21 12:14 EDT by James W. Mills
Modified: 2016-02-10 14:33 EST (History)
10 users (show)

See Also:
Fixed In Version: av5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1084774 (view as bug list)
Environment:
Last Closed: 2014-06-12 10:05:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 25996 None None None Never
oVirt gerrit 26004 None None None Never

  None (edit)
Description James W. Mills 2014-03-21 12:14:58 EDT
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.
Comment 2 sefi litmanovich 2014-03-31 03:59:27 EDT
Verified on rhevm-3.4.0-0.12.beta2.el6ev.noarch
Comment 4 Itamar Heim 2014-06-12 10:05:08 EDT
Closing as part of 3.4.0

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