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 1786964 - 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 8
Classification: Red Hat
Component: pcs
Version: 8.1
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: 8.7
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
Steven J. Levine
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-30 01:10 UTC by Reid Wahl
Modified: 2022-11-08 09:22 UTC (History)
12 users (show)

Fixed In Version: pcs-0.10.14-2.el8
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:
: 1873948 2058243 (view as bug list)
Environment:
Last Closed: 2022-11-08 09:12:53 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-5745 0 None None None 2022-05-23 16:03:26 UTC
Red Hat Knowledge Base (Solution) 4685901 0 None None None 2019-12-30 01:27:49 UTC
Red Hat Product Errata RHSA-2022:7447 0 None None None 2022-11-08 09:13:11 UTC

Description Reid Wahl 2019-12-30 01:10:44 UTC
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

-----

Additional info:

RHEL 7 has a newer version of booth (1.0.8) available compared to RHEL 8 (1.0.5). In the RHEL 7 (booth-core-1.0.8) version, the mode ticket option no longer exists.

We may want to discuss with poki, whom I've CC'd. It's kind of odd to me that RHEL 8 only has the older version available, and the mode option for which this BZ is filed has disappeared in the newer (i.e., RHEL 7) booth versions. With that in mind, it might make more sense NOT to add the option to pcs, and instead to release an updated booth for RHEL 8.

Comment 1 Tomas Jelinek 2020-01-14 11:40:22 UTC
Poki,

Could you shed light on the situation described in Additional info - newer booth in RHEL 7 than in RHEL 8? What are the plans for RHEL 8 booth?

Thanks.

Comment 3 Jan Friesse 2020-08-04 07:15:04 UTC
@Reid:
Thank you for the notice, this one is assigned to pcs, so I overlooked it (and it wasn't assigned to me).

Situation with booth versioning is kind of complicated, so let me explain it in a more details.

Upstream-vise, it is simple. Last released version is 1.0. Every other patch on top of 1.0 is just in upstream git.

Downstream is more complicated. We have to keep main version 1.0. So that is why in all RHEL and Fedora version is booth version booth-1.0-SOMETHING.git.%{dist}.release_tag.

The SOMETHING is actually consisted of "specver" variable, which must be increased to guarantee upgradability, followed by SHA1 git hash shortened to 7 characters.

release_tag is either auto added/increased on rebuild or when adding patch without rebasing.

Of course on rebased it's needed to increase specver.

So, the important number is actually not that much "specver" but rather SHA1 and release_tag.

Does it make sense?

I'm not sure if I was able to describe booth versioning clearly, but no matter what, it is overcomplicated and prone to problems you've described (upgrade from RHEL 7 -> RHEL 8).

I was thinking about scheme based on git describe, so basically booth-1.0-(PATCHES_SINCE_1.0).(RELEASE_TAG).(SHA1).git.%{dist) - or swap RELEASE_TAG and SHA1, not sure which one would look nicer, probably the later one.

That would allow us to:
- Easily compare two non-rebased versions - RELEASE_TAG increases, nothing else changes
- Easily compare two rebased versions - PATCHES_SINCE_1.0 increase. RELEASE_TAG resets to 1. SHA1 differs.
- Remove release_tag at the end of the rpm (example for current Fedora - booth-1.0-6.ac1d34c.git.fc33.3.src.rpm, this look like fc33 has a Z stream).

Does it make sense? What do you think?

Comment 4 Jan Friesse 2020-08-04 11:15:06 UTC
@Reid:
Oh, I've forgot to answer one of your questions. Actually even RHEL 8.0.0 is newer (f2d38ce3d61502bda2a28e79db103737a691faf4 = v1.0-144-gf2d38ce = 144 patches on top of 1.0) than RHEL 7.9 (ef769ef9614e8446f597ee4d26d5d339a491ab2f = v1.0-104-gef769ef = 104 patches on top of 1.0).

manual ticket mode is probably really problem of pcs, because booth (current master - v1.0-220-g69cf659) supports manual tickets just fine.

Comment 5 Reid Wahl 2020-08-30 23:29:18 UTC
Hi, Honza. Sorry for my late response.

(In reply to Jan Friesse from comment #3)
> The SOMETHING is actually consisted of "specver" variable, which must be
> increased to guarantee upgradability, followed by SHA1 git hash shortened to
> 7 characters.
> 
> release_tag is either auto added/increased on rebuild or when adding patch
> without rebasing.
> 
> Of course on rebased it's needed to increase specver.
> 
> So, the important number is actually not that much "specver" but rather SHA1
> and release_tag.
> 
> Does it make sense?

Mostly, yes. The unclear parts are probably due to my vague understanding of the Red Hat packaging and release process in general.

In particular, I don't really understand when release_tag would be incremented **without** specver being incremented (or vice-versa). In other words, what kind of change/rebuild would bump one but not the other. Does a specver increase **without** a release_tag increase, indicate that the RPM spec was updated but the source code was not?

"on rebased it's needed to increase specver." <- but the 1.0 tag hasn't been updated in four and a half years, yet the specver has increased since then.

The RHEL 8 releases are as follows. The specver, release_tag, and SHA were all updated during the one package update.
1.0-6.ac1d34c.git.el8.2
1.0-5.f2d38ce.git.el8

The RHEL 7 releases are as follows. In all three updates, the specver was incremented, the SHA stayed the same, and there was no release_tag (implicit "1" I guess).
1.0-8.ef769ef.git.el7
1.0-7.ef769ef.git.el7
1.0-6.ef769ef.git.el7

---
 
> I'm not sure if I was able to describe booth versioning clearly, but no
> matter what, it is overcomplicated and prone to problems you've described
> (upgrade from RHEL 7 -> RHEL 8).

In addition to the counter-intuitive appearance of the current versioning scheme, Package Browser incorrectly shows the RHEL 7 version as being the latest due to its version number.

https://access.redhat.com/downloads/content/booth-core/1.0-8.ef769ef.git.el7/x86_64/fd431d51/package

---

> I was thinking about scheme based on git describe, so basically
> booth-1.0-(PATCHES_SINCE_1.0).(RELEASE_TAG).(SHA1).git.%{dist) - or swap
> RELEASE_TAG and SHA1, not sure which one would look nicer, probably the
> later one.
> 
> That would allow us to:
> - Easily compare two non-rebased versions - RELEASE_TAG increases, nothing
> else changes
> - Easily compare two rebased versions - PATCHES_SINCE_1.0 increase.
> RELEASE_TAG resets to 1. SHA1 differs.
> - Remove release_tag at the end of the rpm (example for current Fedora -
> booth-1.0-6.ac1d34c.git.fc33.3.src.rpm, this look like fc33 has a Z stream).
> 
> Does it make sense? What do you think?

Would we still need the SHA1 at all if we go with this approach? Most of our package release strings don't include SHA1's. It seems that "PATCHES_SINCE_1.0" would act as a sort of unique identifier.

---

> manual ticket mode is probably really problem of pcs, because booth (current master - v1.0-220-g69cf659) supports manual tickets just fine.

Yes, based on the explanation you've given, I agree with that assessment.

Originally, I hadn't checked master, because I had assumed that 1.0.8 was newer than 1.0.5.

Comment 6 Jan Friesse 2020-08-31 07:10:56 UTC
(In reply to Reid Wahl from comment #5)
> Hi, Honza. Sorry for my late response.
> 
> (In reply to Jan Friesse from comment #3)
> > The SOMETHING is actually consisted of "specver" variable, which must be
> > increased to guarantee upgradability, followed by SHA1 git hash shortened to
> > 7 characters.
> > 
> > release_tag is either auto added/increased on rebuild or when adding patch
> > without rebasing.
> > 
> > Of course on rebased it's needed to increase specver.
> > 
> > So, the important number is actually not that much "specver" but rather SHA1
> > and release_tag.
> > 
> > Does it make sense?
> 
> Mostly, yes. The unclear parts are probably due to my vague understanding of
> the Red Hat packaging and release process in general.
> 
> In particular, I don't really understand when release_tag would be
> incremented **without** specver being incremented (or vice-versa). In other

That's the problem. specver is actually invention of previous booth maintainer. But I was increasing release_ver when adding patch or doing rebuild, without doing rebase (mostly for Fedora master, so you've probably haven't had chance to see that).

> words, what kind of change/rebuild would bump one but not the other. Does a
> specver increase **without** a release_tag increase, indicate that the RPM
> spec was updated but the source code was not?

Yes, I believe that was the idea.

> 
> "on rebased it's needed to increase specver." <- but the 1.0 tag hasn't been
> updated in four and a half years, yet the specver has increased since then.

Yes. Because upstream latest release is 1.0. We are rebasing on top of (unreleased) git archives. Another approach would be to include (currently) 226 patches in distgit - probably not too great idea.

> 
> The RHEL 8 releases are as follows. The specver, release_tag, and SHA were
> all updated during the one package update.
> 1.0-6.ac1d34c.git.el8.2
> 1.0-5.f2d38ce.git.el8

Yup, because I've did upgrade.

Side note - plese , notice the el8.2 postfix. It looks like it is ZStream for 8.2, but actually it isn't. This is why I'm suggesting different versioning schema.

> 
> The RHEL 7 releases are as follows. In all three updates, the specver was
> incremented, the SHA stayed the same, and there was no release_tag (implicit
> "1" I guess).
> 1.0-8.ef769ef.git.el7
> 1.0-7.ef769ef.git.el7
> 1.0-6.ef769ef.git.el7

Really cannot say why it has happened.

> 
> ---
>  
> > I'm not sure if I was able to describe booth versioning clearly, but no
> > matter what, it is overcomplicated and prone to problems you've described
> > (upgrade from RHEL 7 -> RHEL 8).
> 
> In addition to the counter-intuitive appearance of the current versioning
> scheme, Package Browser incorrectly shows the RHEL 7 version as being the
> latest due to its version number.
> 
> https://access.redhat.com/downloads/content/booth-core/1.0-8.ef769ef.git.el7/
> x86_64/fd431d51/package

Indeed and it is quite a big problem. That's why I've suggested new versioning scheme, which would solve this problem by updating to version 1.0-226 so RHEL 8 would be bigger than RHEL 7.


> 
> ---
> 
> > I was thinking about scheme based on git describe, so basically
> > booth-1.0-(PATCHES_SINCE_1.0).(RELEASE_TAG).(SHA1).git.%{dist) - or swap
> > RELEASE_TAG and SHA1, not sure which one would look nicer, probably the
> > later one.
> > 
> > That would allow us to:
> > - Easily compare two non-rebased versions - RELEASE_TAG increases, nothing
> > else changes
> > - Easily compare two rebased versions - PATCHES_SINCE_1.0 increase.
> > RELEASE_TAG resets to 1. SHA1 differs.
> > - Remove release_tag at the end of the rpm (example for current Fedora -
> > booth-1.0-6.ac1d34c.git.fc33.3.src.rpm, this look like fc33 has a Z stream).
> > 
> > Does it make sense? What do you think?
> 
> Would we still need the SHA1 at all if we go with this approach? Most of our

Yes, you are right, it wouldn't be needed, but it is recommended for git archive based versions to contain SHA1 hash.

> package release strings don't include SHA1's. It seems that

This all comes from using git archives, because upstream hasn't released the new version since 16 Mar 2016. All other packages in HA repository is under our control directly and we do release new versions regularly.

 
> "PATCHES_SINCE_1.0" would act as a sort of unique identifier.
> 
> ---
> 
> > manual ticket mode is probably really problem of pcs, because booth (current master - v1.0-220-g69cf659) supports manual tickets just fine.
> 
> Yes, based on the explanation you've given, I agree with that assessment.
> 
> Originally, I hadn't checked master, because I had assumed that 1.0.8 was
> newer than 1.0.5.

Yeah, it is pretty confusing. But I do believe we are on same page there, so I will give the new schema a try in Fedora for a while and will try to rebase (or at least change versioning schema) for RHEL 8.4

Comment 7 Jan Friesse 2020-08-31 07:19:45 UTC
Cloned to bug 1873948 for booth component to solve inconsistent package versioning.

Comment 11 Tomas Jelinek 2022-03-04 12:08:21 UTC
Upstream patch:
https://github.com/ClusterLabs/pcs/commit/0a48111df5d2fd12008ea828656408ff94266476

See comment 0 for test / reproducer

Comment 13 Miroslav Lisik 2022-05-26 08:20:25 UTC
DevTestResults:

[root@r8-node-01 ~]# rpm -q pcs
pcs-0.10.13-1.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 Ticket mode=mode
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@r8-node-01 ~]# pcs booth ticket add TicketA mode=manual
[root@r8-node-01 ~]# pcs booth ticket add TicketB mode=auto
[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

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

Comment 28 Miroslav Lisik 2022-07-29 09:07:18 UTC
DevTestResults:

[root@r8-node-01 ~]# rpm -qa pcs booth*
booth-core-1.0-199.1.ac1d34c.git.el8.x86_64
pcs-0.10.14-2.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 TicketA mode=MANUAL
[root@r8-node-01 ~]# pcs booth ticket add TicketB mode=AutO
[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

Comment 31 Steven J. Levine 2022-09-01 15:20:56 UTC
Adding release note text that was approved for RHEL 9 ini this BZ:
https://bugzilla.redhat.com/show_bug.cgi?id=2058243

Comment 34 errata-xmlrpc 2022-11-08 09:12:53 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:7447


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