-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Pmon] Selectively load pmon container daemons #2625
Closed
Closed
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d705a3c
dynamically load pmon daemons
keboliu d970d97
remove redundant blank line
keboliu 4b7356e
fix internal review comments
keboliu 8711b33
fix conflicts
keboliu e6e4bf0
change the skip daemon variable value from int to boolean
keboliu 7381904
resolve conflicts
keboliu d529ba1
resolve conflict
keboliu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
device/mellanox/x86_64-mlnx_lssn2700-r0/pmon_daemon_control.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../x86_64-mlnx_msn2700-r0/pmon_daemon_control.json |
1 change: 1 addition & 0 deletions
1
device/mellanox/x86_64-mlnx_msn2010-r0/pmon_daemon_control.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../x86_64-mlnx_msn2700-r0/pmon_daemon_control.json |
1 change: 1 addition & 0 deletions
1
device/mellanox/x86_64-mlnx_msn2100-r0/pmon_daemon_control.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../x86_64-mlnx_msn2700-r0/pmon_daemon_control.json |
1 change: 1 addition & 0 deletions
1
device/mellanox/x86_64-mlnx_msn2410-r0/pmon_daemon_control.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../x86_64-mlnx_msn2700-r0/pmon_daemon_control.json |
6 changes: 6 additions & 0 deletions
6
device/mellanox/x86_64-mlnx_msn2700-r0/pmon_daemon_control.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"skip_ledd": 1, | ||
"skip_xcvrd": 0, | ||
"skip_psud": 0 | ||
} | ||
|
1 change: 1 addition & 0 deletions
1
device/mellanox/x86_64-mlnx_msn2740-r0/pmon_daemon_control.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../x86_64-mlnx_msn2700-r0/pmon_daemon_control.json |
1 change: 1 addition & 0 deletions
1
device/mellanox/x86_64-mlnx_msn3700-r0/pmon_daemon_control.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../x86_64-mlnx_msn2700-r0/pmon_daemon_control.json |
1 change: 1 addition & 0 deletions
1
device/mellanox/x86_64-mlnx_msn3700c-r0/pmon_daemon_control.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../x86_64-mlnx_msn2700-r0/pmon_daemon_control.json |
1 change: 1 addition & 0 deletions
1
device/mellanox/x86_64-mlnx_x86-r5.0.1400/pmon_daemon_control.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../x86_64-mlnx_msn2700-r0/pmon_daemon_control.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Generate supervisord config file and the start.sh scripts | ||
mkdir -p /etc/supervisor/conf.d/ | ||
|
||
if [ -e /usr/share/sonic/platform/pmon_daemon_control.json ]; then | ||
sonic-cfggen -j /usr/share/sonic/platform/pmon_daemon_control.json -t /usr/share/sonic/templates/docker-pmon.supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf | ||
sonic-cfggen -j /usr/share/sonic/platform/pmon_daemon_control.json -t /usr/share/sonic/templates/start.sh.j2 > /usr/bin/start.sh | ||
chmod +x /usr/bin/start.sh | ||
else | ||
sonic-cfggen -t /usr/share/sonic/templates/docker-pmon.supervisord.conf.j2 > /etc/supervisor/conf.d/supervisord.conf | ||
sonic-cfggen -t /usr/share/sonic/templates/start.sh.j2 > /usr/bin/start.sh | ||
chmod +x /usr/bin/start.sh | ||
fi | ||
|
||
exec /usr/bin/supervisord |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debating whether these values should be
True
instead of1
to be more Pythonic. The condition could also be changed toif skip_ledd
which should evaluate toFalse
if the variable is not defined, or if it is defined and set to 'False'. Thoughts?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jleveque I change the values from int to boolean.
the current implementation(already supported in the previous commit) is like this:
I also removed the "xxx_skip = fase" setting from the Mellanox platform configuration to avoid missleading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jleveque due to some tricky conflicts that I am not able to resolve, I choose to close this PR and opened a new one: #2654 please switch to the new one, sorry for the inconvenience.