Comment 12 for bug 1886213

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tacker (master)

Reviewed: https://review.opendev.org/760281
Committed: https://git.openstack.org/cgit/openstack/tacker/commit/?id=3798c9f92558116a1821cc0cd4151aebb127e3cd
Submitter: Zuul
Branch: master

commit 3798c9f92558116a1821cc0cd4151aebb127e3cd
Author: Koichiro Den <email address hidden>
Date: Thu Oct 29 12:48:28 2020 +0900

    Fix and avoid an erroneous heat API call

    When the vnf maintenance plugin's implementation of
    project_instance_pre() is called, vnf instance id is likely to be empty
    because, for instance, the stack creation itself has not been done for
    some reason.

    This resolves a FT failue: vnfm.test_vnf_placement_policy.VnfTestCreate
    .test_vnf_with_placement_policy_invalid. _get_instances_with_openstack()
    is called on the cleanup path (delete_vnfd), though the vnf instance id
    is not present because create_vnf must have failed due to the invalid
    placement policy. And you must have seen the following error message in
    the tacker-server log: "heatclient.exc.HTTPNotFound: ERROR:
    The Stack (None) could not be found.", which masked the expected
    tacker.extensions.vnfm.HeatClientException: "["invalid"] is not an
    allowed value ["anti-affinity", "affinity", "soft-anti-affinity",
    "soft-affinity"].

    Related-Bug: #1886213
    Change-Id: I8bd2f7e021476470df6131a7ac8abd402e6e1bd1