Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rsyslog permission error in github ubuntu tests from apparmor #15717

Open
wants to merge 5 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/actions/run_awx_devel/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ outputs:
runs:
using: composite
steps:
- name: Disable apparmor for rsyslogd, first step
shell: bash
run: sudo ln -s /etc/apparmor.d/usr.sbin.rsyslogd /etc/apparmor.d/disable/

- name: Disable apparmor for rsyslogd, second step
shell: bash
run: sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.rsyslogd

- name: Build awx_devel image for running checks
uses: ./.github/actions/awx_devel_image
with:
Expand Down
10 changes: 10 additions & 0 deletions awx/main/tests/live/tests/test_devel_image.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import os

RSYSLOG_CONFIG = '/var/lib/awx/rsyslog/rsyslog.conf'


def test_rsyslog_config_readable():
with open(RSYSLOG_CONFIG, 'r') as f:
content = f.read()
assert '/var/lib/awx/rsyslog' in content
assert oct(os.stat(RSYSLOG_CONFIG).st_mode) == '0o100640'
Loading