diff --git a/05-osm-usage.md b/05-osm-usage.md index 6f463cea2ed91b348638dbf75fe10bb8e5956a9f..3c4f842b3b406ca69b282b3d9041ea356810528a 100644 --- a/05-osm-usage.md +++ b/05-osm-usage.md @@ -1070,6 +1070,76 @@ sudo service haproxy restart Any of the VMs can be accessed through SSH (credential: `ubuntu`/`osm2021`) to further monitor (with `htop`, for example), and there is an HAProxy UI at port `http://[HAProxy_IP]:32700` (credential: `osm`/`osm2018`) +### Autohealing + +#### Reference diagram + +The following diagram summarizes the feature: + +![Diagram explaining auto-healing support](assets/800px-Osm_healing.png) + +- Healing descriptors can be included and be tied to automatic reaction to VM metric thresholds. +- An internal alarm manager has been added to MON through the 'mon-evaluator' module, so VM metrics can trigger threshold-violation alarms when VM is in `ERROR/DELETE` state and perform healing actions. + +#### Healing Descriptor + +The healing descriptor is part of a VNFD. Like the example below shows, it mainly specifies: + +- The VDU to be healed (`healing-policy:vdu-id`) +- The healing recovery option (`action-on-recovery`) +- The minimum time it should pass between healing operations (`cooldown-time`) +- To run day1 primitives for VDU (`day1`) + +```yaml +healing-aspect: +- id: autoheal_vnfd-VM_autoheal + healing-policy: + - vdu-id: autoheal_vnfd-VM + event-name: heal-alarm + recovery-type: automatic + action-on-recovery: REDEPLOY_ONLY + cooldown-time: 180 + day1: false +``` + +#### Example + +Get the descriptors: + +```bash +git clone https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git +``` + +Onboard them: + +```bash +cd osm-packages +osm vnfpkg-create autoheal_vnf +osm nspkg-create autoheal_ns +``` + +Launch the NS: + +```bash +osm ns-create --ns_name heal --nsd_name autoheal_nsd --vim_account | +osm ns-list +osm ns-show heal +``` + +#### Testing: + +1. To ensure NS is instantiated successfully, check metrics at Prometheus, visit `http://[OSM_IP]:9091` and look for `osm_vm_status`. Metric value should be '1'. +2. Run the following openstack commands to induce and error or delete a VM: + +```bash +# To test healing in error state, induce error state in vm +openstack server set --state error +# To test healing in deleted state, delete the vm +openstack server delete +``` +3. Check metrics at Prometheus, visit `http://[OSM_IP]:9091` and look for `osm_vm_status`. Metric value should be '0'. +4. Heal operation will be triggered at POL and VM respawn will happen. + ## Using Network Slices In order to illustrate better how network slicing works in OSM, it will be discussed in the context of a running example. diff --git a/assets/800px-Osm_healing.png b/assets/800px-Osm_healing.png new file mode 100644 index 0000000000000000000000000000000000000000..20da9b702b3e9a5313eb5c8830a09996482ca432 Binary files /dev/null and b/assets/800px-Osm_healing.png differ