500 Internal Server Error returned when creating duplicated subscriptions

Bug #1933169 reported by YaoYudie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Fix Released
Medium
Yi Feng

Bug Description

When creating two "Individual subscription" resources with the same callbackURI and the same filter,server return an 500 internal error.
However, according to the spec file:
Creation of two "Individual subscription" resources with the same callbackURI and the same filter can result in
performance degradation and will provide duplicates of notifications to the NFVO, and might make sense only in very
rare use cases. Consequently, the VNFM may either allow creating an "Individual subscription" resource if another
"Individual subscription" resource with the same filter and callbackUri already exists (in which case it shall return the
"201 Created" response code), or may decide to not create a duplicate "Individual subscription" resource (in which case
it shall return a "303 See Other" response code referencing the existing "Individual subscription" resource with the same
filter and callbackUri).

curl -i -X POST http://172.22.39.3:9890/vnflcm/v1/subscriptions -H "Content-type: application/json" -H "X-Auth-Token:$OS_AUTH_TOKEN" -d '{"filter": {"vnfInstanceSubscriptionFilter": { "vnfdIds": ["a2bb0ce7-ebca-4fa7-95ed-5840d70a1179" ]}},"callbackUri": "http://127.0.0.1:18080"}'
{
    "seconds": 0.826923,
    "status": 500,
    "body": {
        "tackerFault": {
            "code": 500,
            "message": "The server has either erred or is incapable of performing the requested operation."
        }
    },
    "headers": {
        "Content-Type": "application/json; charset=UTF-8",
        "Content-Length": "127",
        "X-Openstack-Request-Id": "req-5f074502-584d-4183-a6a6-73f9abc95763",
        "Date": "Thu, 25 Feb 2021 07:49:40 GMT",
        "Connection": "keep-alive"
    }
}

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

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/tacker/+/797804

Changed in tacker:
status: New → In Progress
Yasufumi Ogawa (yasufum)
Changed in tacker:
importance: Undecided → Medium
Yasufumi Ogawa (yasufum)
Changed in tacker:
assignee: nobody → Yi Feng (fengyi765)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker (master)

Reviewed: https://review.opendev.org/c/openstack/tacker/+/797804
Committed: https://opendev.org/openstack/tacker/commit/db9b91aecc63657c7f52d68f8ab3146e9839fccd
Submitter: "Zuul (22348)"
Branch: master

commit db9b91aecc63657c7f52d68f8ab3146e9839fccd
Author: Yi Feng <email address hidden>
Date: Thu Jun 24 15:27:51 2021 +0900

    Fix create duplicated subscriptions

    When creating a duplicated subscription, according to spec SOL003,
    the api should return 303 See Other instead of 201 Created.

    To fix this error, the following things is done in this patch:
    1.Fix the error when the database virtual field extracts
    the value from json in table `vnf_lcm_filters`.
    2.Fix the error of sql query statement when querying subscription.
    3.The attribute VnfProductsFromProviders should be an array, not an
    object. Fix this error in UT, FT and schemas.
    4.Fix typos when writing "object" as "objects" in dict "_versions"
    in vnf_lcm schemas.
    5.Rewrite the throwing and catching of SeeOther exception of this
    api to fix the following errors: SeeOther should be thrown instead
    of Exception; the return body should be empty instead of
    ProblemDetail; the return header should contain location instead
    of link.

    Closes-Bug: #1933169
    Change-Id: I51c198d60001dba94dd369f495cecef526e79800

Changed in tacker:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker 7.0.0.0rc1

This issue was fixed in the openstack/tacker 7.0.0.0rc1 release candidate.

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.