Bug 960178

Summary: Nova: 'nova-manage db archive_deleted_rows' fails without an 'optional argument --max_rows'.
Product: [Community] RDO Reporter: Omri Hochman <ohochman>
Component: openstack-novaAssignee: David Ripton <dripton>
Status: CLOSED WONTFIX QA Contact: Ami Jeain <ajeain>
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: dripton, ndipanov, nobody, rbryant, yeylon, ykaul
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-23 20:46:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Omri Hochman 2013-05-06 15:47:43 UTC
Nova: 'nova-manage db archive_deleted_rows' fails without an 'optional argument  --max_rows'.

Description:
-------------
When attempting to perform 'nova-manage db archive_deleted_rows ' it fails on  'An argument is missing ' 

--> looking at command the '--help' will show : 

optional arguments:
  -h, --help           show this help message and exit
  --max_rows <number>  Maximum number of deleted rows to archiv


the command fails without --max_rows value, so, it should either have a default value (for --max_rows) or  --max_row  should not be called an "optional arguments" in the 'help' - because the command fails without it.

Comment 1 David Ripton 2013-05-06 15:52:23 UTC
I'm taking this since I wrote db archiving.  It will require discussion upstream.

Comment 2 Omri Hochman 2013-05-07 14:29:40 UTC
Related Issue :  I don't think 'action_args' should throw such a trace : 
 
(maybe it should be removed at all - currently it's a positional argument)


[root@puma03 ~(keystone_admin)]# nova-manage db archive_deleted_rows action_args
Command failed, please check log for more info
2013-05-07 17:23:17.029 7345 CRITICAL nova [-] invalid literal for int() with base 10: 'action_args'
2013-05-07 17:23:17.029 7345 TRACE nova Traceback (most recent call last):
2013-05-07 17:23:17.029 7345 TRACE nova   File "/usr/bin/nova-manage", line 1255, in <module>
2013-05-07 17:23:17.029 7345 TRACE nova     main()
2013-05-07 17:23:17.029 7345 TRACE nova   File "/usr/bin/nova-manage", line 1247, in main
2013-05-07 17:23:17.029 7345 TRACE nova     fn(*fn_args, **fn_kwargs)
2013-05-07 17:23:17.029 7345 TRACE nova   File "/usr/bin/nova-manage", line 803, in archive_deleted_rows
2013-05-07 17:23:17.029 7345 TRACE nova     max_rows = int(max_rows)
2013-05-07 17:23:17.029 7345 TRACE nova ValueError: invalid literal for int() with base 10: 'action_args'
2013-05-07 17:23:17.029 7345 TRACE nova

Comment 3 David Ripton 2013-05-23 20:46:17 UTC
Upstream bug https://bugs.launchpad.net/nova/+bug/1183538

This is a WONTFIX because it requires completely changing the way nova-manage processes command line arguments, which is unlikely to get in.  (nova-manage is semi-deprecated anyway, but still needed until ALL of its functionality is available through the API and novaclient, which hasn't happened yet.)