-
Notifications
You must be signed in to change notification settings - Fork 63
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
Fix hostcfgd crash when delete entire config table. #106
Fix hostcfgd crash when delete entire config table. #106
Conversation
Could you paste the crash stack? Could you check the coverage? #Closed |
scripts/hostcfgd
Outdated
main() | ||
try: | ||
main() | ||
except Exception as e: |
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.
This bugfix is not related to your main topic, we can move it to another PR. And this is not the ideal way to fix a generic issue relating systemd handle simple service return code.
Not sure if this help https://unix.stackexchange.com/a/734184 #Closed
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.
Fixed, change reverted
@alexrallen @dgsudharsan Please help review this PR? wondering why this is not identified by original testcases? #Closed |
Here is the crash stack in syslog: Mar 13 06:40:24.354944 vlab-01 INFO hostcfgd[17776]: Traceback (most recent call last): |
**What I did** Fix hostcfgd crash when delete entire config table. **Why I did it** hostcfgd subscribe table change in register_callbacks() method. When a config table been deleted, the 'data' parameter of callback method will be 'None', however most callback doesn't handle the 'None' case, they only handle empty dictionary case. when this happen hostcfgd will crash. **How I verified it** Pass all UT. Add new UT for code coverage.
Cherry-pick PR to 202311: #129 |
**What I did** Fix hostcfgd crash when delete entire config table. **Why I did it** hostcfgd subscribe table change in register_callbacks() method. When a config table been deleted, the 'data' parameter of callback method will be 'None', however most callback doesn't handle the 'None' case, they only handle empty dictionary case. when this happen hostcfgd will crash. **How I verified it** Pass all UT. Add new UT for code coverage.
What I did
Fix hostcfgd crash when delete entire config table.
Why I did it
hostcfgd subscribe table change in register_callbacks() method. When a config table been deleted, the 'data' parameter of callback method will be 'None', however most callback doesn't handle the 'None' case, they only handle empty dictionary case. when this happen hostcfgd will crash.
How I verified it
Pass all UT.
Add new UT for code coverage.
Work item tracking
Details if related