keystone-manage mapping_purge fails silently

Bug #1645568 reported by the-bling on 2016-11-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Identity (keystone)
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) on 2016-11-29
tags: added: mapping newton
Changed in keystone:
status: New → Confirmed
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) on 2016-12-06
Changed in keystone:
assignee: nobody → Chetna (ck-khullar)

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

Changed in keystone:
status: Triaged → In Progress
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) on 2017-03-22
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)
Lance Bragstad (lbragstad) wrote :

Automatically unassigning due to inactivity.

Changed in keystone:
assignee: Aqsa Malik (aqsamm) → nobody
status: In Progress → Triaged
Omar Tleimat (otleimat) on 2017-08-08
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)

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

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  Edit
Everyone can see this information.

Other bug subscribers