From 277db5c3b7a06d554bfc8ef8cf3a3445d27e8aab Mon Sep 17 00:00:00 2001 From: Victor Chembaev Date: Mon, 25 Jul 2022 21:27:07 +0300 Subject: [PATCH] Fix nova online volume resize with multipathd Closes-Bug: 1982777 Change-Id: Ic752b981041b233ab55d5b9abef667b21b47857d --- ansible/roles/multipathd/tasks/config.yml | 19 ++++++++++++------- .../multipathd/templates/multipath.conf.j2 | 2 +- .../notes/bug-1982777-0cac9753aa18a037.yaml | 8 ++++++++ 3 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 releasenotes/notes/bug-1982777-0cac9753aa18a037.yaml diff --git a/ansible/roles/multipathd/tasks/config.yml b/ansible/roles/multipathd/tasks/config.yml index 666840565d..f9281e9f8e 100644 --- a/ansible/roles/multipathd/tasks/config.yml +++ b/ansible/roles/multipathd/tasks/config.yml @@ -26,14 +26,19 @@ - Restart multipathd container - name: Copying over multipath.conf - template: - src: "multipath.conf.j2" - dest: "{{ node_config_directory }}/{{ item.key }}/multipath.conf" - mode: "0660" + vars: + service: "{{ multipathd_services['multipathd'] }}" become: true + template: + src: "{{ item }}" + dest: "{{ node_config_directory }}/multipathd/multipath.conf" + mode: "0660" + with_first_found: + - "{{ node_custom_config }}/multipath/{{ inventory_hostname }}/multipath.conf" + - "{{ node_custom_config }}/multipath.conf" + - "multipath.conf.j2" when: - - inventory_hostname in groups[item.value.group] - - item.value.enabled | bool - with_dict: "{{ multipathd_services }}" + - inventory_hostname in groups[service.group] + - service.enabled | bool notify: - Restart multipathd container diff --git a/ansible/roles/multipathd/templates/multipath.conf.j2 b/ansible/roles/multipathd/templates/multipath.conf.j2 index 749c07fed4..5aa10573e7 100644 --- a/ansible/roles/multipathd/templates/multipath.conf.j2 +++ b/ansible/roles/multipathd/templates/multipath.conf.j2 @@ -1,5 +1,5 @@ defaults { - user_friendly_names yes + user_friendly_names no find_multipaths yes } diff --git a/releasenotes/notes/bug-1982777-0cac9753aa18a037.yaml b/releasenotes/notes/bug-1982777-0cac9753aa18a037.yaml new file mode 100644 index 0000000000..0a80e3ce38 --- /dev/null +++ b/releasenotes/notes/bug-1982777-0cac9753aa18a037.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - | + Fixes 1982777. + Set multipathd user_friendly_names to "no" + to make os-brick able to resize volumes online. + Adds ability to override multipathd config. + `LP#1982777 `__