Skip to content

fix(dd-agent): move bpm chmod +x from pre-start to post-start#241

Merged
NouemanKHAL merged 2 commits into
masterfrom
noueman/bpm-chmod-post-start
Jun 5, 2026
Merged

fix(dd-agent): move bpm chmod +x from pre-start to post-start#241
NouemanKHAL merged 2 commits into
masterfrom
noueman/bpm-chmod-post-start

Conversation

@NouemanKHAL

Copy link
Copy Markdown
Member

What does this PR do?

Moves the chmod +x on /var/vcap/sys/run/bpm directories from pre-start (via ensure_directories.sh) to a new BOSH post-start hook.

Motivation

pre-start runs before BPM jobs start, so the per-job subdirectories under /var/vcap/sys/run/bpm don't exist yet. This means newly added BPM jobs (process_agent, trace_agent, system_probe, etc.) won't have the execute bit set on first boot, breaking the agent's ability to read pidfiles. Running it in post-start guarantees all BPM job directories are present and covers any future BPM job added to this release without further changes.

Verification

Deploy the release with BPM enabled and confirm the agent can read pidfiles from all BPM-managed processes on first boot.

Run the chmod +x on /var/vcap/sys/run/bpm directories as a BOSH
post-start hook so it executes after BPM has created the per-job run
directories. Previously this ran during pre-start, before any BPM job
had started, so newly added BPM jobs were not covered on first boot.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@NouemanKHAL NouemanKHAL requested a review from a team as a code owner June 4, 2026 16:36
@datadog-prod-us1-5

This comment has been minimized.

@NouemanKHAL NouemanKHAL merged commit e519717 into master Jun 5, 2026
4 checks passed
@NouemanKHAL NouemanKHAL deleted the noueman/bpm-chmod-post-start branch June 5, 2026 10:19
@NouemanKHAL NouemanKHAL added the changelog/Fixed Fixed features results into a bug fix version bump label Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/Fixed Fixed features results into a bug fix version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants