In current implementation, if the tacker servers go down during LCM
operation, the operation state will be fixed to `PROCESSING` even after
servers restart. Once this problem happens, users cannot change the
operation state with APIs, which means users have to change the state by
updating DB directly.
This patch fixes this problem by adding a `/vnf_lcm_op_occs/{id}/cancel`
endpoint according to ETSI NFV SOL003 [1]. Users can change the state of
LCM operations in `PROCESSING` to `FAILED_TEMP` with this API.
Note that currently the cancel API support only a transition from
PROCESSING -> FAILED_TEMP (i.e., transitions from ROLLING_BACK and
STARTING are not supported)
In addition, as the current ``_get_affected_resources`` doesn't work
correctly when there are no updated resources, this patch modify
``utils.py`` [2] to fix it and update the tests [3] depending on
``utils.py``.
Reviewed: https:/ /review. opendev. org/c/openstack /tacker/ +/815416 /opendev. org/openstack/ tacker/ commit/ d40de6c71ecf9d5 d31d31ddc94b4ae 8ad40f2ca8
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit d40de6c71ecf9d5 d31d31ddc94b4ae 8ad40f2ca8
Author: Hiromu Asahina <email address hidden>
Date: Fri Oct 29 23:02:03 2021 +0900
Fix LCM failure
In current implementation, if the tacker servers go down during LCM
operation, the operation state will be fixed to `PROCESSING` even after
servers restart. Once this problem happens, users cannot change the
operation state with APIs, which means users have to change the state by
updating DB directly.
This patch fixes this problem by adding a `/vnf_lcm_ op_occs/ {id}/cancel`
endpoint according to ETSI NFV SOL003 [1]. Users can change the state of
LCM operations in `PROCESSING` to `FAILED_TEMP` with this API.
Note that currently the cancel API support only a transition from
PROCESSING -> FAILED_TEMP (i.e., transitions from ROLLING_BACK and
STARTING are not supported)
In addition, as the current ``_get_ affected_ resources` ` doesn't work
correctly when there are no updated resources, this patch modify
``utils.py`` [2] to fix it and update the tests [3] depending on
``utils.py``.
[1] https:/ /www.etsi. org/deliver/ etsi_gs/ NFV-SOL/ 001_099/ 003/03. 05.01_60/ gs_NFV- SOL003v030501p. pdf vnflcm/ utils.py tests/unit/ conductor/ test_conductor_ server. py
[2] tacker/
[3] tacker/
Change-Id: I54aa967be7903c 064433f01adf0f9 9074577a8da
Closes-bug: #1924917
Signed-off-by: Hiromu Asahina <email address hidden>