Cannot create Octavia Amphora instance, AppArmor denied mkfs, ldconfig, collect2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Nova Compute Charm |
New
|
Undecided
|
Unassigned |
Bug Description
Fresh OpenStack Ussuri on Ubuntu Focal deployment.
nova-compute version 21.1.0, charm revision 323.
Creating a Load Balancer fails with ERROR. /var/log/syslog on the compute node shows DENIED entries:
```
Feb 4 08:04:24 comp-002 kernel: [ 3783.092969] audit: type=1400 audit(161242586
Feb 4 08:04:24 comp-002 kernel: [ 3783.092977] audit: type=1400 audit(161242586
Feb 4 08:04:24 comp-002 kernel: [ 3783.252979] audit: type=1400 audit(161242586
Feb 4 08:04:24 comp-002 kernel: [ 3783.257532] audit: type=1400 audit(161242586
Feb 4 08:04:24 comp-002 kernel: [ 3783.423984] audit: type=1400 audit(161242586
Feb 4 08:04:24 comp-002 kernel: [ 3783.428376] audit: type=1400 audit(161242586
```
It looks like AppArmor did not take into account /etc/apparmor.
AppArmor on the compute node is active since Thu 2021-02-04 07:02:12 UTC:
```
ubuntu@comp-002:~$ systemctl status apparmor
● apparmor.service - Load AppArmor profiles
Loaded: loaded (/lib/systemd/
Active: active (exited) since Thu 2021-02-04 07:02:12 UTC; 1h 7min ago
Docs: man:apparmor(7)
https:/
Main PID: 1383 (code=exited, status=0/SUCCESS)
Tasks: 0 (limit: 629145)
Memory: 0B
CGroup: /system.
Feb 04 07:02:12 ubuntu systemd[1]: Starting Load AppArmor profiles...
Feb 04 07:02:12 ubuntu apparmor.
Feb 04 07:02:12 ubuntu apparmor.
Feb 04 07:02:12 ubuntu apparmor.
Feb 04 07:02:12 ubuntu systemd[1]: Finished Load AppArmor profiles.
```
usr.bin.
```
ubuntu@comp-002:~$ stat /etc/apparmor.
File: /etc/apparmor.
Size: 3404 Blocks: 8 IO Block: 4096 regular file
Device: fd00h/64768d Inode: 42731391 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2021-02-04 07:35:59.979320142 +0000
Modify: 2021-02-04 07:35:59.015303088 +0000
Change: 2021-02-04 07:35:59.015303088 +0000
Birth: -
```
WORKAROUND:
Restart apparmor service on each compute node:
```
juju run --application nova-compute sudo systemctl restart apparmor.service
```