Ashutosh Mishra | 857edc6 | 2024-06-18 05:27:47 +0000 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
| 2 | .. http://creativecommons.org/licenses/by/4.0 |
| 3 | |
| 4 | |
| 5 | |
| 6 | How to use Fault Management |
| 7 | =========================== |
| 8 | |
| 9 | This user guide shows how to create subscription on DMS-ETSI for FM and how |
| 10 | DMS-ETSI set alert rules in monitoring tool (prometheus). |
| 11 | |
| 12 | .. contents:: |
| 13 | :depth: 3 |
| 14 | :local: |
| 15 | |
| 16 | |
| 17 | Prerequisites |
| 18 | ------------- |
| 19 | |
| 20 | #. To create PaaS environment for FM that can be integrated with INF O2 service, |
| 21 | the following software need to be installed. |
| 22 | |
| 23 | * OpenStack |
| 24 | * Prometheus |
| 25 | * Alert Manager |
| 26 | * Node Exporter |
| 27 | * Kube-state-metrics |
| 28 | * Notification server |
| 29 | |
| 30 | #. In PaaS environment containerized VNF should be installed, deployed and |
| 31 | instantiated according to the steps below. |
| 32 | |
| 33 | https://docs.openstack.org/tacker/latest/user/v2/cnf/deployment_using_helm/index.html |
| 34 | |
| 35 | |
| 36 | Abbreviations |
| 37 | ------------- |
| 38 | |
| 39 | * FM : Fault Management |
| 40 | * DMS-ETSI : Deployment Management Services of ETSI like tacker |
| 41 | * NF FM : NF FM may be human in this version or a component part of SMO |
| 42 | |
| 43 | |
| 44 | Procedure |
| 45 | --------- |
| 46 | |
| 47 | #. Create FM subscription |
| 48 | |
| 49 | NF FM sends a request to DMS-ETSI to create FM subscription. In this FM |
| 50 | subscription, multiple filter conditions can be set for fault like compute, |
| 51 | storage, network etc mentioned in create subscription sample file |
| 52 | sample_param_file.json. |
| 53 | |
| 54 | Follow the below steps to create a subscription for fault: |
| 55 | |
| 56 | * Confirm "ID" of the instantiated VNF by executing below command. |
| 57 | |
| 58 | .. code-block:: console |
| 59 | |
| 60 | $ openstack vnflcm list --os-tacker-api-version 2 |
| 61 | +--------------------------------------+-------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+ |
| 62 | | ID | VNF Instance Name | Instantiation State | VNF Provider | VNF Software Version | VNF Product Name | VNFD ID | |
| 63 | +--------------------------------------+-------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+ |
| 64 | | d2e61392-14dc-4b23-8d33-a19456de65c4 | | INSTANTIATED | Company | 1.0 | Sample VNF | b1bb0ce7-ebca-4fa7-95ed-4840d70a1177 | |
| 65 | +--------------------------------------+-------------------+---------------------+--------------+----------------------+------------------+--------------------------------------+ |
| 66 | |
| 67 | * Change the following values in subscription sample file |
| 68 | sample_param_file.json to the actual values confirmed |
| 69 | from above and save the file. |
| 70 | |
| 71 | * "vnfdIds" : Set the value of "VNFD ID" |
| 72 | * "vnfProvider" : Set the string of "VNF Provider" |
| 73 | * "vnfProductName" : Set the string of "VNF Product Name" |
| 74 | * "vnfSoftwareVersion" : Set the value of "VNF Software Version" |
| 75 | * "vnfInstanceIds" : Set the value of "ID" |
| 76 | |
| 77 | The content of the subscription sample sample_param_file.json is as follows: |
| 78 | |
| 79 | .. code-block:: console |
| 80 | |
| 81 | { |
| 82 | "filter": { |
| 83 | "vnfInstanceSubscriptionFilter": { |
| 84 | "vnfdIds": [ |
| 85 | "b1bb0ce7-ebca-4fa7-95ed-4840d70a1177" |
| 86 | ], |
| 87 | "vnfProductsFromProviders": [ |
| 88 | { |
| 89 | "vnfProvider": "Company", |
| 90 | "vnfProducts": [ |
| 91 | { |
| 92 | "vnfProductName": "Sample VNF", |
| 93 | "versions": [ |
| 94 | { |
| 95 | "vnfSoftwareVersion": 1.0, |
| 96 | "vnfdVersions": [1.0, 2.0] |
| 97 | } |
| 98 | ] |
| 99 | } |
| 100 | ] |
| 101 | } |
| 102 | ], |
| 103 | "vnfInstanceIds": [ |
| 104 | "d2e61392-14dc-4b23-8d33-a19456de65c4" |
| 105 | ] |
| 106 | }, |
| 107 | "notificationTypes": [ |
| 108 | "AlarmNotification", |
| 109 | "AlarmClearedNotification", |
| 110 | "AlarmListRebuiltNotification" |
| 111 | ], |
| 112 | "faultyResourceTypes": [ |
| 113 | "COMPUTE", |
| 114 | "STORAGE", |
| 115 | "NETWORK" |
| 116 | ], |
| 117 | "perceivedSeverities": [ |
| 118 | "CRITICAL", |
| 119 | "MAJOR", |
| 120 | "MINOR", |
| 121 | "WARNING", |
| 122 | "INDETERMINATE", |
| 123 | "CLEARED" |
| 124 | ], |
| 125 | "eventTypes": [ |
| 126 | "EQUIPMENT_ALARM", |
| 127 | "COMMUNICATIONS_ALARM", |
| 128 | "PROCESSING_ERROR_ALARM", |
| 129 | "ENVIRONMENTAL_ALARM", |
| 130 | "QOS_ALARM" |
| 131 | ], |
| 132 | "probableCauses": [ |
| 133 | "The server cannot be connected." |
| 134 | ] |
| 135 | }, |
| 136 | "callbackUri": "http://10.0.0.194:5000/your-callback-endpoint", |
| 137 | "authentication": { |
| 138 | "authType": [ |
| 139 | "BASIC" |
| 140 | ], |
| 141 | "paramsBasic": { |
| 142 | "userName": "nfv_user", |
| 143 | "password": "devstack" |
| 144 | } |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | * Execute below command to create FM subscription. |
| 149 | |
| 150 | .. code-block:: console |
| 151 | |
| 152 | $ openstack vnffm sub create sample_param_file.json --os-tacker-api-version 2 |
| 153 | |
| 154 | * Verify FM subscription by executing following command. |
| 155 | |
| 156 | .. code-block:: console |
| 157 | |
| 158 | $ openstack vnffm sub list --os-tacker-api-version 2 |
| 159 | +--------------------------------------+-----------------------------------------------+ |
| 160 | | ID | Callback Uri | |
| 161 | +--------------------------------------+-----------------------------------------------+ |
| 162 | | 724b6752-b782-48e8-a8bb-a20a0fdb8d9f | http://10.0.0.194:5000/your-callback-endpoint | |
| 163 | +--------------------------------------+-----------------------------------------------+ |
| 164 | |
| 165 | |
| 166 | #. Create alert rules on Monitoring tool |
| 167 | |
| 168 | * Prometheus configuration has two files. |
| 169 | |
| 170 | #. deployment.yaml which contains all the configurations to discover pods |
| 171 | and services running in the Kubernetes cluster dynamically. No need to |
| 172 | change in deployment.yaml |
| 173 | |
| 174 | #. configmap.yaml which contains all the alert rules for sending alerts |
| 175 | to the Alert manager. |
| 176 | |
| 177 | The content of the sample configmap.yaml is as follow: |
| 178 | |
| 179 | .. code-block:: console |
| 180 | |
| 181 | apiVersion: v1 |
| 182 | kind: ConfigMap |
| 183 | metadata: |
| 184 | name: prometheus-config |
| 185 | namespace: monitoring |
| 186 | data: |
| 187 | prometheus.rules: |- |
| 188 | groups: |
| 189 | - name: example |
| 190 | rules: |
| 191 | - alert: KubePodCrashLooping |
| 192 | annotations: |
| 193 | probable_cause: The server cannot be connected. |
| 194 | fault_type: Server Down |
| 195 | fault_details: fault details |
| 196 | expr: | |
| 197 | increase(kube_pod_container_status_restarts_total[10m]) > 0 |
| 198 | for: 1m |
| 199 | labels: |
| 200 | receiver_type: tacker |
| 201 | function_type: vnffm |
| 202 | vnf_instance_id: 8c93a232-92fb-461a-a5b4-60efa2dd5f81 |
| 203 | pod: vdu2-798d577c96-6t42j |
| 204 | perceived_severity: CRITICAL |
| 205 | event_type: EQUIPMENT_ALARM |
| 206 | |
| 207 | * After add/delete/modify alert rule in sample configmap.yaml, perform |
| 208 | following steps to make it effective. |
| 209 | |
| 210 | #. Delete old Prometheus ConfigMap |
| 211 | |
| 212 | .. code-block:: console |
| 213 | |
| 214 | $ kubectl delete -f configmap.yaml |
| 215 | |
| 216 | #. Delete old Prometheus Deployment File |
| 217 | |
| 218 | .. code-block:: console |
| 219 | |
| 220 | $ kubectl delete -f deployment.yaml |
| 221 | |
| 222 | #. Delete Prometheus Service |
| 223 | |
| 224 | .. code-block:: console |
| 225 | |
| 226 | $ kubectl delete -f service.yaml |
| 227 | |
| 228 | #. Create Prometheus ConfigMap with updated ConfigMap |
| 229 | |
| 230 | .. code-block:: console |
| 231 | |
| 232 | $ kubectl apply -f configmap.yaml |
| 233 | |
| 234 | #. Create Prometheus Deployment File |
| 235 | |
| 236 | .. code-block:: console |
| 237 | |
| 238 | $ kubectl apply -f deployment.yaml |
| 239 | |
| 240 | #. Create Prometheus Service |
| 241 | |
| 242 | .. code-block:: console |
| 243 | |
| 244 | $ kubectl apply -f service.yaml |
| 245 | |
| 246 | |
| 247 | Requirements |
| 248 | ------------ |
| 249 | |
| 250 | #. Receiving Notification |
| 251 | |
| 252 | * The NF FM sends a create subscription request to the DMS-ETSI. |
| 253 | |
| 254 | * After sending the create subscription request, DMS-ETSI will send a |
| 255 | GET request to the callback_uri in NF FM to verify its correctness. |
| 256 | NF FM should receive this request and then return HTTP 204 to DMS-ETSI. |
| 257 | |
| 258 | #. Sending Heal Request |
| 259 | |
| 260 | * When a fault occurs in a CNF and matches subscribed alarm condition, |
| 261 | DMS-ETSI will send an Alarm Notification to NF FM. |
| 262 | |
| 263 | * NF FM should receive the notification, get VNF/VNFC information |
| 264 | (vnfInstanceId, vnfcInstanceId) from it, and then send Heal CNF |
| 265 | request to NF-LCM, which further sends heal request to DMS-ETSI. |
| 266 | |
| 267 | |
| 268 | References |
| 269 | ---------- |
| 270 | |
| 271 | .. [1] ETSI NFV-SOL CNF Auto Healing with Prometheus via FM Interfaces [1]_. |
| 272 | https://docs.openstack.org/tacker/zed/user/etsi_cnf_auto_healing_fm.html |
| 273 | |
| 274 | .. [2] ORAN-SC Wiki [2]_. |
| 275 | https://wiki.o-ran-sc.org/download/attachments/35881444/SMO%20Functions%20v4.docx?api=v2 |
| 276 | |
| 277 | .. [3] Tacker API Document for Receiving Notification [3]_. |
| 278 | https://docs.openstack.org/api-ref/nfv-orchestration/v2/vnflcm.html#create-a-new-subscription-v2 |
| 279 | |
| 280 | .. [4] Tacker API Document for Heal Request [4]_. |
| 281 | https://docs.openstack.org/api-ref/nfv-orchestration/v2/vnflcm.html#heal-a-vnf-instance-v2 |