feat(LCM): Decoupling LCM and Prometheus
Prometheus sidecar pod managing configuration file instead of LCM
Proposers
- Fabián Bravo (Whitestack)
Type
- Feature
- Bugfix
Target MDF/TF
LCM, Prometheus
Description
OSM release 8 introduced a way to get SNMP metrics from VNFs and along with it LCM took responsability to manage prometheus configuration adding or deleting "Jobs" from it. This is important because the SNMP feature uses an "exporter" provided by the Prometheus team to connect the VNF and this TSDB between each other, and OSM needs to change the configuration to make this connection happen.
The problem arises when two or more instances of LCM are invoked, with some race conditions been seen under stress conditions and because this feature needs to share the same volume where the configuration is store between Prometheus and LCM, something problematic in a clustered environment.
The proposed solution is to move away the responsability of handling this configuration file from LCM, and leave it to a small "sidecar pod" living next to Prometheus pod which its only mission is to check the database for new jobs and update the file accordingly.
Demo of definition of done
- OSM can deploy a VNF with the SNMP feature
- LCM pushes a new job to the database
- Prometheus is aware of the new job and updates its configuration file
- No race conditions are found if multiple VNF are spawned