-
Notifications
You must be signed in to change notification settings - Fork 360
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
Scripts stuck in "Upcoming" #17695
Comments
@georgekarrv, assign to MDM team? |
@sharon-fdm sorry if I assigned to the wrong team! |
Relate to #17180 |
From customer-preston: (per request by for a use case for script purging) |
EDIT: The customer added multiple applications to the following script and found that at around 6 or 7 apps that take awhile to download, the scripts get stuck in "Pending":
|
Hey @valentinpezon-primo! When you get the chance, can you please share the exact script y'all ran? (the one that includes the 6 or 7 apps) This way, we can try to reproduce on our end and get a fix in. |
Hi @noahtalerman , sure i can but Its not script related since it's not the same script that get blocked everytime, I will copy paste the scripts that get blocked so you have them anyway 👍 Also, i saw this small note on the fleet ui "Script is running or will run when the host comes online." Here are the scripts : Script to re-enroll win device when enrollment fails :
Script to install app (on a macos):
Script that install multiple apps on windows :
|
@valentinpezon-primo thanks!
Got it.
Hmm, that's an interesting thought. For the hosts with scripts stuck in "Upcoming," are these hosts offline? |
cc @georgekarrv ^^ |
No they come back online, at least the UI says they are online, my idea was that maybe the front "knows" but the script queue doesnt.. But I don't want to interfer with your debugging, It's just some random idea |
Hey @noahtalerman, I think there may be 2 issues that are getting mixed up in one? There has been a lot of focus on scripts timing out. But we are seeing the issue on a fresh device, just enrolled, online — no failed scripts so far, scripts are just not running: As a reminder, we rely on scripts to install applications. |
Thanks @martinpannier!
This issue covers the "scripts are not just running" bit. I updated the issue description to clarify this. Does that capture the issue y'all are seeing? FYI @dantecatalfamo |
I'm looking into this, but haven't been able to recreate it yet |
@noahtalerman Yes, perfect thanks! We would also love to have some mitigation steps if you guys have any idea (up to & including the dreaded "have you tried restarting your computer?") |
Hey @martinpannier! I think this is the plan for Tues (4/2) call.
Currently, running these cleanup queries in the Fleet DB is one known workaround: Delete pending scripts for a single host matching DELETE FROM host_script_results WHERE host_id = X AND exit_code IS NULL Delete pending scripts for all hosts: DELETE FROM host_script_results WHERE exit_code IS NULL Obviously, this is a workaround that neither the IT admin nor the end user can take. Taking this back to the Fleet team for ideas on workarounds for IT admin / end user. |
#17695 The windows exit code is a 32-bit unsigned integer, but the command interpreter treats it like a signed integer. When a process is killed, it returns 0xFFFFFFFF (interpreted as -1). We convert the integer to an signed 32-bit integer to flip it to a -1 to match our expectations, and fit in our db column. https://en.wikipedia.org/wiki/Exit_status#Windows FIxed on both the client and server side.
#17695 The windows exit code is a 32-bit unsigned integer, but the command interpreter treats it like a signed integer. When a process is killed, it returns 0xFFFFFFFF (interpreted as -1). We convert the integer to an signed 32-bit integer to flip it to a -1 to match our expectations, and fit in our db column. https://en.wikipedia.org/wiki/Exit_status#Windows FIxed on both the client and server side.
No scripts stuck, stalled, |
Fleet version:
Reported in Fleet Fleet 4.47.0 Go go1.21.7
osquery 5.11.0
Fleetd 1.22.0
Web browser and operating system:
Current version
💥 Actual behavior
After running scripts on an endpoint, the script is stuck in "Upcoming."
This doesn't let other scripts behind it run.
The expected behavior is that scripts, that take over 5 minutes to run, timeout and are moved to "Past." Then, scripts behind this one run.
🧑💻 Steps to reproduce
--enable-scripts
The text was updated successfully, but these errors were encountered: