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 1791670 - booth: pcs should check that '/etc/booth' exists
Summary: booth: pcs should check that '/etc/booth' exists
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcs
Version: 8.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: 8.7
Assignee: Tomas Jelinek
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 2026725
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-16 11:02 UTC by Tomas Jelinek
Modified: 2022-11-08 09:22 UTC (History)
9 users (show)

Fixed In Version: pcs-0.10.14-2.el8
Doc Type: Bug Fix
Doc Text:
Cause: User tries to setup booth when booth is not installed. Consequence: Pcs complains about missing booth config file. That is misleading, as the command is supposed to create the booth config file. Fix: Print an error message saying booth config directory is missing and asking the user to make sure booth is installed. Result: The error message clearly says what's wrong and provides recommended course of action.
Clone Of:
: 2026725 (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
Github ClusterLabs pcs issues 225 0 None open [booth] `pcs booth setup` shall not jump to report "No such file or directory: '/etc/booth/booth.key'" when /etc/booth d... 2020-09-17 08:59:52 UTC
Red Hat Issue Tracker CLUSTERQE-5747 0 None None None 2022-05-23 16:03:17 UTC
Red Hat Product Errata RHSA-2022:7447 0 None None None 2022-11-08 09:13:11 UTC

Description Tomas Jelinek 2020-01-16 11:02:28 UTC
Description of problem:
If /etc/booth does not exist, the user get a slightly misleading error message:

# pcs booth setup sites 127.0.0.1 127.0.0.2 127.0.0.3
Error: Unable to write Booth key '/etc/booth/booth.key': No such file or directory: '/etc/booth/booth.key'
Error: Errors have occurred, therefore pcs is unable to continue

It would be better to get something like this:
Configuration directory for booth, /etc/booth, is missing. Is booth installed?


Version-Release number of selected component (if applicable):
pcs-0.10.4-3.el8


How reproducible:
always, easily


Steps to Reproduce:
1. make sure /etc/booth does not exist
2. run 'pcs booth setup' or 'pcs booth pull'


Actual results:
Error: Unable to write Booth key '/etc/booth/booth.key': No such file or directory: '/etc/booth/booth.key'


Expected results:
Error: Configuration directory for booth, /etc/booth, is missing. Is booth installed?


Additional info:
reported upstream https://github.com/ClusterLabs/pcs/issues/225

Comment 1 Tomas Jelinek 2020-01-16 11:04:03 UTC
The error message comes form a system call for opening a file. To get this resolved, pcs would have to check for existence of /etc/booth specifically before it tries to write files in there.

Comment 4 RHEL Program Management 2021-07-16 07:30:42 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.

Comment 7 Tomas Jelinek 2021-11-26 11:48:14 UTC
This has been fixed upstream by community.

Upstream patch: https://github.com/ClusterLabs/pcs/commit/5e8e1b8aa4a2b98218a3dc09f619b5b089b590d1

[root@rh85-node1:~]# ls /etc/booth
ls: cannot access '/etc/booth': No such file or directory
[root@rh85-node1:~]# pcs booth setup sites 127.0.0.1 127.0.0.2 127.0.0.3
Error: Configuration directory for booth '/etc/booth' is missing. Is booth installed?
Error: Errors have occurred, therefore pcs is unable to continue
[root@rh85-node1:~]# pcs booth pull rh85-node2
Fetching booth config from node 'rh85-node2'...
Error: Configuration directory for booth '/etc/booth' is missing. Is booth installed?
Error: Errors have occurred, therefore pcs is unable to continue

Comment 10 Miroslav Lisik 2022-05-26 08:31:24 UTC
DevTestResults:

[root@r8-node-01 ~]# rpm -q pcs
pcs-0.10.13-1.el8.x86_64


### booth setup sites
[root@r8-node-01 ~]# rpm -q booth
package booth is not installed
[root@r8-node-01 ~]# test -d /etc/booth; echo $?
1

[root@r8-node-01 ~]# pcs booth setup sites 127.0.0.1 127.0.0.2 127.0.0.3
Error: Configuration directory for booth '/etc/booth' is missing. Is booth installed?
Error: Errors have occurred, therefore pcs is unable to continue

### booth pull

First, create booth config using command 'pcs booth setup sites' on the second node.

[root@r8-node-02 ~]# rpm -qa booth*
booth-site-1.0-199.1.ac1d34c.git.el8.noarch
booth-1.0-199.1.ac1d34c.git.el8.x86_64
booth-core-1.0-199.1.ac1d34c.git.el8.x86_64
[root@r8-node-02 ~]# ls -l /etc/booth
total 0
[root@r8-node-02 ~]# pcs booth setup sites 127.0.0.1 127.0.0.2 127.0.0.3
[root@r8-node-02 ~]# echo $?
0
[root@r8-node-02 ~]# ls -l /etc/booth
total 8
-rw-r--r--. 1 root      root     83 May 24 18:05 booth.conf
-rw-------. 1 hacluster haclient 64 May 24 18:05 booth.key
[root@r8-node-02 ~]# pcs booth config
authfile = /etc/booth/booth.key
site = 127.0.0.1
site = 127.0.0.2
site = 127.0.0.3

Try to pull booth config from the second node on the first node where /etc/booth directory is missing

[root@r8-node-01 ~]# pcs booth pull r8-node-02
Fetching booth config from node 'r8-node-02'...
Error: Configuration directory for booth '/etc/booth' is missing. Is booth installed?
Error: Errors have occurred, therefore pcs is unable to continue

Comment 21 Tomas Jelinek 2022-07-19 11:14:01 UTC
Additional patch to fix the error message in 'pcs booth sync': https://github.com/ClusterLabs/pcs/commit/2745088dd993b2d213ef309fbbe98c6e777cee84

Comment 23 Miroslav Lisik 2022-07-29 09:10:31 UTC
[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 ~]# test -d /etc/booth;  echo $?
0
[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-02 ~]# test -d /etc/booth; echo $?
1

[root@r8-node-01 ~]# pcs booth sync
Sending booth configuration to cluster nodes...
r8-node-01: Booth config saved
Error: r8-node-02: Unable to save booth configuration: Configuration directory for booth '/etc/booth' is missing. Is booth installed?, use --skip-offline to override
Error: Errors have occurred, therefore pcs is unable to continue

Comment 27 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.