NFV strategy create conflict should report what exists

Bug #1989485 reported by Al Bailey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Al Bailey

Bug Description

Brief Description
-----------------
If an existing VIM strategy has been built (or failed) and a new one is created, it reports a conflict but does not indicate which type exists.

Severity
--------
Minor

Steps to Reproduce
------------------
Create a patch strategy
 sw-manager patch-strategy create
Create another strategy (it can be the same type)
 sw-manager patch-strategy create

Expected Behavior
------------------
It should indicate failure so that the user knows how to resolve

Actual Behavior
----------------
It indicates failure , but you need to check every strategy type to see which one to delete

Reproducibility
---------------
100%

System Configuration
--------------------
AIO-SX

Branch/Pull Time/Commit
-----------------------
Sept 13 2022

Last Pass
---------
N/A This is an enhancement request

Timestamp/Logs
--------------
N/A

Test Activity
-------------
Developer Testing

Workaround
----------
Check (and delete) each strategy type
sw-manager patch-strategy show
sw-manager upgrade-strategy show
sw-manager kube-upgrade-strategy show
etc..

Al Bailey (albailey1974)
Changed in starlingx:
assignee: nobody → Al Bailey (albailey1974)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nfv (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/nfv/+/857529

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nfv (master)

Reviewed: https://review.opendev.org/c/starlingx/nfv/+/857529
Committed: https://opendev.org/starlingx/nfv/commit/7ca02243d103a0f4380c3a347b9fdfae789537c1
Submitter: "Zuul (22348)"
Branch: master

commit 7ca02243d103a0f4380c3a347b9fdfae789537c1
Author: Al Bailey <email address hidden>
Date: Tue Sep 13 13:59:21 2022 +0000

    Adding details to VIM API Conflict responses

    When the VIM Stragegy API returns a 409 Conflict for a create,
    it is much more useful to know details about the conflict.
    ie: what type of strategy already exists.

    This fix required:
     - the strategy creation rpc message adds an error string
     - pecan.abort 'conflict' must include the error string
     - the nfv_client code must extract the error string
     - the strategy types must return knowledge of an existing
    strategy type
     - the director class must include details of the existing
    strategy type in its failure messages.

    Test Plan:
      PASS: Create two patch strategies and view the error.
      PASS: Create two different strategies and view the error.
      PASS: View errors when creating multiple strategies
           from horizon.

    Closes-Bug: #1989485
    Signed-off-by: Al Bailey <email address hidden>
    Change-Id: Ic79eab03b70b8bc7fbe2876f95eea3f2f34ab791

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.8.0 stx.nfv
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.