fix(dd-agent): move bpm chmod +x from pre-start to post-start#241
Merged
Conversation
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>
This comment has been minimized.
This comment has been minimized.
dkirov-dd
approved these changes
Jun 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Moves the
chmod +xon/var/vcap/sys/run/bpmdirectories frompre-start(viaensure_directories.sh) to a new BOSHpost-starthook.Motivation
pre-startruns before BPM jobs start, so the per-job subdirectories under/var/vcap/sys/run/bpmdon'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 inpost-startguarantees 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.