This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 2179859 - [augtool] Unable to set multipath.conf/blacklist/wwid
Summary: [augtool] Unable to set multipath.conf/blacklist/wwid
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: augeas
Version: 8.8
Hardware: Unspecified
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Virtualization Maintenance
QA Contact: YongkuiGuo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-20 10:01 UTC by Martin Hoyer
Modified: 2023-07-07 21:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-07-07 21:20:10 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-754 0 None None None 2023-07-07 21:20:09 UTC
Red Hat Issue Tracker RHELPLAN-152327 0 None None None 2023-03-20 10:01:26 UTC

Description Martin Hoyer 2023-03-20 10:01:07 UTC
Description of problem:
augtool does not seem to function properly when modifying multipath.conf

# augtool -s set "/files/etc/multipath.conf/blacklist/wwid" ".*"
error: Failed to execute command
saving failed (run 'errors' for details)

# augtool errors
Error in /etc/multipath.conf:14.0 (parse_failed)
  Iterated lens matched less than it should
  Lens: /usr/share/augeas/lenses/dist/multipath.aug:133.10-.64:
    Last matched: /usr/share/augeas/lenses/dist/multipath.aug:24.24-.42:
    Next (no match): /usr/share/augeas/lenses/dist/multipath.aug:16.10-.37:

Version-Release number of selected component (if applicable):
augeas-1.12.0-8.el8.x86_64
augeas-libs-1.12.0-8.el8.x86_64

How reproducible:
100%

Steps to Reproduce:
1. install augeas device-mapper-multipath packages
2. mpathconf --enable
3. augtool -s set "/files/etc/multipath.conf/blacklist/wwid" ".*"

Actual results:
error

Expected results:
As seen on el9:
augeas-libs-1.13.0-3.el9.x86_64
augeas-1.13.0-3.el9.x86_64

# augtool -s set "/files/etc/multipath.conf/blacklist/wwid" ".*"
Saved 1 file(s)

# cat /etc/multipath.conf 
# device-mapper-multipath configuration file

# For a complete list of the default configuration values, run either:
# # multipath -t
# or
# # multipathd show config

# For a list of configuration options with descriptions, see the
# multipath.conf man page.

defaults {
	user_friendly_names yes
	find_multipaths yes
}

blacklist {
wwid .*
}

Comment 1 YongkuiGuo 2023-03-21 03:32:39 UTC
Can reproduce this issue on RHEL8.8 with the following steps:

Steps:

1. 
# yum install device-mapper-multipath
2.
# mpathconf --enable
3.
# augtool -s set "/files/etc/multipath.conf/blacklist/wwid" ".*"
error: Failed to execute command
saving failed (run 'errors' for details)

4.
# augtool print /augeas//error | grep multipath.conf
/augeas/files/etc/multipath.conf/error = "parse_failed"
/augeas/files/etc/multipath.conf/error/pos = "317"
/augeas/files/etc/multipath.conf/error/line = "14"
/augeas/files/etc/multipath.conf/error/char = "0"
/augeas/files/etc/multipath.conf/error/lens = "/usr/share/augeas/lenses/dist/multipath.aug:133.10-.64:"
/augeas/files/etc/multipath.conf/error/lens/last_matched = "/usr/share/augeas/lenses/dist/multipath.aug:24.24-.42:"
/augeas/files/etc/multipath.conf/error/lens/next_not_matched = "/usr/share/augeas/lenses/dist/multipath.aug:16.10-.37:"
/augeas/files/etc/multipath.conf/error/message = "Iterated lens matched less than it should"

5.
# cat /etc/multipath.conf
# device-mapper-multipath configuration file

# For a complete list of the default configuration values, run either:
# # multipath -t
# or
# # multipathd show config

# For a list of configuration options with descriptions, see the
# multipath.conf man page.

defaults {
	user_friendly_names yes
	find_multipaths yes
	enable_foreign "^$"
}

blacklist_exceptions {
        property "(SCSI_IDENT_|ID_WWN)"
}

blacklist {
}


In fact, augeas cannot parse 'enable_foreign "^$"' this line in /etc/multipath.conf file. This line doesn't exist in /etc/multipath.conf on RHEL9.

Comment 2 Klaus Heinrich Kiwi 2023-03-24 12:27:33 UTC
(In reply to Martin Hoyer from comment #0)
> Description of problem:
> augtool does not seem to function properly when modifying multipath.conf
> 

For triaging / prioritization purposes, can you state if this is impacting anything on top of it (i.e., any script / program / routine that is trying to perform this change and failing)?

Thanks

Comment 3 Martin Hoyer 2023-03-24 14:43:21 UTC
I don't know any other example then our kernel/storage python tests, which enable multipath this way. In past we were using custom multipathd.conf file, but switch to running `mpathconf --enable` recently. The workaround (deleting 'enable_foreign "^$"' line) is simple enough so there is no real impact here.
Looking at the multipath-aug source it looks like the last commit was in 2018 to fix and issue reported also by me :) https://github.com/hercules-team/augeas/issues/583 i.e. I wouldn't say this needs to have any priority.

Comment 4 Martin Hoyer 2023-03-24 14:55:03 UTC
fyi, opened an issue upstream: https://github.com/hercules-team/augeas/issues/808


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