ETSI NFV-SOL CNF Healing¶
This document describes how to heal CNF in Tacker v2 API.
Note
The content of this document has been confirmed to work using the following VNF Package.
Overview¶
The diagram below shows an overview of the CNF healing.
Request heal VNF
A user requests tacker-server to heal a VNF or all VNFs with tacker-client by requesting
heal VNF
.Call Kubernetes API
Upon receiving a request from tacker-client, tacker-server redirects it to tacker-conductor. In tacker-conductor, the request is redirected again to an appropriate infra-driver (in this case Kubernetes infra-driver) according to the contents of the instantiate parameters. Then, Kubernetes infra-driver calls Kubernetes APIs.
Re-create Pods
Kubernetes Master re-creates Pods according to the API calls.
Prerequisites¶
The following packages should be installed:
tacker
python-tackerclient
Execute up to “Instantiate VNF” in the procedure of ETSI NFV-SOL CNF (Containerized VNF) Deployment. In other words, the procedure after “Terminate VNF” is not executed.
CNF Healing Procedure¶
As mentioned in Prerequisites and Healing target VNF instance, the VNF must be instantiated before healing.
Details of CLI commands are described in VNF Lifecycle Management with v2 Tacker.
There are two main methods for CNF healing.
Healing of the entire VNF
Heal entire VNF instance by termination and instantiation of the VNF.
Healing specified with VNFC instances
Heal Pod (mapped as VNFC) that is singleton or created using controller resources of Kubernetes such as Deployment, DaemonSet, StatefulSet and ReplicaSet.
Note
A VNFC is a ‘VNF Component’, and one VNFC basically corresponds to one VDU in the VNF. For more information on VNFC, see NFV-SOL002 v3.3.1.
Healing Target VNF Instance¶
Assuming that the following VNF instance exists, this instance will be healed.
$ openstack vnflcm show VNF_INSTANCE_ID --os-tacker-api-version 2 \
-f json | jq .'["Instantiated Vnf Info"]'.vnfcInfo
Result:
[
{
"id": "VDU1-vdu1-749bb6cbbf-dcjpn",
"vduId": "VDU1",
"vnfcResourceInfoId": "vdu1-749bb6cbbf-dcjpn",
"vnfcState": "STARTED"
},
{
"id": "VDU1-vdu1-749bb6cbbf-hmsbh",
"vduId": "VDU1",
"vnfcResourceInfoId": "vdu1-749bb6cbbf-hmsbh",
"vnfcState": "STARTED"
}
]
How to Heal of the Entire VNF¶
Execute Heal of the entire CNF with CLI command and check the name and age of pod information before and after healing. This is to confirm that the name has changed and age has been new after heal.
Pod information before heal:
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
vdu1-749bb6cbbf-dcjpn 1/1 Running 0 7h38m
vdu1-749bb6cbbf-hmsbh 1/1 Running 0 7h38m
Heal entire VNF can be executed by the following CLI command.
$ openstack vnflcm heal VNF_INSTANCE_ID --os-tacker-api-version 2
Result:
Heal request for VNF Instance 431b94b5-d7ba-4d1c-aa26-ecec65d7ee53 has been accepted.
Pod information after heal:
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
vdu1-749bb6cbbf-jgjq9 1/1 Running 0 31s
vdu1-749bb6cbbf-tj4vx 1/1 Running 0 31s
All vnfcResourceInfo
in Instantiated Vnf Info
will be updated from
the VNF Instance displayed in Healing Target VNF Instance.
$ openstack vnflcm show VNF_INSTANCE_ID --os-tacker-api-version 2 \
-f json | jq .'["Instantiated Vnf Info"]'.vnfcInfo
Result:
[
{
"id": "VDU1-vdu1-749bb6cbbf-jgjq9",
"vduId": "VDU1",
"vnfcResourceInfoId": "vdu1-749bb6cbbf-jgjq9",
"vnfcState": "STARTED"
},
{
"id": "VDU1-vdu1-749bb6cbbf-tj4vx",
"vduId": "VDU1",
"vnfcResourceInfoId": "vdu1-749bb6cbbf-tj4vx",
"vnfcState": "STARTED"
}
]
How to Heal Specified with VNFC Instances¶
Execute Heal of the partial CNF CLI command and check the name and age of pod information before and after healing. This is to confirm that the name has changed and age has been new after heal.
Pod information before heal:
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
vdu1-749bb6cbbf-jgjq9 1/1 Running 0 31s
vdu1-749bb6cbbf-tj4vx 1/1 Running 0 31s
Heal specified with VNFC instances can be executed by running openstack vnflcm heal VNF_INSTANCE_ID --vnfc-instance VNFC_INSTANCE_ID.
Note
VNFC_INSTANCE_ID
is instantiatedVnfInfo.vnfcInfo.id
.
$ openstack vnflcm heal VNF_INSTANCE_ID --vnfc-instance VNFC_INSTANCE_ID \
--os-tacker-api-version 2
Result:
Heal request for VNF Instance 431b94b5-d7ba-4d1c-aa26-ecec65d7ee53 has been accepted.
Pod information after heal:
$ kubectl get pod
NAME READY STATUS RESTARTS AGE
vdu1-749bb6cbbf-6mbsl 1/1 Running 0 86s
vdu1-749bb6cbbf-tj4vx 1/1 Running 0 9m59s
$ openstack vnflcm show VNF_INSTANCE_ID --os-tacker-api-version 2 \
-f json | jq .'["Instantiated Vnf Info"]'.vnfcInfo
Result:
[
{
"id": "VDU1-vdu1-749bb6cbbf-6mbsl",
"vduId": "VDU1",
"vnfcResourceInfoId": "vdu1-749bb6cbbf-6mbsl",
"vnfcState": "STARTED"
},
{
"id": "VDU1-vdu1-749bb6cbbf-tj4vx",
"vduId": "VDU1",
"vnfcResourceInfoId": "vdu1-749bb6cbbf-tj4vx",
"vnfcState": "STARTED"
}
]