keystone-manage mapping_purge fails silently

Bug #1645568 reported by the-bling
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
Fix Released
Low
Gage Hugo

Bug Description

Running the command keystone-manage mapping_purge, no output is given but I get these messages in keystone.log

2016-11-18 07:41:22.807 2404 CRITICAL keystone [-] ValueError: At least one option must be provided
2016-11-18 07:41:22.807 2404 ERROR keystone Traceback (most recent call last):
2016-11-18 07:41:22.807 2404 ERROR keystone File "/usr/bin/keystone-manage", line 10, in <module>
2016-11-18 07:41:22.807 2404 ERROR keystone sys.exit(main())
2016-11-18 07:41:22.807 2404 ERROR keystone File "/usr/lib/python2.7/site-packages/keystone/cmd/manage.py", line 43, in main
2016-11-18 07:41:22.807 2404 ERROR keystone cli.main(argv=sys.argv, config_files=config_files)
2016-11-18 07:41:22.807 2404 ERROR keystone File "/usr/lib/python2.7/site-packages/keystone/cmd/cli.py", line 1257, in main
2016-11-18 07:41:22.807 2404 ERROR keystone CONF.command.cmd_class.main()
2016-11-18 07:41:22.807 2404 ERROR keystone File "/usr/lib/python2.7/site-packages/keystone/cmd/cli.py", line 830, in main
2016-11-18 07:41:22.807 2404 ERROR keystone validate_options()
2016-11-18 07:41:22.807 2404 ERROR keystone File "/usr/lib/python2.7/site-packages/keystone/cmd/cli.py", line 813, in validate_options
2016-11-18 07:41:22.807 2404 ERROR keystone raise ValueError(_('At least one option must be provided'))
2016-11-18 07:41:22.807 2404 ERROR keystone ValueError: At least one option must be provided
2016-11-18 07:41:22.807 2404 ERROR keystone

Using --help says arguments needed are optional.
I used --all option to check and the command was executed successfully. The way I see it is some arguments have been marked optional when they are actually necessary.

the-bling (the-bling)
tags: added: mapping newton
Changed in keystone:
status: New → Confirmed
Revision history for this message
Steve Martinelli (stevemar) wrote :

It looks like henrynash tried to make this smarter initially: https://github.com/openstack/keystone/blob/master/keystone/cmd/cli.py#L804-L810

We could mark the arguments as required by setting "required=True" to a parser subgroup (https://github.com/openstack/keystone/blob/master/keystone/cmd/cli.py#L784-L799)

tags: added: user-experience
removed: mapping newton
Changed in keystone:
importance: Undecided → Low
Changed in keystone:
status: Confirmed → Triaged
tags: added: low-hanging-fruit
Chetna (ck-khullar)
Changed in keystone:
assignee: nobody → Chetna (ck-khullar)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

Fix proposed to branch: master
Review: https://review.openstack.org/408304

Changed in keystone:
status: Triaged → In Progress
Revision history for this message
Lance Bragstad (lbragstad) wrote :

The proposed patch has gone a couple months without an update. Unassigning due to inactivity. If someone has the bandwidth to pick up the proposed patch, please feel free to do so.

Changed in keystone:
assignee: Chetna (ck-khullar) → nobody
Aqsa Malik (aqsamm)
Changed in keystone:
assignee: nobody → Aqsa Malik (aqsamm)
Changed in keystone:
assignee: Aqsa Malik (aqsamm) → Steve Martinelli (stevemar)
Changed in keystone:
assignee: Steve Martinelli (stevemar) → Aqsa Malik (aqsamm)
Revision history for this message
Lance Bragstad (lbragstad) wrote :

Automatically unassigning due to inactivity.

Changed in keystone:
assignee: Aqsa Malik (aqsamm) → nobody
status: In Progress → Triaged
Omar Tleimat (otleimat)
Changed in keystone:
assignee: nobody → Omar Tleimat (otleimat)
Changed in keystone:
status: Triaged → In Progress
Changed in keystone:
assignee: Omar Tleimat (otleimat) → Gage Hugo (gagehugo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/408304
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=d03f35ee6753600bcd5ddfc8f692d00376284aa3
Submitter: Jenkins
Branch: master

commit d03f35ee6753600bcd5ddfc8f692d00376284aa3
Author: Aqsa <email address hidden>
Date: Wed Mar 22 11:30:27 2017 +0000

    Add unit tests to mapping_purge

    This adds unit tests to mapping_purge.

    Change-Id: I01a814f03e83911461168f4dac74202b6f0537d8
    Closes-Bug: 1645568

Changed in keystone:
status: In Progress → Fix Released
Changed in keystone:
milestone: none → queens-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystone 13.0.0.0b1

This issue was fixed in the openstack/keystone 13.0.0.0b1 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.