Skip to content
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] Fix chassis_db_init exit not being expected #9858

Merged
merged 2 commits into from
Feb 15, 2022

Conversation

alexrallen
Copy link
Contributor

@alexrallen alexrallen commented Jan 26, 2022

Why I did it

Error log was shown on switches during boot

 Dec 22 04:27:16.710999 r-bulldog-03 INFO pmon#supervisord 2021-12-22 04:27:16,709 INFO exited: chassis_db_init (exit status 0; not expected)

How I did it

Add exit code zero as an expected exit code and also disable autorestart.

How to verify it

Boot the switch and ensure the above log line does not appear.

Which release branch to backport (provide reason below if selected)

None. Not a functional bug.

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111

Description for the changelog

[pmon] Fix chassis_db_init exit not being expected

A picture of a cute animal (not mandatory but encouraged)

shutterstock_1189520911

@alexrallen alexrallen requested a review from lguohan as a code owner January 26, 2022 17:15
@dgsudharsan dgsudharsan added Request for 202106 Branch Request for 202111 Branch For PRs being requested for 202111 branch labels Jan 27, 2022
@sujinmkang
Copy link
Collaborator

@alexrallen which platform do you see this error log message and auto restart?
If the platform doesn't need the chassis_db_init then why don't you add skip_chassis_db_init=True to pmon_daemon_control.json?

@alexrallen
Copy link
Contributor Author

All platforms that I tested on show this (three separate mellanox platforms).

@sujinmkang
Copy link
Collaborator

@alexrallen Can you add " and IS_MODULAR_CHASSIS == 1" for chassis_db_init similar to chassisd instead of changing the exit code? chassisd and chassis_db_init are for modular chassis. So it shouldn
t start for non-modular chassis.

@alexrallen
Copy link
Contributor Author

@sujinmkang I am the original author of chassis_db_init.

This module is intended to populate redis with metadata about the chassis such as model number, serial number, and hardware revision. This information is pulled from the Platform API chassis object. As such, this is able to run on all platforms.

@sujinmkang
Copy link
Collaborator

@alexrallen The default exit code is 0 so we don't need to set the exit code. But my question is why it crashes with "not expected". Is there anything we can improve the exit / event handling for chassis_db_init?

@alexrallen
Copy link
Contributor Author

The program is correctly exiting with code 0 according to the log. Do you know why else it would say "unexpected"? The program is not crashing it is working fine.

@liat-grozovik liat-grozovik requested review from prgeor and removed request for lguohan February 13, 2022 15:14
@liat-grozovik liat-grozovik merged commit 9677401 into sonic-net:master Feb 15, 2022
judyjoseph pushed a commit that referenced this pull request Feb 22, 2022
- Why I did it
Error log was shown on switches during boot
pmon#supervisord 2021-12-22 04:27:16,709 INFO exited: chassis_db_init (exit status 0; not expected)

- How I did it
Add exit code zero as an expected exit code and also disable autorestart.

- How to verify it
Boot the switch and ensure the above log line does not appear.
arlakshm pushed a commit that referenced this pull request Mar 1, 2022
- Why I did it
Error log was shown on switches during boot
pmon#supervisord 2021-12-22 04:27:16,709 INFO exited: chassis_db_init (exit status 0; not expected)

- How I did it
Add exit code zero as an expected exit code and also disable autorestart.

- How to verify it
Boot the switch and ensure the above log line does not appear.
sujinmkang pushed a commit that referenced this pull request Mar 4, 2022
…10071)

Why I did it
Code review was still in progress when #9858 was merged and upon further testing I have arrived at a better solution.

How I did it
Modified supervisord configuration j2 template for pmon to require no minimum uptime for chassisd_db_init and to remove the redundant exit_codes directive

How to verify it
Boot switch and verify in syslog that there are no errors related to chassis_db_init
judyjoseph pushed a commit that referenced this pull request Mar 7, 2022
…10071)

Why I did it
Code review was still in progress when #9858 was merged and upon further testing I have arrived at a better solution.

How I did it
Modified supervisord configuration j2 template for pmon to require no minimum uptime for chassisd_db_init and to remove the redundant exit_codes directive

How to verify it
Boot switch and verify in syslog that there are no errors related to chassis_db_init
arlakshm pushed a commit that referenced this pull request Mar 24, 2022
…10071)

Why I did it
Code review was still in progress when #9858 was merged and upon further testing I have arrived at a better solution.

How I did it
Modified supervisord configuration j2 template for pmon to require no minimum uptime for chassisd_db_init and to remove the redundant exit_codes directive

How to verify it
Boot switch and verify in syslog that there are no errors related to chassis_db_init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants