usr.bin.nova-compute apparmor profile is blocking nova-compute operations
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Nova Compute Charm |
Triaged
|
High
|
Unassigned |
Bug Description
Env: focal/yoga CIS hardened env, 'libvirt-
Creating a VM using flavor with --ephemeral not empty fails with:
2022-12-13 13:57:16.435 4064024 DEBUG oslo_concurrenc
52 663ae7365105439
tils.py:473
2022-12-13 13:57:17.617 4064024 ERROR nova.compute.
365105439f8aede
Command: mkfs -t ext4 -F -L ephemeral0 /var/lib/
Exit code: 1
Stdout: ''
Stderr: 'mkfs: failed to execute mkfs.ext4: Permission denied\n'
journalctl clearly shows that the Apparmor is blocking this operation:
Dec 13 13:57:16 satpac54s020020 audit[4067457]: AVC apparmor="DENIED" operation="exec" profile=
Allowing '/usr/sbin/mke2fs' in the '/etc/apparmor.
In addition to that, scanning journalctl for the apparmor DENIED shows more actions denied for the nova-compute profiles:
Dec 12 12:42:43 satpac54s020020 audit[2264780]: AVC apparmor="DENIED" operation="open" profile=
Dec 12 13:08:39 satpac54s020020 audit[2295009]: AVC apparmor="DENIED" operation="exec" profile=
Dec 12 13:08:39 satpac54s020020 audit[2295003]: AVC apparmor="DENIED" operation="mkdir" profile=
So apparently there are other functionalities impacted.
The 'mke2fs' case has been already identified in [1]
Looks like the apparmor nova-compute profile need revision and/or updates.
[1] https:/
[2] https:/
description: | updated |
Changed in charm-nova-compute: | |
status: | New → Triaged |
importance: | Undecided → High |
Hi Marcin, is this bug essentially a duplicate of https:/ /bugs.launchpad .net/charm- nova-compute/ +bug/1960231, or is it subtly different? I wanted to check prior to setting it as a duplicate. It may be that the information in the bug would be a good comment on the potential dup?