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

sleep is not a built-in Windows command. This depends on Win2K3 resource kit. Suggest timeout be used instead. #14087

Open
afilla opened this issue Nov 21, 2023 · 3 comments

Comments

@afilla
Copy link

afilla commented Nov 21, 2023

@schtasks /create /f /sc once /st 00:00:00 /tn chefclientbootstraptask /ru SYSTEM /rl HIGHEST /tr \"cmd /c #{command} & sleep 2 & waitfor /s %computername% /si chefclientinstalldone\"

@afilla
Copy link
Author

afilla commented Nov 21, 2023

Suggest: @SCHTASKS /create /f /sc once /st 00:00:00 /tn chefclientbootstraptask /ru SYSTEM /rl HIGHEST /tr "cmd /c #{command} & timeout 2 & waitfor /s %computername% /si chefclientinstalldone"

@tpowell-progress
Copy link
Contributor

@afilla Are you observing current breakage or just providing a suggestion of better practices? FWIW, I believe the sleep that is getting triggered might actually be from MSYS install with the ruby installer (git also includes a sleep of similar origin)

@afilla
Copy link
Author

afilla commented Nov 21, 2023

@tpowell-progress you are probably right. However, we are observing that when the Chef-Client is installed via the Windows Scheduled Task in the fallback function we are witnessing unpredictable behavior where we have two ruby processes running instead of a single ruby process. The first process locks the other up, preventing bootstrap.

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

No branches or pull requests

2 participants