services with the same names will lead ``service show`` , ``service delete`` wrong error

Bug #1597296 reported by sunyajing on 2016-06-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
sunyajing

Bug Description

If several services have the same names like this:
+----------------------------------+-------------+----------------+
| ID | Name | Type |
+----------------------------------+-------------+----------------+
| 148f5e8cc6154fac92f6031e8040aee0 | ceilometer | metering |
| 186fd71836d745de8c84f959d34639af | glance | image |
| 18a0e59768994839840af7ed12592274 | nova | syj |
| 42c41632597d4d3fa2ad042b5ed0e81a | nova | compute |
| 455680b30d3f4af4a63bb9722828bc30 | cinder | volume |
| 67c7ada5f4c24c2f94e6368ac9ae1100 | None | syj |
| 79d150b92f4b4f7dba64ec419f916119 | neutron | syj |
| 7dc9bd2115234ae9bac0ad430b900cca | nova_legacy | compute_legacy |
| 8df25ac9adcd478488cb4ee004e57737 | keystone | identity |
| 98bcf89fbcbf44b9a155a0fec38f6c42 | cinderv2 | volumev2 |
| ed7d55b2d415417e9d13e65035dd6694 | neutron | network |
| f94c3860ebb747899f6e002ce766ca87 | cinderv3 | volumev3 |
+----------------------------------+-------------+----------------+

``service show nova`` raises a wrong exception:
No service with a type, name or ID of 'nova' exists.
Actually, it should be:
Multiple service matches found for 'nova', use an ID to be more specific.

sunyajing (yajing-sun) on 2016-06-29
Changed in python-openstackclient:
assignee: nobody → sunyajing (yajing-sun)
description: updated

I have reproduced the same and also found the same error. So I changed the status to confirmed

Thanks

Changed in python-openstackclient:
status: New → Confirmed
Changed in python-openstackclient:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/333253
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=c45b1d7b230e900d0416a4953607e5d4e1dc9cfd
Submitter: Jenkins
Branch: master

commit c45b1d7b230e900d0416a4953607e5d4e1dc9cfd
Author: sunyajing <email address hidden>
Date: Fri Jun 24 12:40:29 2016 +0800

    Fix error for find_service() in identity

    if there are more than one services be found with one
    name, a NoUniqueMatch exception should be raised but
    we can see a NotFound Exception raised instead. It is
    because in "find_service()", we use "find_resource()"
    first, if "find_resource()" return a exception, we just
    think it is a NotFound Exception and continue to find
    by type but ignore a NoUniqueMatch exception of
    "find_resource()". This patch refactor the "find_service()"
    method to solve this problem.

    Change-Id: Id4619092c57f276ae0698c89df0d5503b7423a4e
    Co-Authored-By: Huanxuan Ao <email address hidden>
    Closes-Bug:#1597296

Changed in python-openstackclient:
status: In Progress → Fix Released

This issue was fixed in the openstack/python-openstackclient 3.0.0 release.

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

Other bug subscribers