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

Raise exception when getting timeout for running cmd to detect OS #3477

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

lubaihua33
Copy link
Collaborator

For some images, like sciencelogicinc1622565452194, middleware publisher's images, running some basic commands will be time out. This is due to the image not allow to run commands or in bad state.

In _get_detect_string, there are more than 10 commands to detect the OS. If every command gets time out (10 min), the case might last longer than 1 hour.

The case should be go to the end immediately if the system can't run any commands.

In this PR, add timeout=30 for every command in _get_detect_string, and raise an exception when gets timeout to avoid more timeout commands.

@lubaihua33 lubaihua33 force-pushed the baihua/fix_timeout branch 2 times, most recently from c3982f9 to 7905b6b Compare October 21, 2024 06:51
@squirrelsc
Copy link
Member

@LiliDeng LGTM

@LiliDeng LiliDeng merged commit 71701aa into main Oct 23, 2024
45 checks passed
@LiliDeng LiliDeng deleted the baihua/fix_timeout branch October 23, 2024 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants