Bug 2159555 - multipath.conf is modified incorrectly when MultipathdCustomConfigFile is present
Summary: multipath.conf is modified incorrectly when MultipathdCustomConfigFile is pre...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: tripleo-ansible
Version: 16.2 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z5
: 16.2 (Train on RHEL 8.4)
Assignee: Alan Bishop
QA Contact: Evelina Shames
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-10 01:18 UTC by yatanaka
Modified: 2023-04-26 12:53 UTC (History)
5 users (show)

Fixed In Version: tripleo-ansible-0.8.1-2.20230302004949.0db9f93.el8ost
Doc Type: Bug Fix
Doc Text:
Before this update, deploying Block Storage multipath with a custom configuration containing a "blacklist_exceptions" section failed due to an error in the multipath configuration. With this update, custom multipath configurations are handled correctly and therefore Block Storage multipath can be deployed with a custom configuration containing a "blacklist_exceptions" section.
Clone Of:
Environment:
Last Closed: 2023-04-26 12:17:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 875289 0 None MERGED Fix tripleo_multipathd handling of blacklist section 2023-03-01 04:30:05 UTC
Red Hat Issue Tracker OSP-21276 0 None None None 2023-01-10 01:21:14 UTC
Red Hat Knowledge Base (Solution) 7005257 0 None None None 2023-04-19 01:49:18 UTC
Red Hat Product Errata RHBA-2023:1763 0 None None None 2023-04-26 12:17:44 UTC

Description yatanaka 2023-01-10 01:18:53 UTC
Description of problem:

If MultipathdCustomConfigFile is present and the multipath.conf file has blacklist or blacklist_exceptions section, tripleo-ansible modifies the multipath.conf file incorrectly like the following example:

<Original multipath.conf file configured by MultipathdCustomConfigFile>
~~~
blacklist {
    devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
    devnode "^hd[a-z]"
}

blacklist_exceptions {
    device {
        product "XXXX"
        vendor "XXXX"
    }
}
~~~

<Deployed multipath.conf file on overcloud Compute node>
~~~
blacklist {
}                    <==================(*) added incorrectly
    devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
    devnode "^hd[a-z]"
}

blacklist {          <==================(*) Changed to blacklist from blacklist_exceptions
}                    <==================(*) added incorrectly
    device {
        product "XXXX"
        vendor "XXXX"
    }
}
~~~

The above change is made by the following Ansible tasks:

  - https://github.com/openstack/tripleo-ansible/blob/stable/train/tripleo_ansible/roles/tripleo_multipathd/tasks/configure.yml#L47-L91

I think these Ansible tasks shouldn't run when MultipathdCustomConfigFile is present.



Version-Release number of selected component (if applicable):
My customer observed this issue on their RHOSP 16.2.4 environment first.
Then I reproduced the same issue on my RHOSP 16.2.4 lab.


How reproducible:
Steps to Reproduce:
1. In undercloud, create /var/lib/mistral/multipath.conf file which includes blacklist section or blacklist_exceptions section.
2. Create the following environment file.
   ~~~
   parameter_defaults:
     MultipathdCustomConfigFile: /var/lib/mistral/multipath.conf
   ~~~
3. Deploy overcloud with the following environment files
   ~~~
   $ openstack overcloud deploy \
      :
     -e /usr/share/openstack-tripleo-heat-templates/environments/multipathd.yaml
     -e <env file created by step 2>
      :
   ~~~
4. Check /etc/multipath.conf on Compute nodes.

Doc : https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.2/html/storage_guide/assembly-configuring-the-block-storage-service_osp-storage-guide#proc-configuring-multipath-on-new-deployments_configuring-cinder


Actual results:
/etc/multipath.conf on Compute nodes retains valid contents.


Expected results:
/etc/multipath.conf is modified incorrectly.
"blacklist" section bracket is closed incorrectly.
"blacklist_exceptions" section is changed to "blacklist"

Comment 12 errata-xmlrpc 2023-04-26 12:17:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 16.2.5 (Train) bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:1763


Note You need to log in before you can comment on or make changes to this bug.