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

RSDK-8831 - Add log for failing module restart #4378

Merged
merged 2 commits into from
Sep 23, 2024

Conversation

cheukt
Copy link
Member

@cheukt cheukt commented Sep 20, 2024

log looks like

manager.go:834: 2024-09-20T12:18:41.701-0400        DEBUG   modmanager      modmanager/manager.go:834       Removed resources after failed module restart        {"module":"test-module","resources":["rdk:component:generic/myhelper"]}

could perhaps make the list a little prettier, but this will do for now.

Since we weren't waiting for OnUnexpectedHandler to actually exit, there's a chance that the log assertion we were waiting for to pass but the remove orphaned resources method to not have run yet. Could repro the failure with a sleep right before the mgr.removeOrphanedResources call. So added an extra log and wait for that log instead

@viambot viambot added the safe to test This pull request is marked safe to test from a trusted zone label Sep 20, 2024
Copy link
Member

@benjirewis benjirewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good find; the listed resource names in that log do look a bit gross, but the information gets across. You could build up a []string to log of the Stringified version of orphanedResourceNames, but I do not feel strongly. Thanks for fixing!

@viambot viambot added safe to test This pull request is marked safe to test from a trusted zone and removed safe to test This pull request is marked safe to test from a trusted zone labels Sep 23, 2024
@cheukt cheukt merged commit 2fd93b2 into viamrobotics:main Sep 23, 2024
19 checks passed
@cheukt cheukt deleted the fix-race branch September 23, 2024 18:01
maximpertsov pushed a commit to maximpertsov/rdk that referenced this pull request Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
safe to test This pull request is marked safe to test from a trusted zone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants