Skip to content

Commit 46044e2

Browse files
igorribeiroduarteVladislav Zolotarov
authored andcommitted
molecule/debian11: Mount sys/kernel/security as read only
The scylla-monitor container, during the docker installation/configuration was running apparmor_parser, which, as a result, was replacing the host's `docker-default` AppArmor profile. As a consequence of that, some subsequent socket creation attempts coming from the scylla-monitor container itself and from other containers on the host were being blocked by the kernel, with the following messages: ``` type=1400 audit(1778707767.526:165): apparmor="DENIED" operation="create" class="net" profile="docker-default" pid=509120 comm="alertmanager" family="netlink" sock_type="raw" protocol=0 requested="create" denied="create" ``` ``` type=1400 audit(1778707703.706:137): apparmor="DENIED" operation="create" class="net" profile="docker-default" pid=504003 comm="dnf" family="inet6" sock_type="dgram" protocol=0 requested="create" denied="create" ``` By mounting `/sys/kernel/security` as read only, we prevent the scylla-monitor's docker installation from touching the host's docker-default AppArmor profile. This behavior, so far, has been observed only on debian11, thus this change is being applied only for the debian11 molecule.
1 parent 397385f commit 46044e2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

molecule/debian11/molecule.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ platforms:
5555
cgroupns_mode: host
5656
volumes:
5757
- /sys/fs/cgroup:/sys/fs/cgroup
58+
- /sys/kernel/security:/sys/kernel/security:ro # Prevent container from modifying host AppArmor profile
5859
- /var/lib/docker # https://github.com/docker/for-linux/issues/1138
5960
groups:
6061
- scylla-monitor

0 commit comments

Comments
 (0)