RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2058243 - pcs booth ticket add does not recognize mode option
Summary: pcs booth ticket add does not recognize mode option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: pcs
Version: 9.0
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: 9.1
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
Steven J. Levine
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-24 15:00 UTC by Tomas Jelinek
Modified: 2022-11-16 17:44 UTC (History)
15 users (show)

Fixed In Version: pcs-0.11.3-3.el9
Doc Type: Bug Fix
Doc Text:
.`pcs` now recognizes the `mode` option when creating a new Booth ticket Previously, when a user specified a `mode` option when adding a new Booth ticket, `pcs` reported the error `invalid booth ticket option 'mode'`. With this fix, you can now specify the `mode` option when creating a Booth ticket.
Clone Of: 1786964
Environment:
Last Closed: 2022-11-15 09:48:38 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CLUSTERQE-5828 0 None None None 2022-06-16 19:02:49 UTC
Red Hat Issue Tracker RHELPLAN-113680 0 None None None 2022-02-24 15:13:24 UTC
Red Hat Knowledge Base (Solution) 4685901 0 None None None 2022-11-16 17:44:20 UTC
Red Hat Product Errata RHSA-2022:7935 0 None None None 2022-11-15 09:48:58 UTC

Description Tomas Jelinek 2022-02-24 15:00:52 UTC
+++ This bug was initially created as a clone of Bug #1786964 +++

Description of problem:

`pcs booth ticket add` does not accept the mode option for tickets, which is described in the boothd(8) man page.

From man page:

       mode
           Specifies if the ticket is manual or automatic.

           By default all tickets are automatic (that is, they are fully controlled by Raft algorithm). Assign the strings "manual" or "MANUAL" to define the ticket as manually controlled.


Demo:

[root@fastvm-rhel-8-0-23 ~]# pcs booth ticket add test1 mode=auto
Error: invalid booth ticket option 'mode', allowed options are: acquire-after, attr-prereq, before-acquire-handler, expire, renewal-freq, retries, timeout, weights, use --force to override
[root@fastvm-rhel-8-0-23 ~]# pcs booth ticket add test1 mode=auto --force
Warning: invalid booth ticket option 'mode', allowed options are: acquire-after, attr-prereq, before-acquire-handler, expire, renewal-freq, retries, timeout, weights
[root@fastvm-rhel-8-0-23 ~]# cat /etc/booth/booth.conf
authfile = /etc/booth/booth.key
site = 192.168.22.71
site = 192.168.22.81
arbitrator = 192.168.22.52
ticket = "apacheticket2"
ticket = "apacheticket3"
ticket = "apacheticket"
ticket = "test1"
  mode = auto

-----

Version-Release number of selected component (if applicable):

pcs-0.10.1-4.el8_0.4.x86_64
booth-core-1.0-5.f2d38ce.git.el8.x86_64

Also upstream master

-----

How reproducible:

Always

-----

Steps to Reproduce:

Use `pcs booth ticket add` to add a new ticket with the mode option set to either manual or auto.

-----

Actual results:

Error: invalid booth ticket option 'mode', allowed options are: acquire-after, attr-prereq, before-acquire-handler, expire, renewal-freq, retries, timeout, weights, use --force to override

-----

Expected results:

No error

Comment 1 Tomas Jelinek 2022-03-02 15:49:38 UTC
Upstream patch:
https://github.com/ClusterLabs/pcs/commit/83cb59f54b803138e176bf90b5310f8be287f775

See comment 0 for test / reproducer

Comment 3 Miroslav Lisik 2022-05-19 17:30:25 UTC
DevTestResults:

[root@r91-1 ~]# rpm -q pcs
pcs-0.11.2-1.el9.x86_64

[root@r91-1 ~]# pcs booth config
authfile = /etc/booth/booth.key
site = 127.0.0.1
site = 127.0.0.2
site = 127.0.0.3
[root@r91-1 ~]# pcs booth ticket add TicketB mode=mode
Error: booth ticket name 'TicketB' already exists in configuration
Error: 'mode' is not a valid mode value, use 'auto', 'manual', use --force to override
Error: Errors have occurred, therefore pcs is unable to continue
[root@r91-1 ~]# pcs booth ticket add TicketA mode=manual
[root@r91-1 ~]# pcs booth ticket add TicketB mode=auto
[root@r91-1 ~]# 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

Comment 12 Tomas Jelinek 2022-07-19 11:12:44 UTC
Additional patch for making the mode value case insensitive, tests are included: https://github.com/ClusterLabs/pcs/commit/4b5bf253b0602548a1b3690e3c54623e06cffd76

Comment 14 Miroslav Lisik 2022-07-29 09:02:26 UTC
DevTestResults:

[root@r91-1 ~]# rpm -qa pcs booth*
booth-core-1.0-251.2.bfb2f92.git.el9.x86_64
booth-arbitrator-1.0-251.2.bfb2f92.git.el9.noarch
booth-site-1.0-251.2.bfb2f92.git.el9.noarch
booth-1.0-251.2.bfb2f92.git.el9.x86_64
pcs-0.11.3-3.el9.x86_64

[root@r91-1 ~]# pcs booth setup sites 127.0.0.{1..3}
[root@r91-1 ~]# pcs booth config
authfile = /etc/booth/booth.key
site = 127.0.0.1
site = 127.0.0.2
site = 127.0.0.3
[root@r91-1 ~]# pcs booth ticket add TicketA mode=MANUAL
[root@r91-1 ~]# pcs booth ticket add TicketB mode=AutO
[root@r91-1 ~]# 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

Comment 21 errata-xmlrpc 2022-11-15 09:48:38 UTC
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:7935


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