I can't reproduce your problem, this patch works well for me. I did two experiments.
One experiment is WITHOUT multipath-tools patch [1] + WITHOUT this os-brick patch, the test result can refer the link [2], we can see that multipath device can be deleted by 'multipath -r'.
Another experiment is WITHOUT multipath-tools patch [2] + WITH this os-brick patch, the test result can refer the link [3], we can see that multipath device doesn't be delete because this os-brick patch has removed 'multipath -r'.
@Gustavo,
I can't reproduce your problem, this patch works well for me. I did two experiments.
One experiment is WITHOUT multipath-tools patch [1] + WITHOUT this os-brick patch, the test result can refer the link [2], we can see that multipath device can be deleted by 'multipath -r'.
Mar 22 10:33:52 juju-zhhuabj- machine- 9 nova-compute[ 22305]: 2017-03-22 10:33:52.233 22305 WARNING os_brick. initiator. linuxscsi [req-0536068d- 110c-43a4- 82e4-941cdb7150 42 3f685b7c349c473 4afc1a9a87968ac a5 52bc463e2bbd46c 792ca0d17effd2a 86 - - -] Couldn't find multipath device /dev/mapper/ 360000000000000 000e00000000010 001
Another experiment is WITHOUT multipath-tools patch [2] + WITH this os-brick patch, the test result can refer the link [3], we can see that multipath device doesn't be delete because this os-brick patch has removed 'multipath -r'.
Mar 22 11:06:20 juju-zhhuabj- machine- 9 nova-compute[ 17329]: 2017-03-22 11:06:20.520 17329 DEBUG oslo_concurrenc y.lockutils [req-bbcf6687- 4e5d-4748- 9887-726ff84890 08 3f685b7c349c473 4afc1a9a87968ac a5 52bc463e2bbd46c 792ca0d17effd2a 86 - - -] Lock "connect_volume" acquired by "os_brick. initiator. connector. disconnect_ volume" :: waited 0.001s inner /usr/lib/ python2. 7/dist- packages/ oslo_concurrenc y/lockutils. py:273 machine- 9 nova-compute[ 17329]: 2017-03-22 11:06:20.523 17329 DEBUG oslo_concurrenc y.processutils [req-bbcf6687- 4e5d-4748- 9887-726ff84890 08 3f685b7c349c473 4afc1a9a87968ac a5 52bc463e2bbd46c 792ca0d17effd2a 86 - - -] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/ rootwrap. conf multipath -ll /dev/sda execute /usr/lib/ python2. 7/dist- packages/ oslo_concurrenc y/processutils. py:344 machine- 9 nova-compute[ 17329]: 2017-03-22 11:06:20.705 17329 DEBUG oslo_concurrenc y.processutils [req-bbcf6687- 4e5d-4748- 9887-726ff84890 08 3f685b7c349c473 4afc1a9a87968ac a5 52bc463e2bbd46c 792ca0d17effd2a 86 - - -] CMD "sudo nova-rootwrap /etc/nova/ rootwrap. conf multipath -ll /dev/sda" returned: 0 in 0.183s execute /usr/lib/ python2. 7/dist- packages/ oslo_concurrenc y/processutils. py:374 machine- 9 nova-compute[ 17329]: 2017-03-22 11:06:20.707 17329 DEBUG os_brick. initiator. connector [req-bbcf6687- 4e5d-4748- 9887-726ff84890 08 3f685b7c349c473 4afc1a9a87968ac a5 52bc463e2bbd46c 792ca0d17effd2a 86 - - -] multipath ['-ll', u'/dev/sda']: stdout= 360000000000000 000e00000000010 001 dm-0 IET,VIRTUAL-DISK machine- 9 nova-compute[ 17329]: size=1.0G features='0' hwhandler='0' wp=rw machine- 9 nova-compute[ 17329]: |-+- policy='round-robin 0' prio=1 status=active machine- 9 nova-compute[ 17329]: | `- 4:0:0:1 sda 8:0 active ready running machine- 9 nova-compute[ 17329]: `-+- policy='round-robin 0' prio=1 status=enabled machine- 9 nova-compute[ 17329]: `- 5:0:0:1 sdb 8:16 active ready running machine- 9 nova-compute[ 17329]: stderr= _run_multipath /usr/lib/ python2. 7/dist- packages/ os_brick/ initiator/ connector. py:1286 machine- 9 nova-compute[ 17329]: 2017-03-22 11:06:20.709 17329 DEBUG os_brick. initiator. linuxscsi [req-bbcf6687- 4e5d-4748- 9887-726ff84890 08 3f685b7c349c473 4afc1a9a87968ac a5 52bc463e2bbd46c 792ca0d17effd2a 86 - - -] remove multipath device /dev/sda remove_ multipath_ device /usr/lib/ python2. 7/dist- packages/ os_brick/ initiator/ linuxscsi. py:123 machine- 9 nova-compute[ 17329]: 2017-03-22 11:06:20.710 17329 DEBUG oslo_concurrenc y.processutils [req-bbcf6687- 4e5d-4748- 9887-726ff84890 08 3f685b7c349c473 4afc1a9a87968ac a5 52bc463e2bbd46c 792ca0d17effd2a 86 - - -] Running cmd (subprocess): sudo nova-rootwrap /etc/nova/ rootwrap. conf multipath -l /dev/sda execute /usr/lib/ python2. 7/dist- packages/ oslo_concurrenc y/processutils. py:344 machine- 9 nova-compute[ 17329]: 2017-03-22 11:06:20.826 17329 DEBUG oslo_concurrenc y.processutils [req-bbcf6687- 4e5d-4748- 9887-726ff84890 08 3f685b7c349c473 4afc1a9a87968ac a5 52bc463e2bbd46c 792ca0d17effd2a 86 - - -] CMD "sudo nova-rootwrap /etc/nova/ rootwrap. conf multipath -l /dev/sda" returned: 0 in 0.116s execute /usr/lib/ python2. 7/dist- packages/ oslo_concurrenc y/processutils. py:374 machine- 9 nova-compute[ 17329]: 2017-03-22 11:06:20.829 17329 DEBUG os_brick. initiator. linuxscsi [req-bbcf6687- 4e5d-4748- 9887-726ff84890 08 3f685b7c349c473 4afc1a9a87968ac a5 52bc463e2bbd46c 792ca0d17effd2a 86 - - -] Found multipath device = /dev/mapper/ 360000000000000 000e00000000010 001 find_multipath_ device /usr/lib/ python2. 7/dist- packages/ os_brick/ initiator/ linuxscsi. py:301 machine- 9 nova-compute[ 17329]: 2017-03-22 11:06:20.829 17329 DEBUG os_brick. initiator. linuxscsi [req-bbcf6687- 4e5d-4748- 9887-726ff84890 08 3f685b7c349c473 4afc1a9a87968ac a5 52bc463e2bbd46c 792ca0d17effd2a 86 - - -] multipath LUNs to remove [{'device': '/dev/sda', 'host': '4', 'id': '0', 'channel': '0', 'lun': '1'}, {'device': '/dev/sdb', 'host': '5', 'id': '0', 'channel': '0', 'lun': '1'}] remove_ multipath_ device /usr/lib/ python2. 7/dist- packages/ os_brick/ initiator/ linuxscsi. py:127
Mar 22 11:06:20 juju-zhhuabj-
Mar 22 11:06:20 juju-zhhuabj-
Mar 22 11:06:20 juju-zhhuabj-
Mar 22 11:06:20 juju-zhhuabj-
Mar 22 11:06:20 juju-zhhuabj-
Mar 22 11:06:20 juju-zhhuabj-
Mar 22 11:06:20 juju-zhhuabj-
Mar 22 11:06:20 juju-zhhuabj-
Mar 22 11:06:20 juju-zhhuabj-
Mar 22 11:06:20 juju-zhhuabj-
Mar 22 11:06:20 juju-zhhuabj-
Mar 22 11:06:20 juju-zhhuabj-
Mar 22 11:06:20 juju-zhhuabj-
Mar 22 11:06:20 juju-zhhuabj-
[1] https:/ /bugs.launchpad .net/ubuntu/ +source/ multipath- tools/+ bug/1621340 paste.ubuntu. com/24227639/ paste.ubuntu. com/24227824/
[2] http://
[3] http://