Replace use of chpst for Ubuntu Resolute Raccoon (26.04) - #346
Merged
jorbaum merged 1 commit intoSep 18, 2026
Merged
Conversation
Ubuntu 26.04 removes the `runit` package, eliminating `chpst`. Introduce `privdrop_utils.sh` with `run_as_vcap` backed by `setpriv` in `system-metrics-agent` and use it in `ctl.erb`. As per https://github.com/cloudfoundry/community/blob/main/toc/rfc/rfc-0058-resolute-raccoon-os.md#stemcell-change-removal-of-runit
jorbaum
approved these changes
Sep 18, 2026
jorbaum
left a comment
Contributor
There was a problem hiding this comment.
Looks solid and simple. Good idea to sync this with capi-release.
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.
Description
Replace use of
chpstwithsetprivfor Ubuntu Resolute Raccoon (26.04) stemcell compatibility.Background
Ubuntu 26.04 ("Resolute Raccoon") removes the
runitpackage from base stemcells as outlined in RFC-0058. Consequently, thechpstutility is no longer available, causing jobs invokingchpston their startup path to fail.Following the pattern implemented across Cloud Foundry releases (e.g., cloudfoundry/capi-release@ae70cef):
src/scripts/privdrop_utils.shdefiningrun_as_vcapbacked bysetpriv --reuid=vcap --regid=vcap --clear-groups --no-new-privs -- "$@".src/scripts/privdrop_utils_test.bats.packages/system-metrics-agent(specandpackaging) to include and installprivdrop_utils.shto${BOSH_INSTALL_TARGET}/scripts/.jobs/loggr-system-metrics-agent/templates/ctl.erbto sourceprivdrop_utils.shfrom the package directory and launchsystem-metrics-agentwithrun_as_vcap.spec/jobs/loggr_system_metrics_agent_spec.rbto assert thatctl.erbsourcesprivdrop_utils.sh, callsrun_as_vcap, and no longer referenceschpst.Type of change
Testing performed?
Ran BOSH template RSpec suite (
bundle exec rspec), confirming all 16 template tests pass with 0 failures:bin/ctlsources/var/vcap/packages/system-metrics-agent/scripts/privdrop_utils.sh.bin/ctllaunchessystem-metrics-agentviarun_as_vcap.bin/ctlcontains no occurrences ofchpst.Checklist:
mainbranch, or relevant version branchIf you have any questions, or want to get attention for a PR or issue please reach out on the #logging-and-metrics channel in the cloudfoundry slack