diff --git a/api-ref/source/v2/parameters_vnflcm.yaml b/api-ref/source/v2/parameters_vnflcm.yaml index 803c90097..30ff53b17 100644 --- a/api-ref/source/v2/parameters_vnflcm.yaml +++ b/api-ref/source/v2/parameters_vnflcm.yaml @@ -287,6 +287,13 @@ cause: in: body required: false type: string +change_current_vnf_package_additional_params: + description: | + Additional parameters passed by the NFVO as input to the process, + specific to the VNF of which upgrade_type is selected. + in: body + required: true + type: key value pairs change_ext_vnf_connectivity_additional_params: description: | Additional parameters passed by the NFVO as input to the process, @@ -301,6 +308,13 @@ change_ext_vnf_connectivity_ext_virtual_links: in: body required: true type: array +change_vnfpkg_vnfd_id: + description: | + Identifier of the VNFD which defines the destination + VNF Package for the change. + in: body + required: true + type: string changed_ext_connectivity: description: | Information about changed external connectivity, @@ -938,10 +952,14 @@ operation_params: HEAL: HealVnfRequest + CHANGE_EXT_CONN: ChangeExtVnfConnectivityRequest + TERMINATE: TerminateVnfRequest MODIFY_INFO: VnfInfoModificationRequest + CHANGE_VNFPKG: ChangeCurrentVnfPkgRequest + This attribute shall be present if this data type is returned in a response to reading an individual resource, and may be present according to the chosen attribute selector diff --git a/api-ref/source/v2/samples/vnflcm/change-vnfpkg-request.json b/api-ref/source/v2/samples/vnflcm/change-vnfpkg-request.json new file mode 100644 index 000000000..cfee9c977 --- /dev/null +++ b/api-ref/source/v2/samples/vnflcm/change-vnfpkg-request.json @@ -0,0 +1,35 @@ +{ + "vnfdId": "c6595341-a5bb-8246-53c4-7aeb843d60c5", + "additionalParams": { + "upgrade_type": "RollingUpdate", + "lcm-operation-coordinate-old-vnf": "./Scripts/coordinate_old_vnf.py", + "lcm-operation-coordinate-old-vnf-class": "CoordinateOldVnf", + "lcm-operation-coordinate-new-vnf": "./Scripts/coordinate_new_vnf.py", + "lcm-operation-coordinate-new-vnf-class": "CoordinateNewVnf", + "vdu_params": [{ + "vdu_id": "VDU1", + "old_vnfc_param": { + "cp_name": "VDU1_CP1", + "username": "ubuntu", + "password": "ubuntu" + }, + "new_vnfc_param": { + "cp_name": "VDU1_CP1", + "username": "ubuntu", + "password": "ubuntu" + } + }, { + "vdu_id": "VDU2", + "old_vnfc_param": { + "cp_name": "VDU2_CP1", + "username": "ubuntu", + "password": "ubuntu" + }, + "new_vnfc_param": { + "cp_name": "VDU2_CP1", + "username": "ubuntu", + "password": "ubuntu" + } + }] + } +} \ No newline at end of file diff --git a/api-ref/source/v2/vnflcm.inc b/api-ref/source/v2/vnflcm.inc index 66224a018..d73da83bc 100644 --- a/api-ref/source/v2/vnflcm.inc +++ b/api-ref/source/v2/vnflcm.inc @@ -782,6 +782,46 @@ Request Example .. literalinclude:: samples/vnflcm/change-ext-conn-request.json :language: javascript +Change Current VNF Package (v2) +===================================== + +.. rest_method:: POST /vnflcm/v2/vnf_instances/{vnfInstanceId}/change_vnfpkg + +This task resource represents the "Change Current VNF Package" operation. +The client can use this resource to change current vnf package of a VNF instance. + +The POST method changes current vnf package of a VNF instance. + +Response Codes +-------------- + +.. rest_status_code:: success status.yaml + + - 202 + +.. rest_status_code:: error status.yaml + + - 400 + - 401 + - 404 + - 409 + - 422 + +Request Parameters +------------------ + +.. rest_parameters:: parameters_vnflcm.yaml + + - vnfInstanceId: vnf_instance_id + - vnfdId: change_vnfpkg_vnfd_id + - additionalParams: change_current_vnf_package_additional_params + +Request Example +--------------- + +.. literalinclude:: samples/vnflcm/change-vnfpkg-request.json + :language: javascript + Show VNF LCM operation occurrence (v2) ====================================== diff --git a/doc/source/_images/etsi_cnf_change_current_vnf_package.png b/doc/source/_images/etsi_cnf_change_current_vnf_package.png new file mode 100644 index 000000000..a05146496 Binary files /dev/null and b/doc/source/_images/etsi_cnf_change_current_vnf_package.png differ diff --git a/doc/source/_images/etsi_cnf_change_current_vnf_package.pu b/doc/source/_images/etsi_cnf_change_current_vnf_package.pu new file mode 100644 index 000000000..ce220b927 --- /dev/null +++ b/doc/source/_images/etsi_cnf_change_current_vnf_package.pu @@ -0,0 +1,35 @@ +@startuml + +frame "python-tackerclient" { + component "tacker-client" as client +} + +frame "tacker" { + component "tacker-server" { + component "server" as serv + } + component "tacker-conductor" { + component "conductor" as cond + component "Kubernetes\ninfra-driver" as infra + } +} + +node "Kubernetes\nCluster\n(Master)" as k8s_m +cloud "Hardware Resources" as hw { + node "Kubernetes\nCluster\n(Worker)" as k8s_w { + node "Deployment" as ins1 + node "Deployment" as ins2 + } +} + + +'# Relationships +client --> serv: 1. Request \n Change Current VNF Package +serv --> cond +cond --> infra +infra -right-> k8s_m: 2. Call Kubernetes\n API +k8s_m --> ins1: 3. Change the image of Container \n defined in the manifest file of Deployment +k8s_m --> ins2 +ins1 -[hidden]right-> ins2 + +@enduml diff --git a/doc/source/_images/etsi_vnf_change_current_vnf_package.png b/doc/source/_images/etsi_vnf_change_current_vnf_package.png new file mode 100644 index 000000000..88c14fede Binary files /dev/null and b/doc/source/_images/etsi_vnf_change_current_vnf_package.png differ diff --git a/doc/source/_images/etsi_vnf_change_current_vnf_package.pu b/doc/source/_images/etsi_vnf_change_current_vnf_package.pu new file mode 100644 index 000000000..ae121e6c1 --- /dev/null +++ b/doc/source/_images/etsi_vnf_change_current_vnf_package.pu @@ -0,0 +1,33 @@ +@startuml + +frame "python-tackerclient" { + component "tacker-client" as client +} + +frame "tacker" { + component "tacker-server" { + component "server" as serv + } + component "tacker-conductor" { + component "conductor" as cond + component "OpenStack\ninfra-driver" as infra + } +} + +node "OpenStack\nHeat" as heat +cloud "Hardware Resources" as hw { + node "VM" as ins1 + node "VM" as ins2 +} + + +'# Relationships +client --> serv: 1. Request \n Change Current VNF Package +serv --> cond +cond --> infra +infra -right-> heat: 2. Call OpenStack\n Heat API +heat --> ins1: 3. Change the image of VMs +heat --> ins2 +ins1 -[hidden]right-> ins2 + +@enduml diff --git a/doc/source/cli/cli-etsi-vnflcm.rst b/doc/source/cli/cli-etsi-vnflcm.rst index 870e6a920..8dfcef73b 100644 --- a/doc/source/cli/cli-etsi-vnflcm.rst +++ b/doc/source/cli/cli-etsi-vnflcm.rst @@ -25,9 +25,17 @@ CLI Reference for VNF Lifecycle Management .. note:: In Yoga release, version 2 vnflcm APIs of instantiate vnf, - terminate vnf, scale vnf, heal vnf, change external vnf connectivity, - rollback, retry and fail only support VNF, not CNF. CNF will be supported - by version 2 vnflcm APIs in future releases. + terminate vnf, change current vnf package and fail both support VNF and + CNF. Version 2 vnflcm APIs of scale vnf, heal vnf and + change external vnf connectivity only support VNF, not CNF. Rollback and + retry with all lifecycle only support VNF, only rollback and retry change + current vnf package support CNF. Other operation by version 2 vnflcm APIs + will support CNF in future releases. + +.. note:: + Change current vnf package only support version 2 vnflcm APIs. In Yoga + release, it only suuport `RollingUpdate` upgrade type, `BlueGreen` will be + supported in future releases. 1. Create VNF Identifier ^^^^^^^^^^^^^^^^^^^^^^^^ @@ -448,7 +456,40 @@ Help: -h, --help show this help message and exit -11. Rollback VNF Lifecycle Management Operation +11. Change Current VNF Package +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. code-block:: console + + $ openstack vnflcm change-vnfpkg VNF_INSTANCE_ID \ + ./sample_param_file.json + + +Result: + +.. code-block:: console + + Change Current VNF Package for VNF Instance 725f625e-f6b7-4bcd-b1b7-7184039fde45 has been accepted. + + +Help: + +.. code-block:: console + + $ openstack vnflcm change-vnfpkg --os-tacker-api-version 2 --help + usage: openstack vnflcm change-vnfpkg [-h] + + Change Current VNF Package + + positional arguments: + VNF instance ID to Change Current VNF Package + Specify change-vnfpkg request parameters in a json file. + + optional arguments: + -h, --help show this help message and exit. + + +12. Rollback VNF Lifecycle Management Operation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The `VNF_LCM_OP_OCC_ID` is the ID for the target lifecycle temporary failed. @@ -479,7 +520,7 @@ Help: -h, --help show this help message and exit -12. Retry +13. Retry ^^^^^^^^^ The `VNF_LCM_OP_OCC_ID` is the ID for the target lifecycle temporary failed. @@ -512,7 +553,7 @@ Help: -h, --help show this help message and exit -13. Fail +14. Fail ^^^^^^^^ The `VNF_LCM_OP_OCC_ID` is the ID for the target lifecycle temporary failed. @@ -640,7 +681,7 @@ Help: -h, --help show this help message and exit -14. List LCM Operation Occurrences +15. List LCM Operation Occurrences ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: console @@ -687,7 +728,7 @@ Help: tacker server will throw bad request error -15. Show LCM Operation Occurrence +16. Show LCM Operation Occurrence ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: console @@ -751,7 +792,7 @@ Help: -h, --help show this help message and exit -16. Show VNF LCM API versions +17. Show VNF LCM API versions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: console diff --git a/doc/source/user/etsi_cnf_change_current_vnf_package.rst b/doc/source/user/etsi_cnf_change_current_vnf_package.rst new file mode 100644 index 000000000..a4de4fd54 --- /dev/null +++ b/doc/source/user/etsi_cnf_change_current_vnf_package.rst @@ -0,0 +1,527 @@ +=========================================== +ETSI NFV-SOL CNF Change Current VNF Package +=========================================== + +This document describes how to change current VNF package for CNF in Tacker. + +Overview +-------- + +The diagram below shows an overview of changing current vnf package. + +1. Request Change Current VNF Package + + A user requests tacker-server to change vnf package for vnf instance + with tacker-client by requesting ``change current vnf package``. + +2. 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 vnf instance. Then, Kubernetes infra-driver calls + Kubernetes APIs. + +3. Change the image of Container defined in the manifest file of Deployment + + Kubernetes Master update the image of Container defined in the manifest + file of Deployment according to the API calls. + +.. figure:: ../_images/etsi_cnf_change_current_vnf_package.png + :align: left + +Prerequisites +------------- + +The following packages should be installed: + +* tacker +* python-tackerclient + +You can refer to :doc:`./etsi_containerized_vnf_usage_guide` for the +procedure of preparation for changing current vnf package operation from +"register VIM" to "Instantiate VNF". + +You can also refer to :doc:`./vnf-package` for the operation of uploading +vnf package. + +The sample packages for CNF can be obtained from the following links. + +* `VNF Package for Common instantiate`_ +* `VNF Package for Change Current VNF Package`_ + + +The operation for Change Current VNF Package is need to be +executed before "Terminate VNF" in the procedure of +:doc:`./etsi_vnf_deployment_as_vm_with_tosca`. + + +Change Current VNF Package +-------------------------- + +As mentioned in Prerequisites, the VNF must be created +before performing change current VNF package. + +You need to upload the vnf package you want to change to before +executing `change-vnfpkg` command. + +Details of CLI commands are described in +:doc:`../cli/cli-etsi-vnflcm`. + +For changing current VNF package, you need to prepare a JSON-formatted +definition file before running command for changing the vnf package. + +sample_param_file_for_specified_resources.json: + +.. code-block:: json + + { + "vnfdId": "c6595341-a5bb-8246-53c4-7aeb843d60c5", + "additionalParams": { + "upgrade_type": "RollingUpdate", + "lcm-operation-coordinate-old-vnf": "./Scripts/coordinate_old_vnf.py", + "lcm-operation-coordinate-old-vnf-class": "CoordinateOldVnf", + "lcm-operation-coordinate-new-vnf": "./Scripts/coordinate_new_vnf.py", + "lcm-operation-coordinate-new-vnf-class": "CoordinateNewVnf", + "lcm-kubernetes-def-files": ["Files/new_kubernetes/new_deployment.yaml"], + "vdu_params": [{ + "vdu_id": "VDU1" + }] + } + } + +sample_param_file_without_specified_resources.json: + +.. code-block:: json + + { + "vnfdId": "c6595341-a5bb-8246-53c4-7aeb843d60c5", + "additionalParams": { + "upgrade_type": "RollingUpdate", + "lcm-operation-coordinate-old-vnf": "./Scripts/coordinate_old_vnf.py", + "lcm-operation-coordinate-old-vnf-class": "CoordinateOldVnf", + "lcm-operation-coordinate-new-vnf": "./Scripts/coordinate_new_vnf.py", + "lcm-operation-coordinate-new-vnf-class": "CoordinateNewVnf" + } + } + +.. note:: sample_param_file_for_specified_resources.json contains + all optional parameters. + ``vnfdId`` is the vnfd id of the new vnf package you uploaded. + ``vdu_params`` is VDU information of target VDU to update. + Specifying a vdu_params is required for OpenStack VIM and not + required for Kubernetes VIM. + +.. note:: Currently, this operation only supports some functions of + `Change Current VNF Package`. + + * There are several ways to update deployment. But in Yoga version, only + support `RollingUpdate` type. You can set it via `upgrade_type` param. + + * Currently only support update images of deployment. + + * Currently unsupported updates: + + * This API currently does not support increasing or decreasing the number + of Pods according to the vnf package. + * The add and delete operations of the entire deployment are not + supported. + * In the definition of ETSI, external networks (e.g. extVirtualLinks, + extManagedVirtualLinks) can be modified. This API currently does not + support the operations of modifying, adding, and deleting these + networks. + + +How to Change Current VNF Package with specified resource +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +We can update only specific kubernetes resources (e.g. deployment) by +specifying the file path of the kubernetes definition file in the +`lcm-kubernetes-def-files` and vdu information in `vdu_params` +of the `change current VNF package` request parameter file +(e.g. sample_param_file_for_specified_resources.json). + +Execute Change Current VNF Package CLI command. After complete this change +operation you should check resource status by Kubernetes CLI commands. + +1. check deployment's image information. This is to confirm that deployment's +image has changed before and after operation. + +2. check the age of deployment and pods under this deployment. This is to +confirm that the deployment has not redeployed before and after operation, +and the pods under this deployment have redeployed. + +3. check the status and name of pods under this deployment. This is to confirm +that the status of pods under this deployment are running, the name of pods +under this deployment has changed before and after operation. + +Deployment information before operation: + +.. code-block:: console + + $ kubectl get deployment -o wide -n curry + +Result: + +.. code-block:: console + + NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR + vdu2 2/2 2 2 20s nginx nginx app=webserver + +Deployment detailed information before operation: + +.. code-block:: console + + $ kubectl describe deployment vdu2 -n curry + +Result: + +.. code-block:: console + + Name: vdu2 + Namespace: curry + CreationTimestamp: Tue, 22 Mar 2022 03:04:03 +0000 + Labels: + Annotations: deployment.kubernetes.io/revision: 1 + Selector: app=webserver + Replicas: 2 desired | 2 updated | 2 total | 2 available | 0 unavailable + StrategyType: RollingUpdate + MinReadySeconds: 0 + RollingUpdateStrategy: 25% max unavailable, 25% max surge + Pod Template: + Labels: app=webserver + Containers: + nginx: + Image: nginx + Port: 80/TCP + Host Port: 0/TCP + Limits: + memory: 200Mi + Requests: + memory: 100Mi + Environment: + Mounts: + Volumes: + Conditions: + Type Status Reason + ---- ------ ------ + Available True MinimumReplicasAvailable + Progressing True NewReplicaSetAvailable + OldReplicaSets: + NewReplicaSet: vdu2-674d7d8766 (2/2 replicas created) + Events: + Type Reason Age From Message + ---- ------ ---- ---- ------- + Normal ScalingReplicaSet 37s deployment-controller Scaled up replica set vdu2-674d7d8766 to 2 + +Pods information before operation: + +.. code-block:: console + + $ kubectl get pods -o wide -n curry + + +Result: + +.. code-block:: console + + NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES + vdu2-674d7d8766-8mcb6 1/1 Running 0 72s 10.233.96.15 node2 + vdu2-674d7d8766-tmlhd 1/1 Running 0 72s 10.233.96.14 node2 + Annotations: deployment.kubernetes.io/revision: 2 + Selector: app=webserver + Replicas: 2 desired | 2 updated | 2 total | 2 available | 0 unavailable + StrategyType: RollingUpdate + MinReadySeconds: 0 + RollingUpdateStrategy: 25% max unavailable, 25% max surge + Pod Template: + Labels: app=webserver + Containers: + nginx: + Image: nginx:alpine + Port: 80/TCP + Host Port: 0/TCP + Limits: + memory: 200Mi + Requests: + memory: 100Mi + Environment: + Mounts: + Volumes: + Conditions: + Type Status Reason + ---- ------ ------ + Available True MinimumReplicasAvailable + Progressing True NewReplicaSetAvailable + OldReplicaSets: + NewReplicaSet: vdu2-6696c74f5c (2/2 replicas created) + Events: + Type Reason Age From Message + ---- ------ ---- ---- ------- + Normal ScalingReplicaSet 6m46s deployment-controller Scaled up replica set vdu2-674d7d8766 to 2 + Normal ScalingReplicaSet 78s deployment-controller Scaled up replica set vdu2-6696c74f5c to 1 + Normal ScalingReplicaSet 67s deployment-controller Scaled down replica set vdu2-674d7d8766 to 1 + Normal ScalingReplicaSet 67s deployment-controller Scaled up replica set vdu2-6696c74f5c to 2 + Normal ScalingReplicaSet 55s deployment-controller Scaled down replica set vdu2-674d7d8766 to 0 + +.. note:: ``image`` has changed from `nginx` to `nginx:alpine`. + The age of deployment `vdu2` has not been reset, so deployment `vdu2` + has not redeployed. + +Pods information after operation: + +.. code-block:: console + + $ kubectl get pods -o wide -n curry + +Result: + +.. code-block:: console + + NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES + vdu2-6696c74f5c-9xwvv 1/1 Running 0 114s 10.233.96.17 node2 + vdu2-6696c74f5c-kgtjt 1/1 Running 0 2m5s 10.233.96.16 node2 + +.. note:: `name` of pods has changed before and after operation. + The age of pods under deployment has been reset, so pods under + this deployment has redeployed before and after operation. + +How to Change Current VNF Package without specified resource +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +We can update all kubernetes deployment resources by not +specifying the file path of the kubernetes definition file in the +`lcm-kubernetes-def-files` and vdu information in `vdu_params` +of the `change current VNF package` request parameter file +(e.g. sample_param_file_without_specified_resources.json). + +Execute Change Current VNF Package CLI command. After complete this change +operation you should check resource status by Kubernetes CLI commands. + +1. check all deployments' image information. This is to confirm that +all deployments' images have changed before and after operation. + +2. check the ages of deployments and pods under each deployment. This is to +confirm that the deployments have not redeployed before and after operation, +and the pods under each deployment have redeployed. + +3. check the status and name of pods under this deployment. This is to confirm +that the status of pods under deployments are running, the names of pods +under deployments have changed before and after operation. + +Deployments information before operation: + +.. code-block:: console + + $ kubectl get deployment -o wide + + +Result: + +.. code-block:: console + + NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR + vdu2 2/2 2 2 14s nginx nginx app=webserver + +Deployment detailed information before operation: + +.. code-block:: console + + $ kubectl describe deployment vdu2 + +Result: + +.. code-block:: console + + Name: vdu2 + Namespace: default + CreationTimestamp: Tue, 22 Mar 2022 05:38:12 +0000 + Labels: + Annotations: deployment.kubernetes.io/revision: 1 + Selector: app=webserver + Replicas: 2 desired | 2 updated | 2 total | 2 available | 0 unavailable + StrategyType: RollingUpdate + MinReadySeconds: 0 + RollingUpdateStrategy: 25% max unavailable, 25% max surge + Pod Template: + Labels: app=webserver + Containers: + nginx: + Image: nginx + Port: 80/TCP + Host Port: 0/TCP + Limits: + memory: 200Mi + Requests: + memory: 100Mi + Environment: + Mounts: + Volumes: + Conditions: + Type Status Reason + ---- ------ ------ + Available True MinimumReplicasAvailable + Progressing True NewReplicaSetAvailable + OldReplicaSets: + NewReplicaSet: vdu2-674d7d8766 (2/2 replicas created) + Events: + Type Reason Age From Message + ---- ------ ---- ---- ------- + Normal ScalingReplicaSet 73s deployment-controller Scaled up replica set vdu2-674d7d8766 to 2 + +Pods information before operation: + +.. code-block:: console + + $ kubectl get pods -o wide + +Result: + +.. code-block:: console + + NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES + vdu2-674d7d8766-9bbnp 1/1 Running 0 2m13s 10.233.96.19 node2 + vdu2-674d7d8766-r9wz5 1/1 Running 0 2m13s 10.233.96.18 node2 + +Change Current VNF Package execution of the entire VNF: + +.. code-block:: console + + $ openstack vnflcm change-vnfpkg VNF_INSTANCE_ID \ + ./sample_param_file_without_specified_resources.json + +Result: + +.. code-block:: console + + Change Current VNF Package for VNF Instance 51dc9635-aaf0-4acf-b069-86017a39e2f4 has been accepted. + +Deployments information after operation: + +.. code-block:: console + + $ kubectl get deployment -o wide + +Result: + +.. code-block:: console + + NAME READY UP-TO-DATE AVAILABLE AGE CONTAINERS IMAGES SELECTOR + vdu2 2/2 2 2 19m nginx nginx:alpine app=webserver + +Deployment detailed information after operation: + +.. code-block:: console + + $ kubectl describe deployment vdu2 + +Result: + +.. code-block:: console + + Name: vdu2 + Namespace: default + CreationTimestamp: Tue, 22 Mar 2022 05:38:12 +0000 + Labels: + Annotations: deployment.kubernetes.io/revision: 2 + Selector: app=webserver + Replicas: 2 desired | 2 updated | 2 total | 2 available | 0 unavailable + StrategyType: RollingUpdate + MinReadySeconds: 0 + RollingUpdateStrategy: 25% max unavailable, 25% max surge + Pod Template: + Labels: app=webserver + Containers: + nginx: + Image: nginx:alpine + Port: 80/TCP + Host Port: 0/TCP + Limits: + memory: 200Mi + Requests: + memory: 100Mi + Environment: + Mounts: + Volumes: + Conditions: + Type Status Reason + ---- ------ ------ + Available True MinimumReplicasAvailable + Progressing True NewReplicaSetAvailable + OldReplicaSets: + NewReplicaSet: vdu2-6696c74f5c (2/2 replicas created) + Events: + Type Reason Age From Message + ---- ------ ---- ---- ------- + Normal ScalingReplicaSet 20m deployment-controller Scaled up replica set vdu2-674d7d8766 to 2 + Normal ScalingReplicaSet 15m deployment-controller Scaled up replica set vdu2-6696c74f5c to 1 + Normal ScalingReplicaSet 14m deployment-controller Scaled down replica set vdu2-674d7d8766 to 1 + Normal ScalingReplicaSet 14m deployment-controller Scaled up replica set vdu2-6696c74f5c to 2 + Normal ScalingReplicaSet 14m deployment-controller Scaled down replica set vdu2-674d7d8766 to 0 + +.. note:: ``image`` has changed from `nginx` to `nginx:alpine`. + The age of deployment `vdu2` has not been reset, so deployment `vdu2` + has not redeployed. + +Pods information after operation: + +.. code-block:: console + + $ kubectl get pods -o wide + +Result: + +.. code-block:: console + + NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES + vdu2-6696c74f5c-cjdh8 1/1 Running 0 15m 10.233.96.21 node2 + vdu2-6696c74f5c-ssztd 1/1 Running 0 15m 10.233.96.20 node2 + +.. note:: `name` of pods has changed before and after operation. + The age of pods under deployment has been reset, so pods under + this deployment has redeployed before and after operation. + +.. _VNF Package for Common instantiate: https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_kubernetes_v2/samples/test_instantiate_cnf_resources/contents +.. _VNF Package for Change Current VNF Package: https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_kubernetes_v2/samples/test_change_vnf_pkg_with_deployment/contents diff --git a/doc/source/user/etsi_use_case_guide.rst b/doc/source/user/etsi_use_case_guide.rst index 250dec700..047146d26 100644 --- a/doc/source/user/etsi_use_case_guide.rst +++ b/doc/source/user/etsi_use_case_guide.rst @@ -86,6 +86,25 @@ VM etsi_vnf_change_external_vnf_connectivity +Change Current VNF Package +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +VM +~~ + +.. toctree:: + :maxdepth: 1 + + etsi_vnf_change_current_vnf_package + +Container +~~~~~~~~~ + +.. toctree:: + :maxdepth: 1 + + etsi_cnf_change_current_vnf_package + Error Handling ^^^^^^^^^^^^^^ diff --git a/doc/source/user/etsi_vnf_change_current_vnf_package.rst b/doc/source/user/etsi_vnf_change_current_vnf_package.rst new file mode 100644 index 000000000..4f34941f9 --- /dev/null +++ b/doc/source/user/etsi_vnf_change_current_vnf_package.rst @@ -0,0 +1,1269 @@ +=========================================== +ETSI NFV-SOL VNF Change Current VNF Package +=========================================== + +This document describes how to change current VNF package for VNF in Tacker. + +Overview +-------- + +The diagram below shows an overview of changing current vnf package. + +1. Request Change Current VNF Package + + A user requests tacker-server to change vnf package for vnf instance + with tacker-client by requesting ``change current vnf package``. + +2. Call OpenStack Heat 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 OpenStack infra-driver) according + to the contents of vnf instance. Then, OpenStack infra-driver calls + OpenStack Heat APIs. + +3. Change the image of VMs + + OpenStack Heat change the image of VMs according to the API calls. + +.. figure:: ../_images/etsi_vnf_change_current_vnf_package.png + :align: left + +Prerequisites +------------- + +The following packages should be installed: + +* tacker +* python-tackerclient + +A default VIM should be registered according to +:doc:`../cli/cli-legacy-vim`. + +You can refer to :doc:`./vnf-package` for the operation of uploading +vnf package. + +The sample packages for the following four cases can be obtained from +the following links. + +* `VNF Package for Common instantiate`_ + +* `change from image to image`_ flavour_id=image + +* `change from image to volume`_ flavour_id=image + +* `change from volume to image`_ flavour_id=volume + +* `change from volume to volume`_ flavour_id=volume + +.. note:: + You can deploy a VM directly by image, or you can create a volume by image + first, and then create a VM by the volume. Therefore, when updating the + image of the VM, there will be four cases. The above four links correspond + to four cases respectively. + + Use the common vnf package and the flavor_id after the above four links to + instantiate, and then use the vnf package in the corresponding link to + execute `change current vnf package` operation, you can update the image + of the VM in the following four ways. + + 1. change VM created by image to VM created by new image + + 2. change VM created by image to VM created by volume + + 3. change VM created by volume to VM created by image + + 4. change VM created by volume to VM created by new volume + +The operation for Change Current VNF Package is need to be +executed before "Terminate VNF" in the procedure of +:doc:`./etsi_vnf_deployment_as_vm_with_tosca`. + +Change Current VNF Package +-------------------------- + +As mentioned in Prerequisites, the VNF must be created +before performing change current VNF package. + +You need to upload the vnf package you want to change to before +executing `change-vnfpkg` command. + +Details of CLI commands are described in +:doc:`../cli/cli-etsi-vnflcm`. + +For changing current VNF package, you need to prepare a JSON-formatted +definition file before running command for changing the vnf package. + +sample_param_file_for_multi_resources.json: + +.. code-block:: json + + { + "vnfdId": "c6595341-a5bb-8246-53c4-7aeb843d60c5", + "additionalParams": { + "upgrade_type": "RollingUpdate", + "lcm-operation-coordinate-old-vnf": "./Scripts/coordinate_old_vnf.py", + "lcm-operation-coordinate-old-vnf-class": "CoordinateOldVnf", + "lcm-operation-coordinate-new-vnf": "./Scripts/coordinate_new_vnf.py", + "lcm-operation-coordinate-new-vnf-class": "CoordinateNewVnf", + "vdu_params": [{ + "vdu_id": "VDU1", + "old_vnfc_param": { + "cp_name": "VDU1_CP1", + "username": "ubuntu", + "password": "ubuntu" + }, + "new_vnfc_param": { + "cp_name": "VDU1_CP1", + "username": "ubuntu", + "password": "ubuntu" + } + }, { + "vdu_id": "VDU2", + "old_vnfc_param": { + "cp_name": "VDU2_CP1", + "username": "ubuntu", + "password": "ubuntu" + }, + "new_vnfc_param": { + "cp_name": "VDU2_CP1", + "username": "ubuntu", + "password": "ubuntu" + } + }] + } + } + +sample_param_file_for_single_resource.json: + +.. code-block:: json + + { + "vnfdId": "c6595341-a5bb-8246-53c4-7aeb843d60c5", + "additionalParams": { + "upgrade_type": "RollingUpdate", + "lcm-operation-coordinate-old-vnf": "./Scripts/coordinate_old_vnf.py", + "lcm-operation-coordinate-old-vnf-class": "CoordinateOldVnf", + "lcm-operation-coordinate-new-vnf": "./Scripts/coordinate_new_vnf.py", + "lcm-operation-coordinate-new-vnf-class": "CoordinateNewVnf", + "vdu_params": [{ + "vdu_id": "VDU2", + "old_vnfc_param": { + "cp_name": "VDU2_CP1", + "username": "ubuntu", + "password": "ubuntu" + }, + "new_vnfc_param": { + "cp_name": "VDU2_CP1", + "username": "ubuntu", + "password": "ubuntu" + } + }] + } + } + +.. note:: sample_param_file_for_multi_resources.json contains all optional + parameters. It can be used to change image for both VDU created by + `OS::Heat::AutoScalingGroup` and single VDU. + sample_param_file_for_single_resource.json only used to change image for + single VDU. + ``vnfdId`` is the vnfd id of the new vnf package you uploaded. + +.. note:: Currently, this operation only supports some functions of + `Change Current VNF Package`. + + * There are several ways to update VDUs. But in Yoga version, only + support `RollingUpdate` type. You can set it via `upgrade_type` param. + + * Currently only support update images of VMs. + + * Currently unsupported updates: + + * This API currently does not support increasing or decreasing the number + of VNFcs according to the vnf package. + * The add and delete operations of the entire VDU are not supported. + * In the definition of ETSI, external networks (e.g. extVirtualLinks, + extManagedVirtualLinks) can be modified. This API currently does not + support the operations of modifying, adding, and deleting these + networks. + + +How to Change VM created by image to VM created by new image +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Execute Change Current VNF Package CLI command. After complete this change +operation you should check resource status by Heat CLI commands. + +1. check 'ID' and 'Stack Status' of the stack before and after operation. +This is to confirm that stack 'ID' has changed before and after operation, +and that the Stack update has been updated successfully. + +2. check 'physical_resource_id' and 'resource_status' of the VDU and VDU's +parent resource. This is to confirm that 'physical_resource_id' has no change +before and after operation, and that the resource_status has been updated +successfully. + +3. check 'image' information of VDU before and after operation. This is to +confirm that VDU's has changed successfully. +See `Heat CLI reference`_. for details on Heat CLI commands. + +.. note:: + Both single VM and VM created by `OS::Heat::AutoScalingGroup` support + change from image to image. + The single VM is created directly by `OS::Nova::Server` defined in the + top heat template. + +* Check point 1 before operation + + Stack information before operation: + + .. code-block:: console + + $ openstack stack list -c 'ID' -c 'Stack Name' -c 'Stack Status' + + Result: + + .. code-block:: console + + +--------------------------------------+------------------------------------------+-----------------+ + | ID | Stack Name | Stack Status | + +--------------------------------------+------------------------------------------+-----------------+ + | 5330ea82-0fd6-4a29-a796-0646e7c6815f | vnf-7f8e5afa-101e-4e0b-a936-62fe01ef1b25 | CREATE_COMPLETE | + +--------------------------------------+------------------------------------------+-----------------+ + +* Check point 2 before operation + + Stack resource information before operation: + + .. code-block:: console + + $ openstack stack resource list 5330ea82-0fd6-4a29-a796-0646e7c6815f \ + --filter type='OS::Heat::AutoScalingGroup' + + Result: + + .. code-block:: console + + +---------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | VDU1_scale | 2ebbff6f-cd91-489b-a758-1c98e7ff5153 | OS::Heat::AutoScalingGroup | CREATE_COMPLETE | 2022-03-16T07:02:51Z | + +---------------+--------------------------------------+----------------------------+-----------------+----------------------+ + + VDU(created by `OS::Heat::AutoScalingGroup`)'s parent information + before operation: + + .. code-block:: console + + $ openstack stack resource list 2ebbff6f-cd91-489b-a758-1c98e7ff5153 + + + Result: + + .. code-block:: console + + +---------------+--------------------------------------+---------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------+--------------------------------------+---------------------------+-----------------+----------------------+ + | xgaeg5oul435 | f96d0234-1486-47e4-8fd5-ec986e46c01e | base_hot_nested_VDU1.yaml | CREATE_COMPLETE | 2022-03-16T07:02:51Z | + +---------------+--------------------------------------+---------------------------+-----------------+----------------------+ + + VDU(created by `OS::Heat::AutoScalingGroup`) information before operation: + + .. code-block:: console + + $ openstack stack resource list f96d0234-1486-47e4-8fd5-ec986e46c01e + + + Result: + + .. code-block:: console + + +---------------+--------------------------------------+-------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------+--------------------------------------+-------------------+-----------------+----------------------+ + | VDU1 | 0810da4d-3466-4852-aa92-60ad05027b5a | OS::Nova::Server | CREATE_COMPLETE | 2022-03-16T07:02:52Z | + | VDU1_CP1 | 0bb0a091-b53f-484c-8050-77a44c2537f6 | OS::Neutron::Port | CREATE_COMPLETE | 2022-03-16T07:02:52Z | + +---------------+--------------------------------------+-------------------+-----------------+----------------------+ + + VDU(single) information before operation: + + .. code-block:: console + + $ openstack stack resource list 5330ea82-0fd6-4a29-a796-0646e7c6815f + + + Result: + + .. code-block:: console + + +----------------+--------------------------------------+----------------------------+-----------------+----------------------+--------------------------------------------------------------------------------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | stack_name | + +----------------+--------------------------------------+----------------------------+-----------------+----------------------+--------------------------------------------------------------------------------------------+ + | VDU2 | 2fefd9f9-b4d0-4313-a80f-e3db7df9a6bc | OS::Nova::Server | CREATE_COMPLETE | 2022-03-16T07:02:49Z | vnf-7f8e5afa-101e-4e0b-a936-62fe01ef1b25 | + +----------------+--------------------------------------+----------------------------+-----------------+----------------------+--------------------------------------------------------------------------------------------+ + +* Check point 3 before operation + + VDU(created by `OS::Heat::AutoScalingGroup`) detailed information before + operation: + + .. code-block:: console + + $ openstack stack resource show f96d0234-1486-47e4-8fd5-ec986e46c01e VDU1 \ + -c attributes --fit-width + + + Result: + + .. code-block:: console + + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Field | Value | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | attributes | {'id': '0810da4d-3466-4852-aa92-60ad05027b5a', 'name': 'VDU1', 'status': 'ACTIVE', 'tenant_id': '11ee4693b37c4b7995ab2ae331e9adf3', 'user_id': '26ee3a6213f049b18e88b09ff282e817', 'metadata': {}, 'hostId': | + | | '8e3b497672d982efde3d3f6abaab5c8c1cd770ed8b95a24daf914d5c', 'image': {'id': '3f87132d-0c98-42a6-aa7b-b7db1f25e4fa', 'links': [{'rel': 'bookmark', 'href': | + | | 'http://192.168.10.115/compute/images/3f87132d-0c98-42a6-aa7b-b7db1f25e4fa'}]}, 'flavor': {'vcpus': 1, 'ram': 512, 'disk': 1, 'ephemeral': 0, 'swap': 0, 'original_name': 'm1.tiny', 'extra_specs': {'hw_rng:allowed': 'True'}}, | + | | 'created': '2022-03-16T07:02:54Z', 'updated': '2022-03-16T07:03:02Z', 'addresses': {'net0': [{'version': 4, 'addr': '10.10.0.250', 'OS-EXT-IPS:type': 'fixed', 'OS-EXT-IPS-MAC:mac_addr': 'fa:16:3e:00:b8:21'}]}, 'accessIPv4': | + | | '', 'accessIPv6': '', 'links': [{'rel': 'self', 'href': 'http://192.168.10.115/compute/v2.1/servers/0810da4d-3466-4852-aa92-60ad05027b5a'}, {'rel': 'bookmark', 'href': | + | | 'http://192.168.10.115/compute/servers/0810da4d-3466-4852-aa92-60ad05027b5a'}], 'OS-DCF:diskConfig': 'MANUAL', 'progress': 0, 'OS-EXT-AZ:availability_zone': 'nova', 'config_drive': '', 'key_name': None, 'OS-SRV- | + | | USG:launched_at': '2022-03-16T07:07:07.000000', 'OS-SRV-USG:terminated_at': None, 'security_groups': [{'name': 'default'}], 'OS-EXT-SRV-ATTR:host': 'compute01', 'OS-EXT-SRV-ATTR:instance_name': 'instance-00000649', 'OS-EXT- | + | | SRV-ATTR:hypervisor_hostname': 'compute01', 'OS-EXT-SRV-ATTR:reservation_id': 'r-9amm9w8i', 'OS-EXT-SRV-ATTR:launch_index': 0, 'OS-EXT-SRV-ATTR:hostname': 'vdu1', 'OS-EXT-SRV-ATTR:kernel_id': '', 'OS-EXT-SRV- | + | | ATTR:ramdisk_id': '', 'OS-EXT-SRV-ATTR:root_device_name': '/dev/vda', 'OS-EXT-SRV-ATTR:user_data': '...' | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + VDU(single) detailed information before operation: + + .. code-block:: console + + $ openstack stack resource show 5330ea82-0fd6-4a29-a796-0646e7c6815f VDU2 \ + -c attributes --fit-width + + + Result: + + .. code-block:: console + + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Field | Value | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | attributes | {'id': '2fefd9f9-b4d0-4313-a80f-e3db7df9a6bc', 'name': 'vn-5afa-101e-4e0b-a936-62fe01ef1b25-VDU2-hvcqmgvy3btj', 'status': 'ACTIVE', 'tenant_id': '11ee4693b37c4b7995ab2ae331e9adf3', 'user_id': | + | | '26ee3a6213f049b18e88b09ff282e817', 'metadata': {}, 'hostId': '8e3b497672d982efde3d3f6abaab5c8c1cd770ed8b95a24daf914d5c', 'image': {'id': '3f87132d-0c98-42a6-aa7b-b7db1f25e4fa', 'links': [{'rel': 'bookmark', 'href': | + | | 'http://192.168.10.115/compute/images/18fd7e66-c81f-48bb-bf18-d523996ce59c'}]}, 'flavor': {'vcpus': 1, 'ram': 512, 'disk': 1, 'ephemeral': 0, 'swap': 0, 'original_name': 'm1.tiny', 'extra_specs': {'hw_rng:allowed': 'True'}}, | + | | 'created': '2022-03-16T07:02:53Z', 'updated': '2022-03-16T07:03:53Z', 'addresses': {'net0': [{'version': 4, 'addr': '10.10.0.101', 'OS-EXT-IPS:type': 'fixed', 'OS-EXT-IPS-MAC:mac_addr': 'fa:16:3e:7e:04:de'}]}, 'accessIPv4': | + | | '', 'accessIPv6': '', 'links': [{'rel': 'self', 'href': 'http://192.168.10.115/compute/v2.1/servers/2fefd9f9-b4d0-4313-a80f-e3db7df9a6bc'}, {'rel': 'bookmark', 'href': | + | | 'http://192.168.10.115/compute/servers/2fefd9f9-b4d0-4313-a80f-e3db7df9a6bc'}], 'OS-DCF:diskConfig': 'MANUAL', 'progress': 0, 'OS-EXT-AZ:availability_zone': 'nova', 'config_drive': '', 'key_name': None, 'OS-SRV- | + | | USG:launched_at': '2022-03-16T07:07:10.000000', 'OS-SRV-USG:terminated_at': None, 'security_groups': [{'name': 'default'}], 'OS-EXT-SRV-ATTR:host': 'compute01', 'OS-EXT-SRV-ATTR:instance_name': 'instance-00000648', 'OS-EXT- | + | | SRV-ATTR:hypervisor_hostname': 'compute01', 'OS-EXT-SRV-ATTR:reservation_id': 'r-dgt54f2r', 'OS-EXT-SRV-ATTR:launch_index': 0, 'OS-EXT-SRV-ATTR:hostname': 'vn-5afa-101e-4e0b-a936-62fe01ef1b25-vdu2-hvcqmgvy3btj', 'OS-EXT-SRV- | + | | ATTR:kernel_id': '', 'OS-EXT-SRV-ATTR:ramdisk_id': '', 'OS-EXT-SRV-ATTR:root_device_name': '/dev/vda', 'OS-EXT-SRV-ATTR:user_data': '...' | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +* Execute Change Current VNF Package + + Change Current VNF Package execution of the entire VNF: + + .. code-block:: console + + $ openstack vnflcm change-vnfpkg VNF_INSTANCE_ID \ + ./sample_param_file_for_multi_resources.json + + Result: + + .. code-block:: console + + Change Current VNF Package for VNF Instance 7f8e5afa-101e-4e0b-a936-62fe01ef1b25 has been accepted. + +* Check point 1 after operation + + Stack information after operation: + + .. code-block:: console + + $ openstack stack list -c 'ID' -c 'Stack Name' -c 'Stack Status' + + Result: + + .. code-block:: console + + +--------------------------------------+------------------------------------------+-----------------+ + | ID | Stack Name | Stack Status | + +--------------------------------------+------------------------------------------+-----------------+ + | 5330ea82-0fd6-4a29-a796-0646e7c6815f | vnf-7f8e5afa-101e-4e0b-a936-62fe01ef1b25 | UPDATE_COMPLETE | + +--------------------------------------+------------------------------------------+-----------------+ + .. note:: + 'Stack Status' transitions to UPDATE_COMPLETE. + +* Check point 2 after operation + + Stack resource information after operation: + + .. code-block:: console + + $ openstack stack resource list 5330ea82-0fd6-4a29-a796-0646e7c6815f \ + --filter type='OS::Heat::AutoScalingGroup' + + Result: + + .. code-block:: console + + +---------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | VDU1_scale | 2ebbff6f-cd91-489b-a758-1c98e7ff5153 | OS::Heat::AutoScalingGroup | UPDATE_COMPLETE | 2022-03-16T07:14:19Z | + +---------------+--------------------------------------+----------------------------+-----------------+----------------------+ + + VDU(created by `OS::Heat::AutoScalingGroup`)'s parent information + after operation: + + .. code-block:: console + + $ openstack stack resource list 2ebbff6f-cd91-489b-a758-1c98e7ff5153 + + Result: + + .. code-block:: console + + +---------------+--------------------------------------+---------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------+--------------------------------------+---------------------------+-----------------+----------------------+ + | xgaeg5oul435 | f96d0234-1486-47e4-8fd5-ec986e46c01e | base_hot_nested_VDU1.yaml | UPDATE_COMPLETE | 2022-03-16T07:14:19Z | + +---------------+--------------------------------------+---------------------------+-----------------+----------------------+ + .. note:: + 'resource_status' transitions to UPDATE_COMPLETE. + + VDU(created by `OS::Heat::AutoScalingGroup`) information after operation: + + .. code-block:: console + + $ openstack stack resource list f96d0234-1486-47e4-8fd5-ec986e46c01e + + Result: + + .. code-block:: console + + +---------------+--------------------------------------+-------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------+--------------------------------------+-------------------+-----------------+----------------------+ + | VDU1 | 0810da4d-3466-4852-aa92-60ad05027b5a | OS::Nova::Server | UPDATE_COMPLETE | 2022-03-16T07:13:32Z | + | VDU1_CP1 | 0bb0a091-b53f-484c-8050-77a44c2537f6 | OS::Neutron::Port | CREATE_COMPLETE | 2022-03-16T07:02:52Z | + +---------------+--------------------------------------+-------------------+-----------------+----------------------+ + .. note:: + 'resource_status' transitions to UPDATE_COMPLETE. + + VDU(single) information after operation: + + .. code-block:: console + + $ openstack stack resource list 5330ea82-0fd6-4a29-a796-0646e7c6815f + + Result: + + .. code-block:: console + + +----------------+--------------------------------------+----------------------------+-----------------+----------------------+--------------------------------------------------------------------------------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | stack_name | + +----------------+--------------------------------------+----------------------------+-----------------+----------------------+--------------------------------------------------------------------------------------------+ + | VDU2 | 2fefd9f9-b4d0-4313-a80f-e3db7df9a6bc | OS::Nova::Server | UPDATE_COMPLETE | 2022-03-16T07:13:58Z | vnf-7f8e5afa-101e-4e0b-a936-62fe01ef1b25 | + +----------------+--------------------------------------+----------------------------+-----------------+----------------------+--------------------------------------------------------------------------------------------+ + +* Check point 3 after operation + + VDU(created by `OS::Heat::AutoScalingGroup`) detailed information after + operation: + + .. code-block:: console + + $ openstack stack resource show f96d0234-1486-47e4-8fd5-ec986e46c01e VDU1 \ + -c attributes --fit-width + + Result: + + .. code-block:: console + + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Field | Value | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | attributes | {'id': '0810da4d-3466-4852-aa92-60ad05027b5a', 'name': 'VDU1', 'status': 'ACTIVE', 'tenant_id': '11ee4693b37c4b7995ab2ae331e9adf3', 'user_id': '26ee3a6213f049b18e88b09ff282e817', 'metadata': {}, 'hostId': | + | | '8e3b497672d982efde3d3f6abaab5c8c1cd770ed8b95a24daf914d5c', 'image': {'id': '68da152a-13af-43f6-aaaa-a7b88123d654', 'links': [{'rel': 'bookmark', 'href': | + | | 'http://192.168.10.115/compute/images/68da152a-13af-43f6-aaaa-a7b88123d654'}]}, 'flavor': {'vcpus': 1, 'ram': 512, 'disk': 1, 'ephemeral': 0, 'swap': 0, 'original_name': 'm1.tiny', 'extra_specs': {'hw_rng:allowed': 'True'}}, | + | | 'created': '2022-03-16T07:02:54Z', 'updated': '2022-03-16T07:13:41Z', 'addresses': {'net0': [{'version': 4, 'addr': '10.10.0.250', 'OS-EXT-IPS:type': 'fixed', 'OS-EXT-IPS-MAC:mac_addr': 'fa:16:3e:00:b8:21'}]}, 'accessIPv4': | + | | '', 'accessIPv6': '', 'links': [{'rel': 'self', 'href': 'http://192.168.10.115/compute/v2.1/servers/0810da4d-3466-4852-aa92-60ad05027b5a'}, {'rel': 'bookmark', 'href': | + | | 'http://192.168.10.115/compute/servers/0810da4d-3466-4852-aa92-60ad05027b5a'}], 'OS-DCF:diskConfig': 'MANUAL', 'progress': 0, 'OS-EXT-AZ:availability_zone': 'nova', 'config_drive': '', 'key_name': None, 'OS-SRV- | + | | USG:launched_at': '2022-03-16T07:17:46.000000', 'OS-SRV-USG:terminated_at': None, 'security_groups': [{'name': 'default'}], 'OS-EXT-SRV-ATTR:host': 'compute01', 'OS-EXT-SRV-ATTR:instance_name': 'instance-00000649', 'OS-EXT- | + | | SRV-ATTR:hypervisor_hostname': 'compute01', 'OS-EXT-SRV-ATTR:reservation_id': 'r-9amm9w8i', 'OS-EXT-SRV-ATTR:launch_index': 0, 'OS-EXT-SRV-ATTR:hostname': 'vdu1', 'OS-EXT-SRV-ATTR:kernel_id': '', 'OS-EXT-SRV- | + | | ATTR:ramdisk_id': '', 'OS-EXT-SRV-ATTR:root_device_name': '/dev/vda', 'OS-EXT-SRV-ATTR:user_data': '...' | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. note:: You can check 'image'->'id' has changed from + '3f87132d-0c98-42a6-aa7b-b7db1f25e4fa' to + '68da152a-13af-43f6-aaaa-a7b88123d654'. + + VDU(single) detailed information after operation: + + .. code-block:: console + + $ openstack stack resource show 5330ea82-0fd6-4a29-a796-0646e7c6815f VDU2 \ + -c attributes --fit-width + + Result: + + .. code-block:: console + + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Field | Value | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | attributes | {'id': '2fefd9f9-b4d0-4313-a80f-e3db7df9a6bc', 'name': 'vn-5afa-101e-4e0b-a936-62fe01ef1b25-VDU2-hvcqmgvy3btj', 'status': 'ACTIVE', 'tenant_id': '11ee4693b37c4b7995ab2ae331e9adf3', 'user_id': | + | | '26ee3a6213f049b18e88b09ff282e817', 'metadata': {}, 'hostId': '8e3b497672d982efde3d3f6abaab5c8c1cd770ed8b95a24daf914d5c', 'image': {'id': '18fd7e66-c81f-48bb-bf18-d523996ce59c', 'links': [{'rel': 'bookmark', 'href': | + | | 'http://192.168.10.115/compute/images/18fd7e66-c81f-48bb-bf18-d523996ce59c'}]}, 'flavor': {'vcpus': 1, 'ram': 512, 'disk': 1, 'ephemeral': 0, 'swap': 0, 'original_name': 'm1.tiny', 'extra_specs': {'hw_rng:allowed': 'True'}}, | + | | 'created': '2022-03-16T07:02:53Z', 'updated': '2022-03-16T07:14:05Z', 'addresses': {'net0': [{'version': 4, 'addr': '10.10.0.101', 'OS-EXT-IPS:type': 'fixed', 'OS-EXT-IPS-MAC:mac_addr': 'fa:16:3e:7e:04:de'}]}, 'accessIPv4': | + | | '', 'accessIPv6': '', 'links': [{'rel': 'self', 'href': 'http://192.168.10.115/compute/v2.1/servers/2fefd9f9-b4d0-4313-a80f-e3db7df9a6bc'}, {'rel': 'bookmark', 'href': | + | | 'http://192.168.10.115/compute/servers/2fefd9f9-b4d0-4313-a80f-e3db7df9a6bc'}], 'OS-DCF:diskConfig': 'MANUAL', 'progress': 0, 'OS-EXT-AZ:availability_zone': 'nova', 'config_drive': '', 'key_name': None, 'OS-SRV- | + | | USG:launched_at': '2022-03-16T07:18:10.000000', 'OS-SRV-USG:terminated_at': None, 'security_groups': [{'name': 'default'}], 'OS-EXT-SRV-ATTR:host': 'compute01', 'OS-EXT-SRV-ATTR:instance_name': 'instance-00000648', 'OS-EXT- | + | | SRV-ATTR:hypervisor_hostname': 'compute01', 'OS-EXT-SRV-ATTR:reservation_id': 'r-dgt54f2r', 'OS-EXT-SRV-ATTR:launch_index': 0, 'OS-EXT-SRV-ATTR:hostname': 'vn-5afa-101e-4e0b-a936-62fe01ef1b25-vdu2-hvcqmgvy3btj', 'OS-EXT-SRV- | + | | ATTR:kernel_id': '', 'OS-EXT-SRV-ATTR:ramdisk_id': '', 'OS-EXT-SRV-ATTR:root_device_name': '/dev/vda', 'OS-EXT-SRV-ATTR:user_data': '...' | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. note:: You can check 'image'->'id' has changed from + '3f87132d-0c98-42a6-aa7b-b7db1f25e4fa' to + '18fd7e66-c81f-48bb-bf18-d523996ce59c'. + +How to Change VM created by image to VM created by volume +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Execute Change Current VNF Package CLI command. After complete this change +operation you should check resource status by Heat CLI commands. + +1. check 'ID' and 'Stack Status' of the stack before and after operation. +This is to confirm that stack 'ID' has changed before and after operation, +and that the Stack update has been updated successfully. + +2. check 'physical_resource_id' and 'resource_status' of the VDU. +This is to confirm that 'physical_resource_id' of VDU has +changed before and after operation, and that the 'resource_status' of VDU has +been created successfully. + +3. check 'image' information of VDU before and after operation. This is to +confirm that VDU's has changed from created by image to created by volume. + +.. note:: Only single VM support change from image to volume. + +* Check point 1 before operation + + Stack information before operation: + + .. code-block:: console + + $ openstack stack list -c 'ID' -c 'Stack Name' -c 'Stack Status' + + Result: + + .. code-block:: console + + +--------------------------------------+------------------------------------------+-----------------+ + | ID | Stack Name | Stack Status | + +--------------------------------------+------------------------------------------+-----------------+ + | 26c0d3fe-4e9d-4059-8b60-4f407fc268ee | vnf-679131c9-9f66-4930-a74c-1d382610d3c4 | CREATE_COMPLETE | + +--------------------------------------+------------------------------------------+-----------------+ + +* Check point 2 before operation + + VDU(single) information before operation: + + .. code-block:: console + + $ openstack stack resource list 26c0d3fe-4e9d-4059-8b60-4f407fc268ee + + Result: + + .. code-block:: console + + +----------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +----------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | VDU1_scale_in | 2e9275cb862a40a3915339666ea9496d | OS::Heat::ScalingPolicy | CREATE_COMPLETE | 2022-03-18T02:51:12Z | + | VDU1_scale_out | ff4186d24bc74f0ca6723f277739d232 | OS::Heat::ScalingPolicy | CREATE_COMPLETE | 2022-03-18T02:51:12Z | + | VDU1_scale | 657c5b64-753e-43b5-b1e7-1ce929b21278 | OS::Heat::AutoScalingGroup | CREATE_COMPLETE | 2022-03-18T02:51:13Z | + | VDU2 | 256ed8f8-b051-4bb5-8d3b-b0056c571d10 | OS::Nova::Server | CREATE_COMPLETE | 2022-03-18T02:51:13Z | + | VDU2_CP1 | 70c383f8-97ee-4ed4-82c8-68e87fbb1a0f | OS::Neutron::Port | CREATE_COMPLETE | 2022-03-18T02:51:13Z | + +----------------+--------------------------------------+----------------------------+-----------------+----------------------+ + +* Check point 3 before operation + + VDU(single) detailed information before operation: + + .. code-block:: console + + $ openstack stack resource show 26c0d3fe-4e9d-4059-8b60-4f407fc268ee VDU2 \ + -c attributes --fit-width + + Result: + + .. code-block:: console + + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Field | Value | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | attributes | {'id': '256ed8f8-b051-4bb5-8d3b-b0056c571d10', 'name': 'vn-31c9-9f66-4930-a74c-1d382610d3c4-VDU2-exts43f5p4dn', 'status': 'ACTIVE', 'tenant_id': 'b7457dcef9374c2fa72e22c452bb04e9', 'user_id': | + | | 'ed6a354ef25041ac92c0e445e91cc9a9', 'metadata': {}, 'hostId': 'd2de6a234a80a445a7ee385f445e6084358f3aef2e110d7bc888ccf2', 'image': {'id': 'de5e0908-2e07-4250-a788-d3b693425f9f', 'links': [{'rel': 'bookmark', 'href': | + | | 'http://192.168.2.100/compute/images/de5e0908-2e07-4250-a788-d3b693425f9f'}]}, 'flavor': {'vcpus': 1, 'ram': 512, 'disk': 1, 'ephemeral': 0, 'swap': 0, 'original_name': 'm1.tiny', 'extra_specs': {'hw_rng:allowed': 'True'}}, | + | | 'created': '2022-03-18T02:51:17Z', 'updated': '2022-03-18T02:51:26Z', 'addresses': {'net0': [{'version': 4, 'addr': '10.10.0.101', 'OS-EXT-IPS:type': 'fixed', 'OS-EXT-IPS-MAC:mac_addr': 'fa:16:3e:13:2a:61'}]}, 'accessIPv4': | + | | '', 'accessIPv6': '', 'links': [{'rel': 'self', 'href': 'http://192.168.2.100/compute/v2.1/servers/256ed8f8-b051-4bb5-8d3b-b0056c571d10'}, {'rel': 'bookmark', 'href': | + | | 'http://192.168.2.100/compute/servers/256ed8f8-b051-4bb5-8d3b-b0056c571d10'}], 'OS-DCF:diskConfig': 'MANUAL', 'progress': 0, 'OS-EXT-AZ:availability_zone': 'nova', 'config_drive': '', 'key_name': None, 'OS-SRV- | + | | USG:launched_at': '2022-03-18T02:51:40.000000', 'OS-SRV-USG:terminated_at': None, 'security_groups': [{'name': 'default'}], 'OS-EXT-SRV-ATTR:host': 'compute101', 'OS-EXT-SRV-ATTR:instance_name': 'instance-000007bb', 'OS-EXT- | + | | SRV-ATTR:hypervisor_hostname': 'compute101', 'OS-EXT-SRV-ATTR:reservation_id': 'r-2gt4gvxy', 'OS-EXT-SRV-ATTR:launch_index': 0, 'OS-EXT-SRV-ATTR:hostname': 'vn-31c9-9f66-4930-a74c-1d382610d3c4-vdu2-exts43f5p4dn', 'OS-EXT- | + | | SRV-ATTR:kernel_id': '', 'OS-EXT-SRV-ATTR:ramdisk_id': '', 'OS-EXT-SRV-ATTR:root_device_name': '/dev/vda', 'OS-EXT-SRV-ATTR:user_data': '...' | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +* Execute Change Current VNF Package + + Change Current VNF Package execution of the entire VNF: + + .. code-block:: console + + $ openstack vnflcm change-vnfpkg VNF_INSTANCE_ID \ + ./sample_param_file_for_single_resource.json + + Result: + + .. code-block:: console + + Change Current VNF Package for VNF Instance 679131c9-9f66-4930-a74c-1d382610d3c4 has been accepted. + +* Check point 1 after operation + + Stack information after operation: + + .. code-block:: console + + $ openstack stack list -c 'ID' -c 'Stack Name' -c 'Stack Status' + + Result: + + .. code-block:: console + + +--------------------------------------+------------------------------------------+-----------------+ + | ID | Stack Name | Stack Status | + +--------------------------------------+------------------------------------------+-----------------+ + | 26c0d3fe-4e9d-4059-8b60-4f407fc268ee | vnf-679131c9-9f66-4930-a74c-1d382610d3c4 | UPDATE_COMPLETE | + +--------------------------------------+------------------------------------------+-----------------+ + + .. note:: + 'Stack Status' transitions to UPDATE_COMPLETE. + +* Check point 2 after operation + + VDU(single) information after operation: + + .. code-block:: console + + $ openstack stack resource list 26c0d3fe-4e9d-4059-8b60-4f407fc268ee + + Result: + + .. code-block:: console + + +---------------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | VDU1_scale_in | 2e9275cb862a40a3915339666ea9496d | OS::Heat::ScalingPolicy | CREATE_COMPLETE | 2022-03-18T02:51:12Z | + | VDU1_scale_out | ff4186d24bc74f0ca6723f277739d232 | OS::Heat::ScalingPolicy | CREATE_COMPLETE | 2022-03-18T02:51:12Z | + | VDU1_scale | 657c5b64-753e-43b5-b1e7-1ce929b21278 | OS::Heat::AutoScalingGroup | UPDATE_COMPLETE | 2022-03-18T03:02:27Z | + | VDU2_CP1 | 70c383f8-97ee-4ed4-82c8-68e87fbb1a0f | OS::Neutron::Port | CREATE_COMPLETE | 2022-03-18T02:51:13Z | + | VDU2-VirtualStorage | ea8a15c2-45f8-4230-94b0-b79dce28f3dd | OS::Cinder::Volume | CREATE_COMPLETE | 2022-03-18T03:01:42Z | + | multi | 90b16501-bbb2-4f59-bbb8-96dcf74de13c | OS::Cinder::VolumeType | CREATE_COMPLETE | 2022-03-18T03:01:42Z | + | VDU2 | 3bd7c3eb-7d9d-4861-9ea3-052286f3238f | OS::Nova::Server | CREATE_COMPLETE | 2022-03-18T03:01:59Z | + +---------------------+--------------------------------------+----------------------------+-----------------+----------------------+ + + .. note:: + 'resource_status' transitions to CREATE_COMPLETE. + 'physical_resource_id' changes from + '256ed8f8-b051-4bb5-8d3b-b0056c571d10' to + '3bd7c3eb-7d9d-4861-9ea3-052286f3238f'. + +* Check point 3 after operation + + VDU(single) detailed information after operation: + + .. code-block:: console + + $ openstack stack resource show 26c0d3fe-4e9d-4059-8b60-4f407fc268ee VDU2 \ + -c attributes --fit-width + + Result: + + .. code-block:: console + + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Field | Value | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | attributes | {'id': '3bd7c3eb-7d9d-4861-9ea3-052286f3238f', 'name': 'vn-31c9-9f66-4930-a74c-1d382610d3c4-VDU2-f2fjfnlznq2l', 'status': 'ACTIVE', 'tenant_id': 'b7457dcef9374c2fa72e22c452bb04e9', 'user_id': | + | | 'ed6a354ef25041ac92c0e445e91cc9a9', 'metadata': {}, 'hostId': 'd2de6a234a80a445a7ee385f445e6084358f3aef2e110d7bc888ccf2', 'image': '', 'flavor': {'vcpus': 2, 'ram': 2048, 'disk': 10, 'ephemeral': 0, 'swap': 0, | + | | 'original_name': 'ds2G', 'extra_specs': {'hw_rng:allowed': 'True'}}, 'created': '2022-03-18T03:02:00Z', 'updated': '2022-03-18T03:02:14Z', 'addresses': {'net0': [{'version': 4, 'addr': '10.10.0.101', 'OS-EXT-IPS:type': | + | | 'fixed', 'OS-EXT-IPS-MAC:mac_addr': 'fa:16:3e:13:2a:61'}]}, 'accessIPv4': '', 'accessIPv6': '', 'links': [{'rel': 'self', 'href': 'http://192.168.2.100/compute/v2.1/servers/3bd7c3eb-7d9d-4861-9ea3-052286f3238f'}, {'rel': | + | | 'bookmark', 'href': 'http://192.168.2.100/compute/servers/3bd7c3eb-7d9d-4861-9ea3-052286f3238f'}], 'OS-DCF:diskConfig': 'MANUAL', 'progress': 0, 'OS-EXT-AZ:availability_zone': 'nova', 'config_drive': '', 'key_name': None, | + | | 'OS-SRV-USG:launched_at': '2022-03-18T03:02:28.000000', 'OS-SRV-USG:terminated_at': None, 'security_groups': [{'name': 'default'}], 'OS-EXT-SRV-ATTR:host': 'compute101', 'OS-EXT-SRV-ATTR:instance_name': 'instance-000007bd', | + | | 'OS-EXT-SRV-ATTR:hypervisor_hostname': 'compute101', 'OS-EXT-SRV-ATTR:reservation_id': 'r-bi7mipxi', 'OS-EXT-SRV-ATTR:launch_index': 0, 'OS-EXT-SRV-ATTR:hostname': 'vn-31c9-9f66-4930-a74c-1d382610d3c4-vdu2-f2fjfnlznq2l', | + | | 'OS-EXT-SRV-ATTR:kernel_id': '', 'OS-EXT-SRV-ATTR:ramdisk_id': '', 'OS-EXT-SRV-ATTR:root_device_name': '/dev/vda', 'OS-EXT-SRV-ATTR:user_data': '...', 'OS-EXT-STS:task_state': None, 'OS-EXT-STS:vm_state': 'active', | + | | 'OS-EXT-STS:power_state': 1, 'os-extended-volumes:volumes_attached': [{'id': 'ea8a15c2-45f8-4230-94b0-b79dce28f3dd', 'delete_on_termination': | + | | False}], 'host_status': 'UP', 'locked': False, 'locked_reason': None, 'description': None, 'tags': [], 'trusted_image_certificates': None, 'server_groups': [], 'os_collect_config': {}} | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. note:: You can check VDU has changed from created by image + 'de5e0908-2e07-4250-a788-d3b693425f9f' to created by volume + 'ea8a15c2-45f8-4230-94b0-b79dce28f3dd'. + +How to Change VM created by volume to VM created by image +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Execute Change Current VNF Package CLI command. After complete this change +operation you should check resource status by Heat CLI commands. + +1. check 'ID' and 'Stack Status' of the stack before and after operation. +This is to confirm that stack 'ID' has changed before and after operation, +and that the Stack update has been updated successfully. + +2. check 'physical_resource_id' and 'resource_status' of the VDU. +This is to confirm that 'physical_resource_id' of VDU has +changed before and after operation, and that the 'resource_status' of VDU has +been created successfully. + +3. check 'image' and 'volume' information of VDU before and after operation. +This is to confirm that VDU's has changed from created by volume to created +by image. + +.. note:: Only single VM support change from image to volume. + +* Check point 1 before operation + + Stack information before operation: + + .. code-block:: console + + $ openstack stack list -c 'ID' -c 'Stack Name' -c 'Stack Status' + + Result: + + .. code-block:: console + + +--------------------------------------+------------------------------------------+-----------------+ + | ID | Stack Name | Stack Status | + +--------------------------------------+------------------------------------------+-----------------+ + | ba66ff3f-cb83-403a-b75a-4ef24f67afea | vnf-e4d76bde-1a4c-40f5-8405-5536403e73d5 | CREATE_COMPLETE | + +--------------------------------------+------------------------------------------+-----------------+ + +* Check point 2 before operation + + VDU(single) information before operation: + + .. code-block:: console + + $ openstack stack resource list ba66ff3f-cb83-403a-b75a-4ef24f67afea + + Result: + + .. code-block:: console + + +---------------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | VDU1_scale_in | 26696adeb09b401982afb626b8f6a332 | OS::Heat::ScalingPolicy | CREATE_COMPLETE | 2022-03-18T04:57:21Z | + | VDU1_scale_out | 8edd5b6d76d44843b3a2b6798288f256 | OS::Heat::ScalingPolicy | CREATE_COMPLETE | 2022-03-18T04:57:21Z | + | VDU1_scale | 592c21ca-ed4f-4a4d-bbbd-7c9e80d0f6b0 | OS::Heat::AutoScalingGroup | CREATE_COMPLETE | 2022-03-18T04:57:21Z | + | VDU2 | d6bf000e-021a-4c0c-b043-7936331ed22a | OS::Nova::Server | CREATE_COMPLETE | 2022-03-18T04:57:21Z | + | VDU2-VirtualStorage | 60db6ba6-d637-4ba5-9c18-fa5d64930123 | OS::Cinder::Volume | CREATE_COMPLETE | 2022-03-18T04:57:21Z | + | multi | 69c67ded-71d5-4d44-9c9f-ba988643c27e | OS::Cinder::VolumeType | CREATE_COMPLETE | 2022-03-18T04:57:21Z | + | VDU2_CP1 | 62af0f3a-bcf9-40b6-a12e-fc56152f156c | OS::Neutron::Port | CREATE_COMPLETE | 2022-03-18T04:57:21Z | + +---------------------+--------------------------------------+----------------------------+-----------------+----------------------+ + +* Check point 3 before operation + + VDU(single) detailed information before operation: + + .. code-block:: console + + $ openstack stack resource show ba66ff3f-cb83-403a-b75a-4ef24f67afea VDU2 \ + -c attributes --fit-width + + Result: + + .. code-block:: console + + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Field | Value | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | attributes | {'id': 'd6bf000e-021a-4c0c-b043-7936331ed22a', 'name': 'vn-6bde-1a4c-40f5-8405-5536403e73d5-VDU2-m7zwdqixjkpi', 'status': 'ACTIVE', 'tenant_id': 'b7457dcef9374c2fa72e22c452bb04e9', 'user_id': | + | | 'ed6a354ef25041ac92c0e445e91cc9a9', 'metadata': {}, 'hostId': 'd2de6a234a80a445a7ee385f445e6084358f3aef2e110d7bc888ccf2', 'image': '', 'flavor': {'vcpus': 1, 'ram': 512, 'disk': 1, 'ephemeral': 0, 'swap': 0, 'original_name': | + | | 'm1.tiny', 'extra_specs': {'hw_rng:allowed': 'True'}}, 'created': '2022-03-18T04:57:35Z', 'updated': '2022-03-18T04:57:49Z', 'addresses': {'net0': [{'version': 4, 'addr': '10.10.0.101', 'OS-EXT-IPS:type': 'fixed', 'OS-EXT- | + | | IPS-MAC:mac_addr': 'fa:16:3e:2f:ca:38'}]}, 'accessIPv4': '', 'accessIPv6': '', 'links': [{'rel': 'self', 'href': 'http://192.168.2.100/compute/v2.1/servers/d6bf000e-021a-4c0c-b043-7936331ed22a'}, {'rel': 'bookmark', 'href': | + | | 'http://192.168.2.100/compute/servers/d6bf000e-021a-4c0c-b043-7936331ed22a'}], 'OS-DCF:diskConfig': 'MANUAL', 'progress': 0, 'OS-EXT-AZ:availability_zone': 'nova', 'config_drive': '', 'key_name': None, 'OS-SRV- | + | | USG:launched_at': '2022-03-18T04:58:03.000000', 'OS-SRV-USG:terminated_at': None, 'security_groups': [{'name': 'default'}], 'OS-EXT-SRV-ATTR:host': 'compute101', 'OS-EXT-SRV-ATTR:instance_name': 'instance-000007be', 'OS-EXT- | + | | SRV-ATTR:hypervisor_hostname': 'compute101', 'OS-EXT-SRV-ATTR:reservation_id': 'r-ddim06pv', 'OS-EXT-SRV-ATTR:launch_index': 0, 'OS-EXT-SRV-ATTR:hostname': 'vn-6bde-1a4c-40f5-8405-5536403e73d5-vdu2-m7zwdqixjkpi', 'OS-EXT- | + | | SRV-ATTR:kernel_id': '', 'OS-EXT-SRV-ATTR:ramdisk_id': '', 'OS-EXT-SRV-ATTR:root_device_name': '/dev/vda', 'OS-EXT-SRV-ATTR:user_data': 'Q29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PSI9PT09PT09PT09PT09PT0yODc5ODU4MTc | + | | 5', 'OS-EXT-STS:task_state': None, 'OS-EXT-STS:vm_state': 'active', 'OS-EXT-STS:power_state': 1, 'os-extended-volumes:volumes_attached': [{'id': '60db6ba6-d637-4ba5-9c18-fa5d64930123', 'delete_on_termination': False}], | + | | 'host_status': 'UP', 'locked': False, 'locked_reason': None, 'description': None, 'tags': [], 'trusted_image_certificates': None, 'server_groups': [], 'os_collect_config': {}} | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +* Execute Change Current VNF Package + + Change Current VNF Package execution of the entire VNF: + + .. code-block:: console + + $ openstack vnflcm change-vnfpkg VNF_INSTANCE_ID \ + ./sample_param_file_for_single_resource.json + + Result: + + .. code-block:: console + + Change Current VNF Package for VNF Instance e4d76bde-1a4c-40f5-8405-5536403e73d5 has been accepted. + +* Check point 1 after operation + + Stack information after operation: + + .. code-block:: console + + $ openstack stack list -c 'ID' -c 'Stack Name' -c 'Stack Status' + + Result: + + .. code-block:: console + + +--------------------------------------+------------------------------------------+-----------------+ + | ID | Stack Name | Stack Status | + +--------------------------------------+------------------------------------------+-----------------+ + | ba66ff3f-cb83-403a-b75a-4ef24f67afea | vnf-e4d76bde-1a4c-40f5-8405-5536403e73d5 | UPDATE_COMPLETE | + +--------------------------------------+------------------------------------------+-----------------+ + + .. note:: + 'Stack Status' transitions to UPDATE_COMPLETE. + +* Check point 2 after operation + + VDU(single) information after operation: + + .. code-block:: console + + $ openstack stack resource list ba66ff3f-cb83-403a-b75a-4ef24f67afea + + Result: + + .. code-block:: console + + +----------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +----------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | VDU1_scale_in | 26696adeb09b401982afb626b8f6a332 | OS::Heat::ScalingPolicy | CREATE_COMPLETE | 2022-03-18T04:57:21Z | + | VDU1_scale_out | 8edd5b6d76d44843b3a2b6798288f256 | OS::Heat::ScalingPolicy | CREATE_COMPLETE | 2022-03-18T04:57:21Z | + | VDU1_scale | 592c21ca-ed4f-4a4d-bbbd-7c9e80d0f6b0 | OS::Heat::AutoScalingGroup | UPDATE_COMPLETE | 2022-03-18T05:03:55Z | + | VDU2_CP1 | 62af0f3a-bcf9-40b6-a12e-fc56152f156c | OS::Neutron::Port | CREATE_COMPLETE | 2022-03-18T04:57:21Z | + | VDU2 | 7687d229-d3c7-4c88-9783-1b0a09bb169f | OS::Nova::Server | CREATE_COMPLETE | 2022-03-18T05:03:23Z | + +----------------+--------------------------------------+----------------------------+-----------------+----------------------+ + + .. note:: + 'resource_status' transitions to CREATE_COMPLETE. + 'physical_resource_id' changes from + 'd6bf000e-021a-4c0c-b043-7936331ed22a' to + '7687d229-d3c7-4c88-9783-1b0a09bb169f'. + +* Check point 3 after operation + + VDU(single) detailed information after operation: + + .. code-block:: console + + $ openstack stack resource show 5330ea82-0fd6-4a29-a796-0646e7c6815f VDU2 \ + -c attributes --fit-width + + Result: + + .. code-block:: console + + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Field | Value | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | attributes | {'id': '7687d229-d3c7-4c88-9783-1b0a09bb169f', 'name': 'vn-6bde-1a4c-40f5-8405-5536403e73d5-VDU2-jexec2twpgpp', 'status': 'ACTIVE', 'tenant_id': 'b7457dcef9374c2fa72e22c452bb04e9', 'user_id': | + | | 'ed6a354ef25041ac92c0e445e91cc9a9', 'metadata': {}, 'hostId': 'd2de6a234a80a445a7ee385f445e6084358f3aef2e110d7bc888ccf2', 'image': {'id': '6fbf2395-5140-406b-abfe-b80fc0ff7ead', 'links': [{'rel': 'bookmark', 'href': | + | | 'http://192.168.2.100/compute/images/6fbf2395-5140-406b-abfe-b80fc0ff7ead'}]}, 'flavor': {'vcpus': 1, 'ram': 512, 'disk': 1, 'ephemeral': 0, 'swap': 0, 'original_name': 'm1.tiny', 'extra_specs': {'hw_rng:allowed': 'True'}}, | + | | 'created': '2022-03-18T05:03:23Z', 'updated': '2022-03-18T05:03:32Z', 'addresses': {'net0': [{'version': 4, 'addr': '10.10.0.101', 'OS-EXT-IPS:type': 'fixed', 'OS-EXT-IPS-MAC:mac_addr': 'fa:16:3e:2f:ca:38'}]}, 'accessIPv4': | + | | '', 'accessIPv6': '', 'links': [{'rel': 'self', 'href': 'http://192.168.2.100/compute/v2.1/servers/7687d229-d3c7-4c88-9783-1b0a09bb169f'}, {'rel': 'bookmark', 'href': | + | | 'http://192.168.2.100/compute/servers/7687d229-d3c7-4c88-9783-1b0a09bb169f'}], 'OS-DCF:diskConfig': 'MANUAL', 'progress': 0, 'OS-EXT-AZ:availability_zone': 'nova', 'config_drive': '', 'key_name': None, 'OS-SRV- | + | | USG:launched_at': '2022-03-18T05:03:46.000000', 'OS-SRV-USG:terminated_at': None, 'security_groups': [{'name': 'default'}], 'OS-EXT-SRV-ATTR:host': 'compute101', 'OS-EXT-SRV-ATTR:instance_name': 'instance-000007c0', 'OS-EXT- | + | | SRV-ATTR:hypervisor_hostname': 'compute101', 'OS-EXT-SRV-ATTR:reservation_id': 'r-rqd3rep5', 'OS-EXT-SRV-ATTR:launch_index': 0, 'OS-EXT-SRV-ATTR:hostname': 'vn-6bde-1a4c-40f5-8405-5536403e73d5-vdu2-jexec2twpgpp', 'OS-EXT- | + | | SRV-ATTR:kernel_id': '', 'OS-EXT-SRV-ATTR:ramdisk_id': '', 'OS-EXT-SRV-ATTR:root_device_name': '/dev/vda', 'OS-EXT-SRV-ATTR:user_data': 'Q29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PSI9PT09PT09PT09PT09PT02NzkzNzUxNjg | + | | 2', 'OS-EXT-STS:task_state': None, 'OS-EXT-STS:vm_state': 'active', 'OS-EXT-STS:power_state': 1, 'os-extended-volumes:volumes_attached': [], 'host_status': 'UP', 'locked': False, 'locked_reason': None, 'description': None, | + | | 'tags': [], 'trusted_image_certificates': None, 'server_groups': [], 'os_collect_config': {}} | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. note:: You can check VDU has changed from created by volume + '60db6ba6-d637-4ba5-9c18-fa5d64930123' to created by image + '6fbf2395-5140-406b-abfe-b80fc0ff7ead'. + +How to Change VM created by volume to VM created by volume +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Execute Change Current VNF Package CLI command. After complete this change +operation you should check resource status by Heat CLI commands. + +1. check 'ID' and 'Stack Status' of the stack before and after operation. +This is to confirm that stack 'ID' has changed before and after operation, +and that the Stack update has been updated successfully. + +2. check 'physical_resource_id' and 'resource_status' of the VDU and VDU's +parent resource. This is to confirm that 'physical_resource_id' of VDU has +changed before and after operation, 'physical_resource_id' of VDU's parent +resource has no change before and after operation, and that the +'resource_status' of VDU has been created successfully, 'resource_status' of +VDU's parent resource has been updated successfully, + +3. check 'volume' information of VDU before and after operation. This is to +confirm that VDU's has changed successfully. + +.. note:: Both single VM and VM created by `OS::Heat::AutoScalingGroup` support + change from image to image. + +* Check point 1 before operation + + Stack information before operation: + + .. code-block:: console + + $ openstack stack list -c 'ID' -c 'Stack Name' -c 'Stack Status' + + Result: + + .. code-block:: console + + +--------------------------------------+------------------------------------------+-----------------+ + | ID | Stack Name | Stack Status | + +--------------------------------------+------------------------------------------+-----------------+ + | 9112aa96-c15c-4e79-a86e-dd0d4d0ca971 | vnf-cab27275-4b9d-43ba-be17-fab9b1ba6a43 | CREATE_COMPLETE | + +--------------------------------------+------------------------------------------+-----------------+ + +* Check point 2 before operation + + Stack resource information before operation: + + .. code-block:: console + + $ openstack stack resource list 9112aa96-c15c-4e79-a86e-dd0d4d0ca971 \ + --filter type='OS::Heat::AutoScalingGroup' + + Result: + + .. code-block:: console + + +---------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | VDU1_scale | 0aaba3e7-b2e1-49ee-98fa-ff7c4380663b | OS::Heat::AutoScalingGroup | CREATE_COMPLETE | 2022-03-18T05:19:06Z | + +---------------+--------------------------------------+----------------------------+-----------------+----------------------+ + + VDU(created by `OS::Heat::AutoScalingGroup`)'s parent information + before operation: + + .. code-block:: console + + $ openstack stack resource list 0aaba3e7-b2e1-49ee-98fa-ff7c4380663b + + Result: + + .. code-block:: console + + +---------------+--------------------------------------+---------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------+--------------------------------------+---------------------------+-----------------+----------------------+ + | qkrp3rzmsnrp | cdf81724-b4a7-4b9f-9dd3-35fddece9c89 | base_hot_nested_VDU1.yaml | CREATE_COMPLETE | 2022-03-18T05:19:06Z | + +---------------+--------------------------------------+---------------------------+-----------------+----------------------+ + + VDU(created by `OS::Heat::AutoScalingGroup`) information before operation: + + .. code-block:: console + + $ openstack stack resource list cdf81724-b4a7-4b9f-9dd3-35fddece9c89 + + Result: + + .. code-block:: console + + +---------------------+--------------------------------------+------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------------+--------------------------------------+------------------------+-----------------+----------------------+ + | VDU1 | 3f3fa0d8-b948-45fe-bd86-41d5d3e28974 | OS::Nova::Server | CREATE_COMPLETE | 2022-03-18T05:19:07Z | + | VDU1-VirtualStorage | bbc1786c-cde0-491d-9f39-fcc6ca610146 | OS::Cinder::Volume | CREATE_COMPLETE | 2022-03-18T05:19:07Z | + | multi | 317c1afb-92c5-408f-9709-7a9dbb3b300d | OS::Cinder::VolumeType | CREATE_COMPLETE | 2022-03-18T05:19:07Z | + | VDU1_CP1 | ebce7083-f345-424b-aa0f-605e7f4a010c | OS::Neutron::Port | CREATE_COMPLETE | 2022-03-18T05:19:07Z | + +---------------------+--------------------------------------+------------------------+-----------------+----------------------+ + + VDU(single) information before operation: + + .. code-block:: console + + $ openstack stack resource list 9112aa96-c15c-4e79-a86e-dd0d4d0ca971 + + Result: + + .. code-block:: console + + +---------------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | VDU1_scale_in | 98ee6547b76e4389a6089cd79becd826 | OS::Heat::ScalingPolicy | CREATE_COMPLETE | 2022-03-18T05:19:01Z | + | VDU1_scale_out | f9f70e79b7eb4ddd945e5de66764398b | OS::Heat::ScalingPolicy | CREATE_COMPLETE | 2022-03-18T05:19:02Z | + | VDU1_scale | 0aaba3e7-b2e1-49ee-98fa-ff7c4380663b | OS::Heat::AutoScalingGroup | CREATE_COMPLETE | 2022-03-18T05:19:02Z | + | VDU2 | 23122c2d-d51d-422a-8ad6-6c3625c761b6 | OS::Nova::Server | CREATE_COMPLETE | 2022-03-18T05:19:02Z | + | VDU2-VirtualStorage | 68a53b24-83eb-4e88-a605-1e9d922e3ec0 | OS::Cinder::Volume | CREATE_COMPLETE | 2022-03-18T05:19:02Z | + | multi | 04a32f7b-b9b6-484c-a279-37452f807f6d | OS::Cinder::VolumeType | CREATE_COMPLETE | 2022-03-18T05:19:02Z | + | VDU2_CP1 | 2637ef79-881e-4c21-9360-86bb232a634d | OS::Neutron::Port | CREATE_COMPLETE | 2022-03-18T05:19:02Z | + +---------------------+--------------------------------------+----------------------------+-----------------+----------------------+ + +* Check point 3 before operation + + VDU(created by `OS::Heat::AutoScalingGroup`) detailed information before + operation: + + .. code-block:: console + + $ openstack stack resource show cdf81724-b4a7-4b9f-9dd3-35fddece9c89 VDU1 \ + -c attributes --fit-width + + Result: + + .. code-block:: console + + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Field | Value | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | attributes | {'id': '3f3fa0d8-b948-45fe-bd86-41d5d3e28974', 'name': 'VDU1', 'status': 'ACTIVE', 'tenant_id': 'b7457dcef9374c2fa72e22c452bb04e9', 'user_id': 'ed6a354ef25041ac92c0e445e91cc9a9', 'metadata': {}, 'hostId': | + | | '9ffb36d3d791f739fa98677bb1f6baddb01221443abf50c2aabad442', 'image': '', 'flavor': {'vcpus': 1, 'ram': 512, 'disk': 1, 'ephemeral': 0, 'swap': 0, 'original_name': 'm1.tiny', 'extra_specs': {'hw_rng:allowed': 'True'}}, | + | | 'created': '2022-03-18T05:19:22Z', 'updated': '2022-03-18T05:19:35Z', 'addresses': {'net0': [{'version': 4, 'addr': '10.10.0.25', 'OS-EXT-IPS:type': 'fixed', 'OS-EXT-IPS-MAC:mac_addr': 'fa:16:3e:c4:68:6f'}]}, 'accessIPv4': | + | | '', 'accessIPv6': '', 'links': [{'rel': 'self', 'href': 'http://192.168.2.100/compute/v2.1/servers/3f3fa0d8-b948-45fe-bd86-41d5d3e28974'}, {'rel': 'bookmark', 'href': 'http://192.168.2.100/compute/servers/3f3fa0d8-b948-45fe- | + | | bd86-41d5d3e28974'}], 'OS-DCF:diskConfig': 'MANUAL', 'progress': 0, 'OS-EXT-AZ:availability_zone': 'osaka', 'config_drive': '', 'key_name': None, 'OS-SRV-USG:launched_at': '2022-03-18T05:19:23.000000', 'OS-SRV- | + | | USG:terminated_at': None, 'security_groups': [{'name': 'default'}], 'OS-EXT-SRV-ATTR:host': 'compute102', 'OS-EXT-SRV-ATTR:instance_name': 'instance-000007c2', 'OS-EXT-SRV-ATTR:hypervisor_hostname': 'compute102', 'OS-EXT- | + | | SRV-ATTR:reservation_id': 'r-r0zmi6q4', 'OS-EXT-SRV-ATTR:launch_index': 0, 'OS-EXT-SRV-ATTR:hostname': 'vdu1', 'OS-EXT-SRV-ATTR:kernel_id': '', 'OS-EXT-SRV-ATTR:ramdisk_id': '', 'OS-EXT-SRV-ATTR:root_device_name': | + | | '/dev/vda', 'OS-EXT-SRV-ATTR:user_data': 'Q29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PSI9PT09PT09PT09PT09PT04MzE3NTc1OTA5Njg2OTM3MzgxPT0iCk1JTUUtVmVyc2lvbjogMS4wCgotLT09PT09PT09PT09PT09PTgzMTc1NzU5MDk2ODY5MzczODE9PQ | + | | ', 'os-extended-volumes:volumes_attached': [{'id': 'bbc1786c-cde0-491d-9f39-fcc6ca610146', 'delete_on_termination': False}], 'host_status': 'UP', 'locked': False, 'locked_reason': None, 'description': None, 'tags': [], | + | | 'trusted_image_certificates': None, 'server_groups': [], 'os_collect_config': {}} | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + VDU(single) detailed information before operation: + + .. code-block:: console + + $ openstack stack resource show 9112aa96-c15c-4e79-a86e-dd0d4d0ca971 VDU2 \ + -c attributes --fit-width + + Result: + + .. code-block:: console + + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Field | Value | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | attributes | {'id': '23122c2d-d51d-422a-8ad6-6c3625c761b6', 'name': 'vn-7275-4b9d-43ba-be17-fab9b1ba6a43-VDU2-ngkljvkbmvhp', 'status': 'ACTIVE', 'tenant_id': 'b7457dcef9374c2fa72e22c452bb04e9', 'user_id': | + | | 'ed6a354ef25041ac92c0e445e91cc9a9', 'metadata': {}, 'hostId': 'd2de6a234a80a445a7ee385f445e6084358f3aef2e110d7bc888ccf2', 'image': '', 'flavor': {'vcpus': 1, 'ram': 512, 'disk': 1, 'ephemeral': 0, 'swap': 0, 'original_name': | + | | 'm1.tiny', 'extra_specs': {'hw_rng:allowed': 'True'}}, 'created': '2022-03-18T05:19:16Z', 'updated': '2022-03-18T05:19:30Z', 'addresses': {'net0': [{'version': 4, 'addr': '10.10.0.101', 'OS-EXT-IPS:type': 'fixed', 'OS-EXT- | + | | IPS-MAC:mac_addr': 'fa:16:3e:30:1a:92'}]}, 'accessIPv4': '', 'accessIPv6': '', 'links': [{'rel': 'self', 'href': 'http://192.168.2.100/compute/v2.1/servers/23122c2d-d51d-422a-8ad6-6c3625c761b6'}, {'rel': 'bookmark', 'href': | + | | 'http://192.168.2.100/compute/servers/23122c2d-d51d-422a-8ad6-6c3625c761b6'}], 'OS-DCF:diskConfig': 'MANUAL', 'progress': 0, 'OS-EXT-AZ:availability_zone': 'nova', 'config_drive': '', 'key_name': None, 'OS-SRV- | + | | USG:launched_at': '2022-03-18T05:19:44.000000', 'OS-SRV-USG:terminated_at': None, 'security_groups': [{'name': 'default'}], 'OS-EXT-SRV-ATTR:host': 'compute101', 'OS-EXT-SRV-ATTR:instance_name': 'instance-000007c1', 'OS-EXT- | + | | SRV-ATTR:hypervisor_hostname': 'compute101', 'OS-EXT-SRV-ATTR:reservation_id': 'r-98ncwx8e', 'OS-EXT-SRV-ATTR:launch_index': 0, 'OS-EXT-SRV-ATTR:hostname': 'vn-7275-4b9d-43ba-be17-fab9b1ba6a43-vdu2-ngkljvkbmvhp', 'OS-EXT- | + | | SRV-ATTR:kernel_id': '', 'OS-EXT-SRV-ATTR:ramdisk_id': '', 'OS-EXT-SRV-ATTR:root_device_name': '/dev/vda', 'OS-EXT-SRV-ATTR:user_data': 'Q29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PSI9PT09PT09PT09PT09PT0xNjQ2NzE4OTM | + | | ', 'OS-EXT-STS:task_state': None, 'OS-EXT-STS:vm_state': 'active', 'OS-EXT-STS:power_state': 1, 'os-extended-volumes:volumes_attached': [{'id': '68a53b24-83eb-4e88-a605-1e9d922e3ec0', 'delete_on_termination': False}], | + | | 'host_status': 'UP', 'locked': False, 'locked_reason': None, 'description': None, 'tags': [], 'trusted_image_certificates': None, 'server_groups': [], 'os_collect_config': {}} | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + Change Current VNF Package execution of the entire VNF: + + .. code-block:: console + + $ openstack vnflcm change-vnfpkg VNF_INSTANCE_ID \ + ./sample_param_file_for_multi_resources.json + + Result: + + .. code-block:: console + + Change Current VNF Package for VNF Instance cab27275-4b9d-43ba-be17-fab9b1ba6a43 has been accepted. + +* Check point 1 after operation + + Stack information after operation: + + .. code-block:: console + + $ openstack stack list -c 'ID' -c 'Stack Name' -c 'Stack Status' + + Result: + + .. code-block:: console + + +--------------------------------------+------------------------------------------+-----------------+ + | ID | Stack Name | Stack Status | + +--------------------------------------+------------------------------------------+-----------------+ + | 9112aa96-c15c-4e79-a86e-dd0d4d0ca971 | vnf-cab27275-4b9d-43ba-be17-fab9b1ba6a43 | UPDATE_COMPLETE | + +--------------------------------------+------------------------------------------+-----------------+ + + .. note:: + 'Stack Status' transitions to UPDATE_COMPLETE. + +* Check point 2 after operation + + Stack resource information before operation: + + .. code-block:: console + + $ openstack stack resource list 9112aa96-c15c-4e79-a86e-dd0d4d0ca971 \ + --filter type='OS::Heat::AutoScalingGroup' + + Result: + + .. code-block:: console + + +---------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | VDU1_scale | 0aaba3e7-b2e1-49ee-98fa-ff7c4380663b | OS::Heat::AutoScalingGroup | UPDATE_COMPLETE | 2022-03-18T05:32:02Z | + +---------------+--------------------------------------+----------------------------+-----------------+----------------------+ + + VDU(created by `OS::Heat::AutoScalingGroup`)'s parent information + after operation: + + .. code-block:: console + + $ openstack stack resource list 0aaba3e7-b2e1-49ee-98fa-ff7c4380663b + + Result: + + .. code-block:: console + + +---------------+--------------------------------------+---------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------+--------------------------------------+---------------------------+-----------------+----------------------+ + | qkrp3rzmsnrp | cdf81724-b4a7-4b9f-9dd3-35fddece9c89 | base_hot_nested_VDU1.yaml | UPDATE_COMPLETE | 2022-03-18T05:32:02Z | + +---------------+--------------------------------------+---------------------------+-----------------+----------------------+ + + .. note:: + 'resource_status' transitions to UPDATE_COMPLETE. + + VDU(created by `OS::Heat::AutoScalingGroup`) information after operation: + + .. code-block:: console + + $ openstack stack resource list cdf81724-b4a7-4b9f-9dd3-35fddece9c89 + + Result: + + .. code-block:: console + + +---------------------+--------------------------------------+------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------------+--------------------------------------+------------------------+-----------------+----------------------+ + | multi | 317c1afb-92c5-408f-9709-7a9dbb3b300d | OS::Cinder::VolumeType | CREATE_COMPLETE | 2022-03-18T05:19:07Z | + | VDU1_CP1 | ebce7083-f345-424b-aa0f-605e7f4a010c | OS::Neutron::Port | CREATE_COMPLETE | 2022-03-18T05:19:07Z | + | VDU1-VirtualStorage | 21f9aa89-4456-42a6-8888-f08c8f70933f | OS::Cinder::Volume | CREATE_COMPLETE | 2022-03-18T05:29:58Z | + | VDU1 | 7d19f797-eb11-4af5-ba3b-d35349136786 | OS::Nova::Server | CREATE_COMPLETE | 2022-03-18T05:30:21Z | + +---------------------+--------------------------------------+------------------------+-----------------+----------------------+ + + .. note:: + 'resource_status' transitions to CREATE_COMPLETE. + 'physical_resource_id' changes from + '3f3fa0d8-b948-45fe-bd86-41d5d3e28974' to + '7d19f797-eb11-4af5-ba3b-d35349136786'. + + VDU(single) information after operation: + + .. code-block:: console + + $ openstack stack resource list 9112aa96-c15c-4e79-a86e-dd0d4d0ca971 + + Result: + + .. code-block:: console + + +---------------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | resource_name | physical_resource_id | resource_type | resource_status | updated_time | + +---------------------+--------------------------------------+----------------------------+-----------------+----------------------+ + | VDU1_scale_in | 98ee6547b76e4389a6089cd79becd826 | OS::Heat::ScalingPolicy | CREATE_COMPLETE | 2022-03-18T05:19:01Z | + | VDU1_scale_out | f9f70e79b7eb4ddd945e5de66764398b | OS::Heat::ScalingPolicy | CREATE_COMPLETE | 2022-03-18T05:19:02Z | + | VDU1_scale | 0aaba3e7-b2e1-49ee-98fa-ff7c4380663b | OS::Heat::AutoScalingGroup | UPDATE_COMPLETE | 2022-03-18T05:31:55Z | + | multi | 04a32f7b-b9b6-484c-a279-37452f807f6d | OS::Cinder::VolumeType | CREATE_COMPLETE | 2022-03-18T05:19:02Z | + | VDU2_CP1 | 2637ef79-881e-4c21-9360-86bb232a634d | OS::Neutron::Port | CREATE_COMPLETE | 2022-03-18T05:19:02Z | + | VDU2-VirtualStorage | fc0e0fcf-8eb9-4ddc-8194-2df6c1b43a7b | OS::Cinder::Volume | CREATE_COMPLETE | 2022-03-18T05:31:01Z | + | VDU2 | 9aeae773-0f5b-4809-a83b-dee09214db90 | OS::Nova::Server | CREATE_COMPLETE | 2022-03-18T05:31:15Z | + +---------------------+--------------------------------------+----------------------------+-----------------+----------------------+ + + .. note:: + 'resource_status' transitions to CREATE_COMPLETE. + 'physical_resource_id' changes from + '23122c2d-d51d-422a-8ad6-6c3625c761b6' to + '9aeae773-0f5b-4809-a83b-dee09214db90'. + +* Check point 3 after operation + + VDU(created by `OS::Heat::AutoScalingGroup`) detailed information after + operation: + + .. code-block:: console + + $ openstack stack resource show cdf81724-b4a7-4b9f-9dd3-35fddece9c89 VDU1 \ + -c attributes --fit-width + + Result: + + .. code-block:: console + + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Field | Value | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | attributes | {'id': '7d19f797-eb11-4af5-ba3b-d35349136786', 'name': 'VDU1', 'status': 'ACTIVE', 'tenant_id': 'b7457dcef9374c2fa72e22c452bb04e9', 'user_id': 'ed6a354ef25041ac92c0e445e91cc9a9', 'metadata': {}, 'hostId': | + | | 'd2de6a234a80a445a7ee385f445e6084358f3aef2e110d7bc888ccf2', 'image': '', 'flavor': {'vcpus': 1, 'ram': 512, 'disk': 1, 'ephemeral': 0, 'swap': 0, 'original_name': 'm1.tiny', 'extra_specs': {'hw_rng:allowed': 'True'}}, | + | | 'created': '2022-03-18T05:30:22Z', 'updated': '2022-03-18T05:30:36Z', 'addresses': {'net0': [{'version': 4, 'addr': '10.10.0.25', 'OS-EXT-IPS:type': 'fixed', 'OS-EXT-IPS-MAC:mac_addr': 'fa:16:3e:c4:68:6f'}]}, 'accessIPv4': | + | | '', 'accessIPv6': '', 'links': [{'rel': 'self', 'href': 'http://192.168.2.100/compute/v2.1/servers/7d19f797-eb11-4af5-ba3b-d35349136786'}, {'rel': 'bookmark', 'href': | + | | 'http://192.168.2.100/compute/servers/7d19f797-eb11-4af5-ba3b-d35349136786'}], 'OS-DCF:diskConfig': 'MANUAL', 'progress': 0, 'OS-EXT-AZ:availability_zone': 'nova', 'config_drive': '', 'key_name': None, 'OS-SRV- | + | | USG:launched_at': '2022-03-18T05:30:50.000000', 'OS-SRV-USG:terminated_at': None, 'security_groups': [{'name': 'default'}], 'OS-EXT-SRV-ATTR:host': 'compute101', 'OS-EXT-SRV-ATTR:instance_name': 'instance-000007c3', 'OS-EXT- | + | | SRV-ATTR:hypervisor_hostname': 'compute101', 'OS-EXT-SRV-ATTR:reservation_id': 'r-nlqgnld4', 'OS-EXT-SRV-ATTR:launch_index': 0, 'OS-EXT-SRV-ATTR:hostname': 'vdu1', 'OS-EXT-SRV-ATTR:kernel_id': '', 'OS-EXT-SRV- | + | | ATTR:ramdisk_id': '', 'OS-EXT-SRV-ATTR:root_device_name': '/dev/vda', 'OS-EXT-SRV-ATTR:user_data': 'Q29udGVudC1UeXBlOiBtdWx0aXBhcnQvbWl4ZWQ7IGJvdW5kYXJ5PSI9PT09PT09PT09PT09PT04MjE3MDExNTU4', 'OS-EXT-STS:task_state': None, | + | | 'OS-EXT-STS:vm_state': 'active', 'OS-EXT-STS:power_state': 1, 'os-extended-volumes:volumes_attached': [{'id': '21f9aa89-4456-42a6-8888-f08c8f70933f', 'delete_on_termination': False}], 'host_status': 'UP', 'locked': False, | + | | 'locked_reason': None, 'description': None, 'tags': [], 'trusted_image_certificates': None, 'server_groups': [], 'os_collect_config': {}} | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. note:: You can check 'os-extended-volumes:volumes_attached'->'id' + has changed from '68a53b24-83eb-4e88-a605-1e9d922e3ec0' to + '21f9aa89-4456-42a6-8888-f08c8f70933f'. + + VDU(single) detailed information after operation: + + .. code-block:: console + + $ openstack stack resource show 9112aa96-c15c-4e79-a86e-dd0d4d0ca971 VDU2 \ + -c attributes --fit-width + + Result: + + .. code-block:: console + + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | Field | Value | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | attributes | {'id': '9aeae773-0f5b-4809-a83b-dee09214db90', 'name': 'vn-7275-4b9d-43ba-be17-fab9b1ba6a43-VDU2-k4inik5wcz3y', 'status': 'ACTIVE', 'tenant_id': 'b7457dcef9374c2fa72e22c452bb04e9', 'user_id': | + | | 'ed6a354ef25041ac92c0e445e91cc9a9', 'metadata': {}, 'hostId': 'd2de6a234a80a445a7ee385f445e6084358f3aef2e110d7bc888ccf2', 'image': '', 'flavor': {'vcpus': 1, 'ram': 512, 'disk': 1, 'ephemeral': 0, 'swap': 0, 'original_name': | + | | 'm1.tiny', 'extra_specs': {'hw_rng:allowed': 'True'}}, 'created': '2022-03-18T05:31:16Z', 'updated': '2022-03-18T05:31:29Z', 'addresses': {'net0': [{'version': 4, 'addr': '10.10.0.101', 'OS-EXT-IPS:type': 'fixed', 'OS-EXT- | + | | IPS-MAC:mac_addr': 'fa:16:3e:30:1a:92'}]}, 'accessIPv4': '', 'accessIPv6': '', 'links': [{'rel': 'self', 'href': 'http://192.168.2.100/compute/v2.1/servers/9aeae773-0f5b-4809-a83b-dee09214db90'}, {'rel': 'bookmark', 'href': | + | | 'http://192.168.2.100/compute/servers/9aeae773-0f5b-4809-a83b-dee09214db90'}], 'OS-DCF:diskConfig': 'MANUAL', 'progress': 0, 'OS-EXT-AZ:availability_zone': 'nova', 'config_drive': '', 'key_name': None, 'OS-SRV- | + | | USG:launched_at': '2022-03-18T05:31:43.000000', 'OS-SRV-USG:terminated_at': None, 'security_groups': [{'name': 'default'}], 'OS-EXT-SRV-ATTR:host': 'compute101', 'OS-EXT-SRV-ATTR:instance_name': 'instance-000007c4', 'OS-EXT- | + | | SRV-ATTR:hypervisor_hostname': 'compute101', 'OS-EXT-SRV-ATTR:reservation_id': 'r-gonky2fj', 'OS-EXT-SRV-ATTR:launch_index': 0, 'OS-EXT-SRV-ATTR:hostname': 'vn-7275-4b9d-43ba-be17-fab9b1ba6a43-vdu2-k4inik5wcz3y', 'OS-EXT- | + | | S', 'OS-EXT-STS:task_state': None, 'OS-EXT-STS:vm_state': 'active', 'OS-EXT-STS:power_state': 1, 'os-extended-volumes:volumes_attached': [{'id': 'fc0e0fcf-8eb9-4ddc-8194-2df6c1b43a7b', 'delete_on_termination': False}], | + | | 'host_status': 'UP', 'locked': False, 'locked_reason': None, 'description': None, 'tags': [], 'trusted_image_certificates': None, 'server_groups': [], 'os_collect_config': {}} | + +------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + + .. note:: You can check 'os-extended-volumes:volumes_attached'->'id' has + changed from '68a53b24-83eb-4e88-a605-1e9d922e3ec0' to + 'fc0e0fcf-8eb9-4ddc-8194-2df6c1b43a7b'. + +.. _Heat CLI reference : https://docs.openstack.org/python-openstackclient/latest/cli/plugin-commands/heat.html +.. _VNF Package for Common instantiate: https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_v2/samples/test_instantiate_vnf_with_old_image_or_volume/contents +.. _change from image to image: https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_v2/samples/test_change_vnf_pkg_with_new_image/contents +.. _change from image to volume: https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_v2/samples/test_change_vnf_pkg_with_new_volume/contents +.. _change from volume to image: https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_v2/samples/test_change_vnf_pkg_with_new_image/contents +.. _change from volume to volume: https://opendev.org/openstack/tacker/src/branch/master/tacker/tests/functional/sol_v2/samples/test_change_vnf_pkg_with_new_volume/contents diff --git a/doc/source/user/etsi_vnf_error_handling.rst b/doc/source/user/etsi_vnf_error_handling.rst index 3cd10b35a..aa0eb4d49 100644 --- a/doc/source/user/etsi_vnf_error_handling.rst +++ b/doc/source/user/etsi_vnf_error_handling.rst @@ -280,6 +280,13 @@ Rollback VNF LCM Operation - ROLLED_BACK or FAILED_TEMP - - X + * - Change Current VNF Package + - | VNFM reverts changes of current vnf package for VNF instances. + | e.g. Tacker reverts stack parameters and executes Heat stack-update. + - FAILED_TEMP + - ROLLED_BACK or FAILED_TEMP + - + - X .. note:: | In some cases, Rollback of Change external connectivity cannot recover @@ -288,6 +295,8 @@ Rollback VNF LCM Operation the IP address and Port Id will be recovered by its rollback operation. | Otherwise, dynamic IP address and Port Id are not recovered by rollback operation. + | Currently, Instantiate VNF with kubernetes vim does not support rollback + operation when using v2 API. This manual describes the following operations as use cases for rollback operations. @@ -390,6 +399,12 @@ Fail VNF LCM Operation - FAILED - X - X + * - Change Current VNF Package + - Tacker simply changes LCM operation state to "FAILED" on Tacker-DB. + - FAILED_TEMP + - FAILED + - + - X This manual describes the following operations as use cases for fail operations. @@ -492,6 +507,16 @@ Retry VNF LCM Operation - COMPLETED or FAILED_TEMP - X - X + * - Change Current VNF Package + - VNFM retries a Change current VNF package operation. + - FAILED_TEMP + - COMPLETED or FAILED_TEMP + - + - X + +.. note:: + | Currently, Instantiate VNF with kubernetes vim does not support retry + operation when using v2 API. This manual describes the following operations as use cases for retry operations.