[Pmon] dynamically load pmon daemons #2654
Merged
+44
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
- What I did
Make the pmon container daemons(ledd, xcvrd, psud) can be selectively loaded according to the platform configuration.
Add a pmon daemon control configuration file to all Mellanox platform to skip load ledd on all of them.
design doc in this link: https://github.com/Azure/SONiC/blob/master/doc/pmon/pmon-enhancement-design.md#4-pmon-daemons-dynamically-loading
- How I did it
Change the pmon container starting entry from "start.sh" to "docker_init.sh", in this new script will generate "supervisord.conf" and "start.sh" according to the platform configuration file, if this configuration file not exist, it will generate a config and start.sh for starting all the daemons.
Add jinja templates for supervisord.conf and start.sh generation.
Add pmon daemon control configuration file to Mellaox platform to skip ledd and also as an example.
- How to verify it
compile a pmon docker image and test it with a configuration file, to check whether the started daemons inside pmon is as expected.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)