Skip to content

Commit 352f6fc

Browse files
committed
Disable mysqld apparmor profiles
Prior to this commit on certian OSes the mysqld apparmor profile present on the github runner would prevent the mysql service from properly starting inside our litmusimage container. The follow OSes were impacted for both puppet 6 & 7 runs: * debian 9 * debian 10 * ubuntu 20.04 This commit adds a new step to the `pr_test` and `nightly` workflows that disables the mysqld apparmor profile if the current provisioner is `provision::docker`. While this fixes the issue, it does make me wonder if this is the right approach.
1 parent a21ab76 commit 352f6fc

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/nightly.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ jobs:
123123
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
124124
echo STEP_START=$(date +%s) >> $GITHUB_ENV
125125
126+
- name: "Disable mysqld apparmor profile"
127+
if: matrix.platforms.provider == 'provision::docker'
128+
run: |
129+
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
130+
sudo apparmor_parser -R /etc/apparmor.d/disable/usr.sbin.mysqld
131+
126132
- name: Provision test environment
127133
run: |
128134
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'

.github/workflows/pr_test.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ jobs:
124124
buildevents step $TRACE_ID $STEP_ID $STEP_START 'Setup Environment'
125125
echo STEP_ID=${{ matrix.platforms.image }}-${{ matrix.collection }}-2 >> $GITHUB_ENV
126126
echo STEP_START=$(date +%s) >> $GITHUB_ENV
127+
128+
- name: "Disable mysqld apparmor profile"
129+
if: matrix.platforms.provider == 'provision::docker'
130+
run: |
131+
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
132+
sudo apparmor_parser -R /etc/apparmor.d/disable/usr.sbin.mysqld
133+
127134
- name: Provision test environment
128135
run: |
129136
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:provision ${{ matrix.platforms.image }}' -- bundle exec rake 'litmus:provision[${{matrix.platforms.provider}},${{ matrix.platforms.image }}]'
@@ -149,7 +156,7 @@ jobs:
149156
- name: Install module
150157
run: |
151158
buildevents cmd $TRACE_ID $STEP_ID 'rake litmus:install_module' -- bundle exec rake 'litmus:install_module'
152-
159+
153160
- name: "Honeycomb: Record deployment times"
154161
if: ${{ always() }}
155162
run: |

0 commit comments

Comments
 (0)