Bug 924246

Summary: taskcleaner.sh should treat null argument as '-h'
Product: Red Hat Enterprise Virtualization Manager Reporter: Pavel Stehlik <pstehlik>
Component: ovirt-engineAssignee: Eli Mesika <emesika>
Status: CLOSED CURRENTRELEASE QA Contact: Ilanit Stein <istein>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.2.0CC: acathrow, bazulay, dyasny, iheim, lpeer, Rhev-m-bugs, sgrinber, yeylon, ykaul, yzaslavs
Target Milestone: ---   
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: sf13 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-11 09:14:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pavel Stehlik 2013-03-21 12:41:15 UTC
Description of problem:
taskcleaner.sh asks password when no arguments are provided.

 /usr/share/ovirt-engine/scripts/taskcleaner/taskcleaner.sh;echo $?
psql: warning: extra command-line argument "engine" ignored
Password for user -h:


Version-Release number of selected component (if applicable):
sf10.1

How reproducible:
100%

Steps to Reproduce:
1. `/usr/share/ovirt-engine/scripts/taskcleaner/taskcleaner.sh`
2.
3.
  
Actual results:


Expected results:


Additional info:
 Also default params not working properly (try `taskcleaner.sh -z` only) - same result (asking pwd for user '-h') - I think it's same root cause.

Comment 2 Eli Mesika 2013-04-03 10:09:39 UTC
fixed in commit: 9730a85

Comment 4 Ilanit Stein 2013-04-07 12:47:29 UTC
Verified on sf-13:

[root@istein-32 ovirt-engine]# /usr/share/ovirt-engine/scripts/taskcleaner/taskcleaner.sh
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 admin username for the database.
	-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.

Comment 5 Itamar Heim 2013-06-11 09:14:42 UTC
3.2 has been released

Comment 6 Itamar Heim 2013-06-11 09:40:30 UTC
3.2 has been released