Bug 1791661
| Summary: | booth: pcs should validate ticket names | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Tomas Jelinek <tojeline> | |
| Component: | pcs | Assignee: | Tomas Jelinek <tojeline> | |
| Status: | CLOSED ERRATA | QA Contact: | cluster-qe <cluster-qe> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 8.3 | CC: | cluster-maint, idevat, mlisik, mmazoure, mpospisi, nhostako, nwahl, omular, sbradley, svalasti, tojeline | |
| Target Milestone: | rc | Keywords: | Reopened, Triaged | |
| Target Release: | 8.7 | Flags: | pm-rhel:
mirror+
|
|
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | pcs-0.10.13-1.el8 | Doc Type: | Bug Fix | |
| Doc Text: |
Cause:
User creates a new booth ticket.
Consequence:
Because pcs doesn't check the ticket's name, it may be unprocessable by booth.
Fix:
Implement ticket name validation in pcs.
Result:
Ticket names which are not processable by booth are not allowed in the configuration. Pcs exits with an error describing the correct format of the name.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 2053177 (view as bug list) | Environment: | ||
| Last Closed: | 2022-11-08 09:12:53 UTC | 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: | ||||
|
Description
Tomas Jelinek
2020-01-16 10:40:52 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. *** Bug 2027771 has been marked as a duplicate of this bug. *** Upstream patch + tests: https://github.com/ClusterLabs/pcs/commit/8f074a7619b33e69f3ff3dfc821cc0239cb85668 For a test / reproducer, see comment 0. Implemented checks in this patch: * only alphanumeric characters and "-" are allowed * max name length is 63 characters DevTestResults:
[root@r8-node-01 ~]# rpm -q pcs
pcs-0.10.13-1.el8.x86_64
[root@r8-node-01 ~]# rpm -qa booth*
booth-core-1.0-199.1.ac1d34c.git.el8.x86_64
booth-site-1.0-199.1.ac1d34c.git.el8.noarch
booth-1.0-199.1.ac1d34c.git.el8.x86_64
[root@r8-node-01 ~]# pcs booth setup sites 127.0.0.{1..3}
[root@r8-node-01 ~]# pcs booth config
authfile = /etc/booth/booth.key
site = 127.0.0.1
site = 127.0.0.2
site = 127.0.0.3
[root@r8-node-01 ~]# pcs booth ticket add ms_ip_ticket
Error: booth ticket name 'ms_ip_ticket' is not valid, use up to 63 alphanumeric characters or dash
Error: Errors have occurred, therefore pcs is unable to continue
[root@r8-node-01 ~]# echo $?
1
[root@r8-node-01 ~]# pcs booth ticket add "$(printf 'a%.0s' {1..64})"
Error: booth ticket name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' is not valid, use up to 63 alphanumeric characters or dash
Error: Errors have occurred, therefore pcs is unable to continue
[root@r8-node-01 ~]# echo $?
1
[root@r8-node-01 ~]# pcs booth ticket add "a-b"
[root@r8-node-01 ~]# echo $?
0
[root@r8-node-01 ~]# pcs booth ticket add "$(printf 'b%.0s' {1..63})"
[root@r8-node-01 ~]# echo $?
0
[root@r8-node-01 ~]# pcs booth config
authfile = /etc/booth/booth.key
site = 127.0.0.1
site = 127.0.0.2
site = 127.0.0.3
ticket = "TicketA"
mode = manual
ticket = "TicketB"
mode = auto
ticket = "a-b"
ticket = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
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 (Moderate: pcs security, bug fix, and enhancement update), 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/RHSA-2022:7447 |