VNF スナップショットの管理
スナップショットは、実行中のインスタンスから OpenStack に新しいイメージを作成できるメカニズムです。VNF スナップショットは、主に次の 2 つの目的を果たします。
-
バックアップメカニズムとして:インスタンスのメインディスクをイメージに保存し、後で保存されたデータを使用してこのイメージから新しいインスタンスを起動します。
-
テンプレートメカニズムとして:ベースイメージをカスタマイズして保存し、新しいインスタンスのテンプレートとして使用します。
VNF スナップショットのライフサイクル全体は、ETSI 定義の API を使用して管理できます。
注意事項と制限事項:
VNF スナップショットに ETSI API を使用する前に、次の点を理解することが重要です。
-
VNF スナップショットを使用するために VNF 記述子ファイルに必要な変更はありません。OpenStack VIM に対して展開された VNF には、スナップショット機能が存在します。CVIM や VMWare などの OpenStack 以外の VIM に展開された VNF に対してスナップショットが試行されると、適切なエラーメッセージが生成されます。
-
ETSI 仕様によると、API ルートは新しい "v2” URL、つまり SOL003 API の http://192.168.201.33:8250/or_vnfm/vnflcm/v2/vnf_snapshots または SOL002 API の http://192.168.201.33:8250/ve_vnfm/vnflcm/v2/vnf_snapshots でのみ利用できます。
-
VNF が VNF 管理ボリュームまたはアウトオブバンドボリュームのいずれかである 1 つ以上のボリュームを使用している場合、結果として得られる VNF のスナップショットは、OpenStack で生成されるイメージおよびボリューム スナップショット リソースになります。
-
ETSI 内で VNF を削除しても、VNF から以前に作成されたスナップショットの削除はトリガーされません。したがって、親 VNF を削除する前に VNF スナップショットを削除してください。
スナップショット管理の API リソース:
ETSI API を使用して VNF スナップショットを作成、クエリ、復元、および削除します。
VNF スナップショットの作成:
OpenStack で生成された関連リソースを使用したスナップショットの作成は、2 段階のプロセスです。
-
スナップショットリソースの作成
-
スナップショットリソース ID と既存の VNF インスタンス ID を指定してスナップショットを作成する
API の実行
以下は、操作、サンプルペイロード、および Linux curl をクライアントとして使用して API 応答を示し、ローカルホストである ESC VM で API を実行します。
-
スナップショットリソースの作成:返された "id" 値に注意してください
[admin@host]$ curl -s --user 'admin:*******' -X POST --data {} -H 'Content-Type:application/json' http://localhost:8250/or_vnfm/vnflcm/v2/vnf_snapshots | python -m json.tool
{
"_links": {
"self": {
"href": "http://localhost:8250/or_vnfm/vnflcm/v2/vnf_snapshots/fc7f055c-a541-4801-9295-299ce806763f"
}
},
"id": "fc7f055c-a541-4801-9295-299ce806763f"
}
-
スナップショットリソース ID と既存の VNF インスタンス ID を指定してスナップショットを作成
[admin@host]$ cat create_snapshot.json
{
"vnfSnapshotInfoId": "fc7f055c-a541-4801-9295-299ce806763f"
}
[admin@host]$ curl -s --user 'admin:*******' -X POST --data @create_snapshot.json -H 'Content-Type:application/json' http://localhost:8250/or_vnfm/vnflcm/v2/vnf_instances/c9cdf5c8-3681-4641-ba7e-df40539815b5/create_snapshot
ペイロードには、以前の操作からの VNF スナップショット ID が含まれている必要があり、URL の VNF インスタンス ID は、INSTANTIATED VNF を参照している必要があります。
エラー状態:
-
VNF スナップショット ID または VNF インスタンス ID が無効な場合、エラーが返されます。
-
OpenStack に到達できない場合、またはリソースクォータを超えた場合、OpenStack 固有のエラーが返されます。
-
ETSI サービスは、他のすべての ESC サービスに依存して動作します。そうしない場合、接続関連のエラーが発生します。
生成された通知:
スナップショットリソースの作成時に通知は生成されません。
スナップショットが OpenStack で作成されると、次の 3 つの操作状態、つまり STARTING、PROCESSING、および COMPLETED に対して 3 つの通知が生成されます。
{
"vnfInstanceId": "c9cdf5c8-3681-4641-ba7e-df40539815b5",
"timeStamp": "2022-07-20T15:08:43.089Z",
"isAutomaticInvocation": false,
"notificationType": "VnfLcmOperationOccurrenceNotification",
"operationState": "STARTING",
"notificationStatus": "START",
"vnfLcmOpOccId": "ecbbdc92-a38a-4aed-bc7c-acf0df1a5b92",
"_links": {
"vnfInstance": {
"href": "https://192.168.10.50:8251/or_vnfm/vnflcm/v2/vnf_instances/c9cdf5c8-3681-4641-ba7e-df40539815b5"
},
"vnfLcmOpOcc": {
"href": "https://192.168.10.50:8251/or_vnfm/vnflcm/v2/vnf_lcm_op_occs/ecbbdc92-a38a-4aed-bc7c-acf0df1a5b92"
},
"subscription": {
"href": "https://192.168.10.50:8251/or_vnfm/vnflcm/v2/subscriptions/900c511f-27e7-4819-aa8d-1fae527caa85"
}
},
"subscriptionId": "900c511f-27e7-4819-aa8d-1fae527caa85",
"operation": "CREATE_SNAPSHOT",
"id": "640804b1-2564-4020-af72-16b70d6ac83d"
}
{
"vnfInstanceId": "c9cdf5c8-3681-4641-ba7e-df40539815b5",
"timeStamp": "2022-07-20T15:08:43.798Z",
"isAutomaticInvocation": false,
"notificationType": "VnfLcmOperationOccurrenceNotification",
"operationState": "PROCESSING",
"notificationStatus": "START",
"vnfLcmOpOccId": "ecbbdc92-a38a-4aed-bc7c-acf0df1a5b92",
"_links": {
"vnfInstance": {
"href": "https://192.168.10.50:8251/or_vnfm/vnflcm/v2/vnf_instances/c9cdf5c8-3681-4641-ba7e-df40539815b5"
},
"vnfLcmOpOcc": {
"href": "https://192.168.10.50:8251/or_vnfm/vnflcm/v2/vnf_lcm_op_occs/ecbbdc92-a38a-4aed-bc7c-acf0df1a5b92"
},
"subscription": {
"href": "https://192.168.10.50:8251/or_vnfm/vnflcm/v2/subscriptions/900c511f-27e7-4819-aa8d-1fae527caa85"
}
},
"subscriptionId": "900c511f-27e7-4819-aa8d-1fae527caa85",
"operation": "CREATE_SNAPSHOT",
"id": "6907ac6f-41e4-4bb6-9d31-83f9e809b933"
}
{
"vnfInstanceId": "c9cdf5c8-3681-4641-ba7e-df40539815b5",
"timeStamp": "2022-07-20T15:09:02.773Z",
"isAutomaticInvocation": false,
"notificationType": "VnfLcmOperationOccurrenceNotification",
"operationState": "COMPLETED",
"notificationStatus": "RESULT",
"vnfLcmOpOccId": "ecbbdc92-a38a-4aed-bc7c-acf0df1a5b92",
"_links": {
"vnfInstance": {
"href": "https://192.168.10.50:8251/or_vnfm/vnflcm/v2/vnf_instances/c9cdf5c8-3681-4641-ba7e-df40539815b5"
},
"vnfLcmOpOcc": {
"href": "https://192.168.10.50:8251/or_vnfm/vnflcm/v2/vnf_lcm_op_occs/ecbbdc92-a38a-4aed-bc7c-acf0df1a5b92"
},
"subscription": {
"href": "https://192.168.10.50:8251/or_vnfm/vnflcm/v2/subscriptions/900c511f-27e7-4819-aa8d-1fae527caa85"
}
},
"subscriptionId": "900c511f-27e7-4819-aa8d-1fae527caa85",
"operation": "CREATE_SNAPSHOT",
"id": "de25c769-4264-4fa3-a61f-2aae960c6b60"
}
生成される OpenStack リソース:
操作が正常に完了し、最終通知を受け取ると、次のリソースが OpenStack に作成されます。
IMAGE
VNF 内でのすべての VM のイメージを作成します。たとえば、VNF に 2 つの VDU が含まれている場合、OpenStack に 2 つのイメージが作成されます。
イメージには、自動生成された VNFC スナップショットの名前、UUID タイプの値があります。次に例を示します。
[admin@host]$ openstack image list
+--------------------------------------+---------------------------------------------------+--------+
| ID | Name | Status |
+--------------------------------------+---------------------------------------------------+--------+
| 92e144ae-24fc-49a5-8622-bb224f1e55cd | eac61a66-51d2-47dd-b8f4-289f38203eff | active |
(注) |
注:「VNF スナップショットのクエリ」セクションで説明されている VNF スナップショットのクエリ出力で、イメージ ID とその UUID に似た名前の両方を見つけます。 |
ボリュームスナップショット:
VNF 内でのすべてのボリュームのボリュームスナップショットを作成します。たとえば、VNF がそれぞれ 2 つのボリューム内に 2 つの VDU を含む場合、4 つのボリュームスナップショットが OpenStack に作成されます。
ボリュームスナップショットには、自動生成された VNFC スナップショットの名前が付けられています。これは、「snapshot for」が先頭に付いた UUID タイプの値です。次に例を示します。
[admin@host]$ openstack volume snapshot list
+--------------------------------------+---------------------------------------------------+-------------+-----------+------+
| ID | Name | Description | Status | Size |
+--------------------------------------+---------------------------------------------------+-------------+-----------+------+
| 503c348d-94f1-4351-85ec-686b4a21589c | snapshot for eac61a66-51d2-47dd-b8f4-289f38203eff | None | available | 1 |
(注) |
「VNF スナップショットのクエリ」セクションで説明されている VNF スナップショットのクエリ出力で、ボリュームスナップショット ID とその名前の UUID 部分両方を検索します。 |
VNF スナップショットのクエリ:
次の 2 つの主要なクエリを使用して、ETSI VNF スナップショット情報を返します。
-
すべての VNF スナップショットのクエリ
-
特定の VNF スナップショットのクエリ
API の実行
以下は、これらの操作と API 応答の両方を示しています。Linux curl をクライアントとして使用し、ESC VM、つまりローカルホスト自体で API を実行しています。
-
すべての VNF スナップショットのクエリ:配列が返されます
[admin@host]$ curl -s --user 'admin*******' -X GET -H 'Content-Type:application/json' http://localhost:8250/or_vnfm/vnflcm/v2/vnf_snapshots | python -m json.tool
[
{
"_links": {
"self": {
"href": "http://localhost:8250/or_vnfm/vnflcm/v2/vnf_snapshots/fc7f055c-a541-4801-9295-299ce806763f"
},
"takenFrom": {
"href": "http://localhost:8250/or_vnfm/vnflcm/v2/vnf_instances/c9cdf5c8-3681-4641-ba7e-df40539815b5"
}
},
"id": "fc7f055c-a541-4801-9295-299ce806763f",
"vnfSnapshot": {
"creationFinishedAt": "2022-07-20T15:09:02.588Z",
"creationStartedAt": "2022-07-20T15:08:43.966Z",
"id": "0e61b4f8-b347-4d48-80e1-b7a1d28196ef",
"vnfInstanceId": "c9cdf5c8-3681-4641-ba7e-df40539815b5",
"vnfdId": "9fb7e4ee-2db1-4aef-bc62-98a2d35d1fa0"
}
}
]
-
特定の VNF スナップショットのクエリ:単一のスナップショットが返されます
[admin@host]$ curl -s --user 'admin:cisco123' -X GET -H 'Content-Type:application/json' http://localhost:8250/or_vnfm/vnflcm/v2/vnf_snapshots/fc7f055c-a541-4801-9295-299ce806763f | python -m json.tool
{
"_links": {
"self": {
"href": "http://localhost:8250/or_vnfm/vnflcm/v2/vnf_snapshots/fc7f055c-a541-4801-9295-299ce806763f"
},
"takenFrom": {
"href": "http://localhost:8250/or_vnfm/vnflcm/v2/vnf_instances/c9cdf5c8-3681-4641-ba7e-df40539815b5"
}
},
"id": "fc7f055c-a541-4801-9295-299ce806763f", <!-- THE VNF SNAPSHOT ID -->
"vnfSnapshot": {
"creationFinishedAt": "2022-07-20T15:09:02.588Z",
"creationStartedAt": "2022-07-20T15:08:43.966Z",
"id": "0e61b4f8-b347-4d48-80e1-b7a1d28196ef",
"vnfInstance": {
"id": "c9cdf5c8-3681-4641-ba7e-df40539815b5",
"instantiatedVnfInfo": {
<!-- Data deleted as identical to the output from a VNF Instance query -->
},
"vnfInstanceId": "c9cdf5c8-3681-4641-ba7e-df40539815b5", <!-- THE VNF INSTANCE ID -->
"vnfcSnapshots": [
{
"computeSnapshotResource": {
"resourceId": "92e144ae-24fc-49a5-8622-bb224f1e55cd" <!-- THE IMAGE ID -->
},
"creationFinishedAt": "2022-07-20T15:09:02.588Z",
"creationStartedAt": "2022-07-20T15:08:43.966Z",
"id": "eac61a66-51d2-47dd-b8f4-289f38203eff", <!-- THE IMAGE NAME AND VOLUME SNAPSHOT NAME -->
"storageSnapshotResources": [
{
"storageResourceId": "res-cfd9a704-0cae-43e2-9880-0b1ba41f2615",
"storageSnapshotResource": {
"resourceId": "503c348d-94f1-4351-85ec-686b4a21589c" <!-- THE VOLUME SNAPSHOT ID -->
}
}
],
"vnfcInstanceId": "res-9f5401e3-0129-4657-8ef7-18da424fd369", <!-- NEEDED IF USING THE SOL002 API -->
"vnfcResourceInfoId": "res-9f5401e3-0129-4657-8ef7-18da424fd369"
},
],
"vnfdId": "9fb7e4ee-2db1-4aef-bc62-98a2d35d1fa0"
}
}
SOL002 または SOL003 API を使用した VNF スナップショットの復元:
ユーザーは、VNF スナップショットを復元するためのライフサイクル管理操作を実行して、以前のバージョンの VNF に戻すことができます。
API の実行:
以下に、VNF スナップショットを復元するためのサンプルペイロードを示します。
-
スナップショットリソース ID と VNF インスタンス ID を指定して VNF スナップショットを復元します。
[admin@host]$ cat revert_snapshot.json
{
"vnfSnapshotInfoId": "fc7f055c-a541-4801-9295-299ce806763f"
}
[admin@host]$ curl -s --user 'admin:*******' -X POST --data @revert_snapshot.json -H 'Content-Type:application/json' http://localhost:8250/or_vnfm/vnflcm/v2/vnf_instances/c9cdf5c8-3681-4641-ba7e-df40539815b5/revert_to_snapshot
(注) |
SOL002 API ルートは、or_vnfm ではなく ve_vnfm を使用します。 |
次のサンプルペイロードでは、復元が単一の VNFC に制限されます。
SOL002:
{
"vnfSnapshotInfoId": “fc7f055c-a541-4801-9295-299ce806763f”,
"vnfcInstanceId": “res-9f5401e3-0129-4657-8ef7-18da424fd369",
"vnfcSnapshotInfoId": “eac61a66-51d2-47dd-b8f4-289f38203eff"
}
追加パラメータを使用した SOL003:
{
"vnfSnapshotInfoId": “fc7f055c-a541-4801-9295-299ce806763f”,
"additionalParams": {
"vnfcInstanceId": “res-9f5401e3-0129-4657-8ef7-18da424fd369",
"vnfcSnapshotInfoId": “eac61a66-51d2-47dd-b8f4-289f38203eff"
}
}
生成された通知:
OpenStack でスナップショットが復元されると、3 つの操作状態(STARTING、PROCESSING、および COMPLETED)に対して 3 つの通知が生成されます。
注意事項と制限事項:
-
スナップショットの復元では、ブート可能ボリュームのない VM のスナップショットは現在サポートされていません。
-
OOB ボリュームがあるスナップショットは復元できません。
-
OpenStack では、ボリュームにボリュームスナップショットがある場合、そのボリュームは削除できません。ESC は、復元中にボリュームを削除しようとしますが、それらのボリュームは VIM に残ります。
VNF スナップショットの削除:
VNF スナップショットの削除には、次のように単一の URL が含まれます。
[admin@host]$ curl --user 'admin:********' -X DELETE http://localhost:8250/or_vnfm/vnflcm/v2/vnf_snapshots/fc7f055c-a541-4801-9295-299ce806763f
(注) |
VNF スナップショットの削除は同期操作です。つまり、ESC のワークフロー全体が完了するまで API 呼び出しは返されません。VNF スナップショットで複数の VDU とボリュームを削除する必要がある場合、削除には時間がかかります。 |
エラー状態
-
VNF スナップショット ID が無効な場合、適切なエラーが返されます。
-
OpenStack に到達できない場合、またはリソースクォータを超えた場合、OpenStack 固有のエラーが返されます。
-
ETSI サービスは、他のすべての ESC サービスに依存して動作します。そうしない場合、接続関連のエラーが発生します。
生成された通知:
ETSI 仕様によると、同期の性質のため、VNF スナップショットの削除操作に対して通知は生成されません。
SOL002 API を使用した VNF スナップショットの作成:
SOL002 API を使用して VNF スナップショットを作成します。これにより、個々の VNFC ID を指定できます。
VNF 内の個々の VDU(VNFC)には、VNF 全体の VNF スナップショットを作成するのではなく、スナップショットが作成されます。
[admin@host]$ cat create_snapshot.json
{
"vnfSnapshotInfoId": "fc7f055c-a541-4801-9295-299ce806763f",
"additionalParams": {
"vnfcInstanceId": "res-9f5401e3-0129-4657-8ef7-18da424fd369"
}
}
[admin@host]$ curl --user 'admin:********' -X POST --data @create_snapshot.json -H 'Content-Type:application/json' http://localhost:8250/ve_vnfm/vnflcm/v2/vnf_instances/c9cdf5c8-3681-4641-ba7e-df40539815b5/create_snapshot
(注) |
SOL002 API ルートは、or_vnfm ではなく ve_vnfm を使用します。 |
エラー状態:
-
VNF スナップショット ID、VNF インスタンス ID、または VNFC インスタンス ID が無効な場合、エラーが返されます。
-
OpenStack に到達できない場合、またはリソースクォータを超えた場合、OpenStack 固有のエラーが返されます。
-
ETSI サービスは、他のすべての ESC サービスに依存して動作します。そうしない場合、接続関連のエラーが発生します。
生成された通知:
SOL003 VNF Snapshot Create と同じ通知が生成されます。