There's missing configurations of apparmon so nova can run /usr/bin/multipathd
when use-multipath option is set to charm
and one runs openstack server add volume...
```
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.rpc.server During handling of the above exception, another exception occurred:
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.rpc.server
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.rpc.server Traceback (most recent call last):
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.rpc.server File "/usr/lib/python3/dist-packages/oslo_messaging/rpc/server.py", line 165, in _process_incoming
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.rpc.server res = self.dispatcher.dispatch(message)
...
There's missing configurations of apparmon so nova can run /usr/bin/multipathd
when use-multipath option is set to charm
and one runs openstack server add volume...
``` rpc.server During handling of the above exception, another exception occurred: rpc.server rpc.server Traceback (most recent call last): rpc.server File "/usr/lib/ python3/ dist-packages/ oslo_messaging/ rpc/server. py", line 165, in _process_incoming rpc.server res = self.dispatcher .dispatch( message)
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
...
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging. rpc.server File "/usr/lib/ python3/ dist-packages/ os_brick/ initiator/ connector. py", line 251, in get_connector_ properties rpc.server connector. get_connector_ properties( rpc.server File "/usr/lib/ python3/ dist-packages/ os_brick/ initiator/ connectors/ base.py" , line 54, in get_connector_ properties rpc.server linuxscsi. LinuxSCSI. is_multipath_ running( rpc.server File "/usr/lib/ python3/ dist-packages/ os_brick/ initiator/ linuxscsi. py", line 172, in is_multipath_ running rpc.server out, _err = execute(*cmd, run_as_root=True, rpc.server File "/usr/lib/ python3/ dist-packages/ os_brick/ privileged/ rootwrap. py", line 186, in execute rpc.server raise putils. ProcessExecutio nError( rpc.server oslo_concurrenc y.processutils. ProcessExecutio nError: [Errno 13] Permission denied rpc.server Command: multipathd show status rpc.server Exit code: - rpc.server Stdout: None rpc.server Stderr: None rpc.server
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
2021-04-22 12:52:57.696 2032868 ERROR oslo_messaging.
```
``` 7.187:9276) : apparmor="DENIED" operation="exec" profile= "/usr/bin/ nova-compute" name="/ usr/sbin/ multipathd" pid=2094222 comm="privsep- helper" requested_mask="x" denied_mask="x" fsuid=0 ouid=0 7.187:9277) : apparmor="DENIED" operation="exec" profile= "/usr/bin/ nova-compute" name="/ usr/sbin/ multipathd" pid=2094222 comm="privsep- helper" requested_mask="x" denied_mask="x" fsuid=0 ouid=0
[510617.168463] audit: type=1400 audit(161909597
[510617.168473] audit: type=1400 audit(161909597
```
The workaround for it is to set app armor profile to complain nova-compute
$ aa-complain /usr/bin/
Then attacking works as expected libvirt. driver [req-45993c5f- 53ba-4b63- b796-4bcfd2dae2 d7 36344934288b44b 98282cce9095c60 ca b0027274fda94bd d9ffebab10d6d9b dc - 2fba3120cb5542f fb124b7296cf22e 71 2fba3120cb5542f fb124b7296cf22e 71] [instance: 3c00f4ae- 0d56-480b- 839d-a8cf02019b 72] Ignoring supplied device name: /dev/vdb manager [req-45993c5f- 53ba-4b63- b796-4bcfd2dae2 d7 36344934288b44b 98282cce9095c60 ca b0027274fda94bd d9ffebab10d6d9b dc - 2fba3120cb5542f fb124b7296cf22e 71 2fba3120cb5542f fb124b7296cf22e 71] [instance: 3c00f4ae- 0d56-480b- 839d-a8cf02019b 72] Attaching volume 3ed8c5e8- cf02-4e5e- bff8-04c7af3c89 b5 to /dev/vdb initiator. connectors. fibre_channel [-] Fibre Channel volume device not yet found. Will rescan & retry. Try number: 0. initiator. linuxscsi [req-45993c5f- 53ba-4b63- b796-4bcfd2dae2 d7 36344934288b44b 98282cce9095c60 ca b0027274fda94bd d9ffebab10d6d9b dc - 2fba3120cb5542f fb124b7296cf22e 71 2fba3120cb5542f fb124b7296cf22e 71] Find Multipath device file for volume WWN 360002ac0000000 000000001a00015 717
```
2021-04-22 13:03:03.879 2032868 INFO nova.virt.
2021-04-22 13:03:04.127 2032868 INFO nova.compute.
2021-04-22 13:03:06.937 2032868 INFO os_brick.
2021-04-22 13:03:08.973 2032868 INFO os_brick.
```