← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1732593] Re: TypeError: archive_deleted_rows got multiple values for keyword arguments 'max_rows'

 

Reviewed:  https://review.openstack.org/520765
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=0f464e55a856477a5b77ce8ce7efacf9bc139735
Submitter: Zuul
Branch:    master

commit 0f464e55a856477a5b77ce8ce7efacf9bc139735
Author: Matt Riedemann <mriedem.os@xxxxxxxxx>
Date:   Thu Nov 16 15:34:32 2017 -0500

    Fix TypeError in nova-manage db archive_deleted_rows
    
    If you run the archive_deleted_rows command without the
    --max_rows option name but just pass in a value, it will
    fail with a TypeError:
    
    venv runtests: commands[0] | nova-manage db archive_deleted_rows 1000
    An error has occurred:
    Traceback (most recent call last):
      File "/home/user/git/nova/nova/cmd/manage.py", line 1924, in main
        ret = fn(*fn_args, **fn_kwargs)
    TypeError: archive_deleted_rows() got multiple values for \
               keyword argument 'max_rows'
    
    This fixes it by setting a dest and moving the default to the kwarg.
    
    Change-Id: I1e60c571a8e9b875f89af6695f5427c801c8c53b
    Closes-Bug: #1732593


** Changed in: nova
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1732593

Title:
  TypeError: archive_deleted_rows got multiple values for keyword
  arguments 'max_rows'

Status in OpenStack Compute (nova):
  Fix Released
Status in OpenStack Compute (nova) ocata series:
  New
Status in OpenStack Compute (nova) pike series:
  New

Bug description:
  If you run archive_deleted_rows subcommand with following parameters,
  it raises TypeError exception.

  $nova-manage db archive_deleted_rows 1000 1000

  Output

  An error has occurred:
  Traceback (most recent call last):
    File "/opt/stack/nova/nova/cmd/manage.py", line 1924, in main
      ret = fn(*fn_args, **fn_kwargs)
  TypeError: archive_deleted_rows() got multiple values for argument 'max_rows'

  Environment details:

  <devstack>:

  commit 91f62818c3ab5f7f7cee11df7a7b7d3ce290ecb8
  Merge: a6280e5 c09eaf8
  Author: Jenkins <jenkins@xxxxxxxxxxxxxxxxxxxx>
  Date:   Sun Sep 10 18:31:13 2017 +0000

      Merge "Update OS_AUTH_URL in Configuration.rst"
  	
  nova:

  commit b7f53a33faf6187ad0b16e45cb14ece07892f7bc
  Merge: e48db05 a9d9255
  Author: Zuul <zuul@xxxxxxxxxxxxxxxxxxxx>
  Date:   Wed Nov 8 07:16:14 2017 +0000

      Merge "Fix return type in FilterScheduler._legacy_find_hosts"

  Reason:

  In fn_kwargs for max_rows parameter it is assigning default value of max_rows which is 1000, and not the value which we are passing through command.
  So it is giving above mentioned TypeError.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1732593/+subscriptions


References