Bug 2152681
| Summary: | Support regular expressions for node attributes | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Ken Gaillot <kgaillot> |
| Component: | pcs | Assignee: | Tomas Jelinek <tojeline> |
| Status: | NEW --- | QA Contact: | cluster-qe <cluster-qe> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 9.2 | CC: | cluster-maint, idevat, mlisik, mpospisi, omular, tojeline |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
It turned out to be trivial to enable regular expressions with -v/--update and -D/--delete regardless of lifetime, so the --lifetime limitation will be lifted in RHEL 8.9/9.3. |
Description of problem: pcs doesn't support regular expressions when updating, querying, or deleting node attributes Additional info: crm_attribute supports POSIX extended regular expressions given with -P/--pattern in combination with -G/--query (since 1.1.17 / feature set 3.0.13), or with -v/--update and -D/--delete when used with -l/--lifetime=reboot (since 2.1.5 / feature set 3.16.1). Example: crm_attribute --query --node node1 --pattern 'ban-.*' would list all node attributes like ban-httpd, ban-ip, etc. I believe that currently, pcs only supports permanent node attributes (i.e. beneath <node>), not transient node attributes (i.e. beneath <node_state>). So, only --query would be usable currently. Adding support for transient attributes would mean adding them with crm_attribute --lifetime=reboot (or attrd_updater, but that does not support regular expressions).