Bug 1609464 - [RFE] Support selection with regex on fields which are of 'string list' type
Summary: [RFE] Support selection with regex on fields which are of 'string list' type
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: LVM and device-mapper
Classification: Community
Component: lvm2
Version: 2.02.177
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
: ---
Assignee: Peter Rajnoha
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-28 06:23 UTC by Oliver Rath
Modified: 2024-08-12 10:40 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2024-08-12 10:40:38 UTC
Embargoed:
rule-engine: lvm-technical-solution?
rule-engine: lvm-test-coverage?


Attachments (Terms of Use)

Description Oliver Rath 2018-07-28 06:23:01 UTC
Im trying to sort some output with lvs using a regex "=~", which results
in an error:

# lvs -o lv_name,lv_tags -S 'lv_tags=~mac1'
  dm_report: incompatible comparison type for selection field lv_tags

Otherwise, using the =~ operator on lv_names works well:

# lvs -o lv_name -S 'lv_name=~z'
  LV 
  z1 
  z2 
  z3 

If I see right, I can use the selection type "string list" here, but no
regex. Is this right? Is there a way to use regex on tags?

Comment 1 Peter Rajnoha 2021-03-02 12:54:31 UTC
Yes, exactly - we don't support regex with "string list" field types yet, only the "string" type. I've already had feedback from another source requesting this, so we may try to add support for this. Looks the only thing needed here is to iterate over the string in the list and run the regex for each and match if at least one of the elements match...

Comment 4 Peter Rajnoha 2024-08-12 10:40:38 UTC
Currently, we don't plan to implement this. If there's still a strong need for this, please reopen.


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