← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1757022] Re: "keystone-manage mapping_purge" ignores --type option

 

Reviewed:  https://review.openstack.org/554397
Committed: https://git.openstack.org/cgit/openstack/keystone/commit/?id=74684cf53bffb17af1012af30daf04abfdadc253
Submitter: Zuul
Branch:    master

commit 74684cf53bffb17af1012af30daf04abfdadc253
Author: DaiHanada <dai-hanada@xxxxxxxxxxxxx>
Date:   Wed Feb 7 14:21:38 2018 +0900

    Fix keystone-manage mapping_purge with --type option
    
    "keystone-manage mapping_purge" has "--type" option in order to select
    mappings which have to be deleted. However, the option doesn't work
    and all mappings are purged when specifying this option.
    The command passes a value of the option to purge_mappings API with
    a key name "type", but the API expects "entity_type".
    
    Change-Id: Ib222d70d4cf6bb61847cef049ec1ded5c2ff2c8b
    Closes-Bug: #1757022


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

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

Title:
  "keystone-manage mapping_purge" ignores --type option

Status in OpenStack Identity (keystone):
  Fix Released

Bug description:
  Description
  ===========
  Although I executed "keystone-manage mapping_purge --type user", not only user entities but also group entities were purged.
  It seems that "--type" option was ignored.

  Steps to reproduce
  ==================
  1. "id_mapping" table of keystone db has a user and a group entity.

    MariaDB [keystone]> select * from id_mapping;
    +------------------------------------------------------------------+----------------------------------+-----------+-------------+
    | public_id                                                        | domain_id                        | local_id  | entity_type |
    +------------------------------------------------------------------+----------------------------------+-----------+-------------+
    | a8fdd84b61106a6429908fab68e989751edaca9f84f7413b6d6598426c703b15 | d06cf4dec767422580c7ff24c6526b8f | demo      | user        | <-- user
    | 9525834b497a7ebac4fa8d6cb19c6c1f2b784540f8914a7abd1404642587a8e3 | d06cf4dec767422580c7ff24c6526b8f | testgroup | group       | <-- group
    +------------------------------------------------------------------+----------------------------------+-----------+-------------+

  2. Execute "keystone-manage mapping_purge" with "--type user" option.

    # keystone-manage mapping_purge --type user

  3. Both of the user and the group entity were purged.

    MariaDB [keystone]> select * from id_mapping;
    Empty set (0.00 sec)  <-- The command purged all mappings as same as without options.

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


References