Bug 2116295

Summary: pcs booth - consider adding support for enable-authfile
Product: Red Hat Enterprise Linux 9 Reporter: Jan Friesse <jfriesse>
Component: pcsAssignee: Ondrej Mular <omular>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: high Docs Contact: Steven J. Levine <slevine>
Priority: high    
Version: 9.0CC: bstinson, cluster-maint, idevat, jwboyer, mlisik, mmazoure, mpospisi, nhostako, omular, pasik, slevine, svalasti, tojeline
Target Milestone: rcKeywords: Triaged
Target Release: 9.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: pcs-0.11.4-1.el9 Doc Type: Enhancement
Doc Text:
.New `enable-authfile` Booth configuration option When you create a Booth configuration to use the Booth ticket manager in a cluster configuration, the `pcs booth setup` command now enables the new `enable-authfile` Booth configuration option by default. You can enable this option on an existing cluster with the `pcs booth enable-authfile` command. Additionally, the `pcs status` and `pcs booth status` commands now display warnings when they detect a possible `enable-authfile` misconfiguration.
Story Points: ---
Clone Of:
: 2132582 (view as bug list) Environment:
Last Closed: 2023-05-09 07:18: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:

Description Jan Friesse 2022-08-08 07:45:37 UTC
Description of problem:
Add support for booth enable-authfile directive added because of bug 2111669 (reproducer bug 2111669 comment 5)

TL;DR booth was ignoring authfile directive (added by default by pcs) - to prevent breaking compatibility with existing configurations during update, RHEL 8/9 specific patch was added (so by default authfile is ignored until enable-authfile is set).

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

How reproducible:
100%

Steps to Reproduce:
1. configure booth using pcs

Actual results:
`enable-authfile` not added

Expected results (all are questionable):
- enable-authfile set by default for new configs (when authfile is filled)?
- add ability to change enable-authfile?
- display warning when authfile is set and enable-authfile is unset?

Additional info:
enable-authfile directive is RHEL specific and will be removed in next major RHEL version (for Fedora, it's in f35/36 but it doesn't exist in rawhide).

Comment 1 Tomas Jelinek 2022-10-06 08:29:05 UTC
What we want to do:
* Add 'enable-authfile: yes' to newly created booth config ('pcs booth setup' command)
* Print a warning in 'pcs status', if booth is enabled, authfile is present, and 'enable-authfile: yes' is missing in booth config
* Add a command for changing 'enable-authfile' so that it can be enabled in existing configuration

Comment 4 Ondrej Mular 2022-11-11 10:12:15 UTC
Upstream patch: https://github.com/ClusterLabs/pcs/commit/98927e4a5c1dfd530fd7a6571df824e2a6602e3c

Option `enable-authfile = yes` is always added to booth configuration for new booth setups when using `pcs booth setup` command
New commands for managing `enable-authfile` booth option:
 - pcs booth enable-authfile
 - pcs booth clean-enable-authfile
Incorrect usage of `enable-authfile` option warnings are displayed when running `pcs status` and `pcs booth status`.

Test:
[root@rhel91-devel1 pcs]# pcs booth setup sites rhel91-devel1 rhel91-devel2 arbitrators rhel91-devel3
[root@rhel91-devel1 pcs]# pcs booth config | grep authfile
authfile = /etc/booth/booth.key
enable-authfile = yes

Comment 5 Michal Pospisil 2022-11-24 12:18:59 UTC
DevTestResults:

[root@r09-02-a ~]# rpm -q pcs
pcs-0.11.4-1.el9.x86_64

[root@r09-02-a ~]# pcs booth setup sites r09-02-a.vm r09-02-b.vm arbitrators r09-02-c.vm

[root@r09-02-a ~]# pcs booth config | grep authfile
authfile = /etc/booth/booth.key
enable-authfile = yes

Comment 12 errata-xmlrpc 2023-05-09 07:18:34 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 (pcs 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/RHBA-2023:2151