vnflcm op rollback operation does not delete k8s resource created during instantiation

Bug #1933305 reported by Ayumu Ueha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Fix Released
Medium
Ayumu Ueha

Bug Description

CNF instantiate failed and executed `vnflcm op rollback` after transitioning to `FAILED_TEMP` with the resource created on k8s cluster.
The state became to `ROLLED_BACK` after `vnflcm op rollback`, but the created k8s resource was not deleted.
If operate correctly, the rollback command should operate processing of termination and remove the resource.

The execution log is shown as following:

1. CNF instantiate with using vnf package that fails k8s resource creation, and check the operation state is `FAILED_TEMP` and k8s resource created but pending status.

````
$ openstack vnflcm instantiate 26faaad6-58e5-4de8-be03-5f6876e00fa1 instance_k8s_param.json
Instantiate request for VNF Instance 26faaad6-58e5-4de8-be03-5f6876e00fa1 has been accepted.

$ openstack vnflcm op list
+--------------------------------------+-----------------+--------------------------------------+-------------+
| ID | Operation State | VNF Instance ID | Operation |
+--------------------------------------+-----------------+--------------------------------------+-------------+
| 3d44ae3c-e88b-42c0-8bdb-72e81314b932 | FAILED_TEMP | 26faaad6-58e5-4de8-be03-5f6876e00fa1 | INSTANTIATE |
+--------------------------------------+-----------------+--------------------------------------+-------------+

$ kubectl get all
NAME READY STATUS RESTARTS AGE
pod/vdu1-statefulset-0 1/1 Running 0 11m
pod/vdu1-statefulset-1 0/1 Pending 0 11m

NAME READY AGE
statefulset.apps/vdu1-statefulset 1/2 11m
```

2. The rollback command is executed and changes the state to `ROLLED_BACK`, but the k8s resource has not been deleted.

```
$ openstack vnflcm op rollback 3d44ae3c-e88b-42c0-8bdb-72e81314b932
Rollback request for LCM operation 3d44ae3c-e88b-42c0-8bdb-72e81314b932 has been accepted

$ openstack vnflcm op list
+--------------------------------------+-----------------+--------------------------------------+-------------+
| ID | Operation State | VNF Instance ID | Operation |
+--------------------------------------+-----------------+--------------------------------------+-------------+
| 3d44ae3c-e88b-42c0-8bdb-72e81314b932 | ROLLED_BACK | 26faaad6-58e5-4de8-be03-5f6876e00fa1 | INSTANTIATE |
+--------------------------------------+-----------------+--------------------------------------+-------------+

$ kubectl get all
NAME READY STATUS RESTARTS AGE
pod/vdu1-statefulset-0 1/1 Running 0 13m
pod/vdu1-statefulset-1 0/1 Pending 0 13m

NAME READY AGE
statefulset.apps/vdu1-statefulset 1/2 13m
```

Ayumu Ueha (ueha)
description: updated
description: updated
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/+/799131

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

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

commit 149d67c6caf51cb3e54fb6e60f45b89575bba0dc
Author: Ayumu Ueha <email address hidden>
Date: Fri Jul 2 01:55:02 2021 +0000

    Fix cnf rollback after instantiation failure

    This patch fixes the problem that cnf rollback operation does not
    delete the kubernetes resource created during instantiation.

    Closes-Bug: #1933305
    Change-Id: Iecd8f11f5d51a49999f4f0e31a16f41438834f8a

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

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/tacker/+/810280

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

Reviewed: https://review.opendev.org/c/openstack/tacker/+/810280
Committed: https://opendev.org/openstack/tacker/commit/0df88fb22b5f07693cbe2f2e224ad17f61589d84
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 0df88fb22b5f07693cbe2f2e224ad17f61589d84
Author: Ayumu Ueha <email address hidden>
Date: Fri Jul 2 01:55:02 2021 +0000

    Fix cnf rollback after instantiation failure

    This patch fixes the problem that cnf rollback operation does not
    delete the kubernetes resource created during instantiation.

    Closes-Bug: #1933305
    Change-Id: Iecd8f11f5d51a49999f4f0e31a16f41438834f8a

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker 6.0.0.0rc2

This issue was fixed in the openstack/tacker 6.0.0.0rc2 release candidate.

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.