Fix app armour in docker, make acceptance tests pass on Resolute - #254
Merged
Conversation
BPM is required on Resolute Raccoon stemcells, but use_bpm defaults to false so that syslog can still be deployed as an add-on on older stemcells. Pick the mode from the stemcell rather than hardcoding it, so both paths keep getting exercised. scripts/test derives USE_BPM from STEMCELL_OS when it isn't already set; an explicit USE_BPM always wins. The test helpers read that env var and add manifests/ops/use-bpm.yml to every deploy when it's true. Every deploy now builds its arguments through DeployArgs or DeployWithVarsStoreArgs, so no call site can silently skip the ops file. The ops file writes use_bpm to the syslog_forwarder job. BOSH ignores instance-group properties for any job that declares its own, so the eight manifests that kept their properties at the instance-group level would have had every syslog.* property dropped. Move them onto the syslog_forwarder job, matching what the tls-forwarding, relp-tls, and blackbox-unpriv manifests already did. The forwarder group only runs bpm and syslog_forwarder, and bpm consumes no syslog.* properties, so this is a re-indent with no change in behavior.
the pre-start scripts were trying to run in docker containers that did not have app armor's /sys/kernel/security/apparmor mounted but still had the command available. This caused them to fail in docker. Now we attempt to mount /sys/kernel/security/apparmor if it is not there, which makes rsyslog work under the docker CPI.
jorbaum
approved these changes
Aug 17, 2026
jorbaum
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Seems to fix the bug correctly AFAICS and makes the code nicer to read.
| release: bpm | ||
| - name: syslog_forwarder | ||
| release: syslog | ||
| properties: |
Contributor
There was a problem hiding this comment.
Indenting this here confused me at my first look, but makes the tests actually cleaner. AFAIU the bpm job does not need any of these properties.
| session := BoshCmd("deploy", "manifests/broken-rules.yml", | ||
| "-v", fmt.Sprintf("deployment=%s", DeploymentName()), | ||
| "-v", fmt.Sprintf("stemcell-os=%s", StemcellOS())) | ||
| session := BoshCmd(DeployArgs("manifests/broken-rules.yml")...) |
Contributor
There was a problem hiding this comment.
Makes it nicer to read. Thanks!
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
The BOSH Release Acceptance Tests recently bumped from an ancient syslog release to 12.3.27 to get the new BPM support for Resolute. This pulled in the App Armor changes introduced in #188. This was causing syslog to fail in our Docker CPI pipelines since apparmor was installed but /sys/kernel/security/apparmor was not mounted.
I've verified this change makes rsyslog actually work under the docker CPI, not just fail silently.
Along the way I also made the acceptance tests pass on Resolute, which required some changes to allow applying the bpm ops file on Resolute. I validated the tests pass on both Noble and Resolute on AWS.
Type of change
Testing performed?
Checklist:
mainbranch, or relevant version branch