GoogleCloudPlatform / GoogleCloudPlatform/osconfig
What is the execution timeout for OS Policy ExecResource validate/enforce scripts?
- Dominant language
- Go
- Stars
- 99
- Forks
- 113
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 5
Description
## Context
We are evaluating the use of OS Policy assignments with `ExecResource` for scripts that may involve network calls or long-running operations. We want to understand the agent's behavior around script execution time limits to ensure our scripts complete reliably.
We'd like to understand:
1. **Is there a default timeout** that the OS Config agent enforces on `validate` or `enforce` script execution? (e.g., 5 minutes, 30 minutes, no limit?)
2. **Is this timeout configurable** via the OS Policy assignment spec or agent configuration?
3. **What happens when a script exceeds the timeout** — is the process killed, and what exit code/compliance status is reported?
## What I've Checked
- The [ExecResource API reference](https://cloud.google.com/compute/docs/osconfig/rest/Shared.Types/OSPolicy#ExecResource) does not show a `timeout` field
- The [OS Policy documentation](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies) mentions rollout wait times but not per-script execution timeouts
- I could not find any agent-level configuration for script timeouts in the documentation
## Environment
- OS Config agent (latest)
- Linux (Debian/Ubuntu) and Windows VMs
- ExecResource with inline scripts (`interpreter: SHELL` / `interpreter: POWERSHELL`)
Contributor guide
Research direction
Start with the linked ExecResource API reference and OS Policy documentation, then trace the OS Config agent's ExecResource handling for SHELL and POWERSHELL on Linux and Windows. Confirm whether a timeout is defined or configurable, and document process termination, exit-code, and compliance behavior for scripts that exceed it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, powershell, shell
- Domain
- cloud, documentation, infrastructure
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100