Bug 2027769

Summary: 'pcs constraint ticket add' does not validate a ticket, which may lead to invalid CIB error
Product: Red Hat Enterprise Linux 9 Reporter: Tomas Jelinek <tojeline>
Component: pcsAssignee: Tomas Jelinek <tojeline>
Status: CLOSED DUPLICATE QA Contact: cluster-qe <cluster-qe>
Severity: medium Docs Contact:
Priority: medium    
Version: 9.0CC: cfeist, cluster-maint, idevat, mlisik, mpospisi, nwahl, omular, sbradley, tojeline
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2027771 (view as bug list) Environment:
Last Closed: 2022-02-10 16:21:34 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:
Bug Depends On:    
Bug Blocks: 2027771    

Description Tomas Jelinek 2021-11-30 15:33:11 UTC
Description of problem:
While 'pcs booth ticket add' validates a new ticket, 'pcs constraint ticket add' does not. This may lead to situations where a constraint is created for a ticket which cannot be added to booth configuration. Moreover, when creating a ticket constraint, a ticket is used as a part of the constraint id unsanitized. This may lead to an invalid CIB being dumped to the terminal.


Version-Release number of selected component (if applicable):
pcs-0.10.11-1
pcs-0.11.1-4


How reproducible:
always, easily


Steps to Reproduce:
1. pcs constraint ticket add "my super ticket" d1


Actual results:
Error: Unable to update cib
Call cib_apply_diff failed (-203): Update does not conform to the configured schema


Expected results:
An error message informing the user that the ticket name is not valid.


Additional info:
# pcs booth ticket add "my super ticket"
Error: booth ticket name 'my super ticket' is not valid, use alphanumeric chars or dash

Comment 1 Tomas Jelinek 2022-02-10 16:21:34 UTC

*** This bug has been marked as a duplicate of bug 2053177 ***