audit middleware unable to handle services with no endpoints

Bug #1800017 reported by Guang Yee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
keystonemiddleware
Fix Released
Medium
Guang Yee

Bug Description

If a service does not contain any endpoints for whatever reason, audit middleware will fail to parse the service catalog. Consequently, you may see the service logs flooded with tracebacks similar to this.

2018-10-24 21:15:35.615 3885 ERROR keystonemiddleware.audit File "/opt/stack/venv/nova-20181024T070321Z/lib/python2.7/site-packages/keystonemiddleware/audit/_api.py", line 264, in get_target_resource
2018-10-24 21:15:35.615 3885 ERROR keystonemiddleware.audit endpoint_urls = endp['endpoints'][0]
2018-10-24 21:15:35.615 3885 ERROR keystonemiddleware.audit IndexError: list index out of range

See

https://github.com/openstack/keystonemiddleware/blob/stable/rocky/keystonemiddleware/audit/_api.py#L264

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystonemiddleware (master)

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

Changed in keystonemiddleware:
assignee: nobody → Guang Yee (guang-yee)
status: New → In Progress
Changed in keystonemiddleware:
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystonemiddleware (master)

Reviewed: https://review.openstack.org/613410
Committed: https://git.openstack.org/cgit/openstack/keystonemiddleware/commit/?id=6779838a242b222672721407cc320672ab24067a
Submitter: Zuul
Branch: master

commit 6779838a242b222672721407cc320672ab24067a
Author: Guang Yee <email address hidden>
Date: Thu Oct 25 13:01:23 2018 -0700

    Skip the services with no endpoints when parsing service catalog

    When parsing the service catalog to find the source, audit middleware
    should skip over the services which have no endpoints instead of
    assuming they will have at least one endpoint.

    Change-Id: I287873e99338d95baaf20d52ecb3a43763a401fc
    Closes-Bug: #1800017

Changed in keystonemiddleware:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystonemiddleware (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/614021

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystonemiddleware (stable/rocky)

Reviewed: https://review.openstack.org/614021
Committed: https://git.openstack.org/cgit/openstack/keystonemiddleware/commit/?id=e37bbe0a116689043e8c3ec8867bbb3eae062093
Submitter: Zuul
Branch: stable/rocky

commit e37bbe0a116689043e8c3ec8867bbb3eae062093
Author: Guang Yee <email address hidden>
Date: Thu Oct 25 13:01:23 2018 -0700

    Skip the services with no endpoints when parsing service catalog

    When parsing the service catalog to find the source, audit middleware
    should skip over the services which have no endpoints instead of
    assuming they will have at least one endpoint.

    Change-Id: I287873e99338d95baaf20d52ecb3a43763a401fc
    Closes-Bug: #1800017
    (cherry picked from commit 6779838a242b222672721407cc320672ab24067a)

tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystonemiddleware 6.0.0

This issue was fixed in the openstack/keystonemiddleware 6.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystonemiddleware 5.2.1

This issue was fixed in the openstack/keystonemiddleware 5.2.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystonemiddleware (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.opendev.org/678610

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystonemiddleware (stable/queens)

Reviewed: https://review.opendev.org/678610
Committed: https://git.openstack.org/cgit/openstack/keystonemiddleware/commit/?id=bc03de9ca412805490a39dfbd00b4f938e64895b
Submitter: Zuul
Branch: stable/queens

commit bc03de9ca412805490a39dfbd00b4f938e64895b
Author: Guang Yee <email address hidden>
Date: Thu Oct 25 13:01:23 2018 -0700

    Skip the services with no endpoints when parsing service catalog

    When parsing the service catalog to find the source, audit middleware
    should skip over the services which have no endpoints instead of
    assuming they will have at least one endpoint.

    Change-Id: I287873e99338d95baaf20d52ecb3a43763a401fc
    Closes-Bug: #1800017
    (cherry picked from commit 6779838a242b222672721407cc320672ab24067a)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/keystonemiddleware 4.22.0

This issue was fixed in the openstack/keystonemiddleware 4.22.0 release.

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.