I added a check to ensure that the media settings JSON is not loaded when the host CMIS management feature is disabled. This prevents unnecessary port-side configurations and potential errors when the feature is not in use.
Motivation and Context
Currently, the xcvrd code always posts the SI parameters from media_settings.json to APP_DB. On Mellanox platforms, this process is required only if the Host CMIS Management feature is enabled. If the feature is disabled when media_settings.json is present on the platform and notify_media_settings() is triggered, it can cause containers to crash or links to flap. This is why I added a check to ensure that on Mellanox platforms, media_settings.json is not loaded if the Host CMIS Management feature is disabled.
How Has This Been Tested?
Manual tests to ensure that containers do not crash when the feature is disabled and media_settings.json exists on the platform.
Description
I added a check to ensure that the media settings JSON is not loaded when the host CMIS management feature is disabled. This prevents unnecessary port-side configurations and potential errors when the feature is not in use.
Motivation and Context
Currently, the xcvrd code always posts the SI parameters from media_settings.json to APP_DB. On Mellanox platforms, this process is required only if the Host CMIS Management feature is enabled. If the feature is disabled when media_settings.json is present on the platform and notify_media_settings() is triggered, it can cause containers to crash or links to flap. This is why I added a check to ensure that on Mellanox platforms, media_settings.json is not loaded if the Host CMIS Management feature is disabled.
How Has This Been Tested?
Manual tests to ensure that containers do not crash when the feature is disabled and media_settings.json exists on the platform.
Additional Information (Optional)