Bug 1381522 - missing option '-f <file>' and parameter 'value=<recipient-value>' in generated pcs alert commands
Summary: missing option '-f <file>' and parameter 'value=<recipient-value>' in genera...
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: clufter
Version: 7.3
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Jan Pokorný [poki]
QA Contact: cluster-qe@redhat.com
Depends On: 1387424
TreeView+ depends on / blocked
Reported: 2016-10-04 11:09 UTC by Miroslav Lisik
Modified: 2017-08-01 23:06 UTC (History)
0 users

Fixed In Version: clufter-0.75.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1381569 (view as bug list)
Last Closed: 2017-08-01 23:06:21 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2198 0 normal SHIPPED_LIVE clufter bug fix and enhancement update 2017-08-01 19:41:26 UTC

Description Miroslav Lisik 2016-10-04 11:09:55 UTC
Description of problem:

The pcs commands for alert configuration (create and recipient add) are generated without option '-f <file>'. The pcs command for adding recipient (recipient add) has missing named parameter for recipient value 'value=<recipient-value>'.

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

How reproducible:

Steps to Reproduce:
1. Create cluster with alert configuration:

[root@virt-024 ~]# pcs cluster auth virt-0{24,27}
virt-024: Already authorized
virt-027: Already authorized
[root@virt-024 ~]# pcs cluster setup --start --name cluster virt-0{24,27}
Destroying cluster on nodes: virt-024, virt-027...
virt-024: Stopping Cluster (pacemaker)...
virt-027: Stopping Cluster (pacemaker)...
virt-024: Successfully destroyed cluster
virt-027: Successfully destroyed cluster

Sending cluster config files to the nodes...
virt-024: Succeeded
virt-027: Succeeded

Starting cluster on nodes: virt-024, virt-027...
virt-024: Starting Cluster...
virt-027: Starting Cluster...

Synchronizing pcsd certificates on nodes virt-024, virt-027...
virt-024: Success
virt-027: Success

Restarting pcsd on the nodes in order to reload the certificates...
virt-024: Success
virt-027: Success
[root@virt-024 ~]# pcs stonith create fence-virt-024 fence_xvm params pcmk_host_check="static-list" pcmk_host_list="virt-024" pcmk_host_map="virt-024:virt-024.cluster-qe.lab.eng.brq.redhat.com"
Setting fence-virt-024 on virt-024.cluster-qe.lab.eng.brq.redhat.com
[root@virt-024 ~]# pcs stonith create fence-virt-027 fence_xvm params pcmk_host_check="static-list" pcmk_host_list="virt-027" pcmk_host_map="virt-027:virt-027.cluster-qe.lab.eng.brq.redhat.com"
Setting fence-virt-027 on virt-027.cluster-qe.lab.eng.brq.redhat.com
[root@virt-024 ~]# pcs alert create path=/path/to/file id=alert-1
[root@virt-024 ~]# pcs alert recipient add alert-1 value=recipient id=recipient-1

2. Generate pcs commads by clufter for current cluster configuration:
[root@virt-024 ~]# clufter pcs2pcscmd --batch --quiet --silent --text-width=-1
# sequence generated on 2016-10-04 12:49:02 with: clufter 0.59.5
# invoked as: ['/usr/bin/clufter', 'pcs2pcscmd', '--batch', '--quiet', '--silent', '--text-width=-1']
# targeting system: ('linux', 'redhat', '7.3', 'Maipo')
pcs cluster auth virt-024 virt-027
for l in $( comm -12 \
  <( python -m json.tool /var/lib/pcsd/pcs_users.conf | sed -n 's|^\s*"[^"]\+":\s*"\([0-9a-f-]\+\)".*|\1|1p' | sort ) \
  <( python -m json.tool /var/lib/pcsd/tokens | sed -n 's|^\s*"[^"]\+":\s*"\([0-9a-f-]\+\)".*|\1|1p' | sort ) ) @SENTINEL@ ; do grep -Eq \
  "$( python -m json.tool /var/lib/pcsd/tokens | sed -n "s|^\s*\"\([^\"]\+\)\":\s*\"${l}\".*|\1|1p" )" - <<<' virt-024 virt-027' && break ; false ; done || { echo 'WARNING: cluster being created ought to include this very local machine' \
  ; read -p 'Do you want to continue [yN] (60s timeout): ' -t 60 || : ; test "${REPLY}" = y || kill -INT "$$" ; }
pcs cluster setup --name cluster virt-024 virt-027 --transport udpu
pcs cluster start --all --wait=60
pcs cluster cib tmp-cib.xml
pcs -f tmp-cib.xml stonith create fence-virt-024 fence_xvm pcmk_host_check=static-list pcmk_host_list=virt-024 pcmk_host_map=virt-024:virt-024.cluster-qe.lab.eng.brq.redhat.com op monitor id=fence-virt-024-monitor-interval-60s interval=60s name=monitor
pcs -f tmp-cib.xml stonith create fence-virt-027 fence_xvm pcmk_host_check=static-list pcmk_host_list=virt-027 pcmk_host_map=virt-027:virt-027.cluster-qe.lab.eng.brq.redhat.com op monitor id=fence-virt-027-monitor-interval-60s interval=60s name=monitor
pcs alert create path=/path/to/file id=alert-1
pcs alert recipient add alert-1 recipient id=recipient-1
pcs cluster cib-push tmp-cib.xml --config

Actual results:

pcs alert create path=/path/to/file id=alert-1
pcs alert recipient add alert-1 recipient id=recipient-1

Expected results:

pcs -f tmp-cib.xml alert create path=/path/to/file id=alert-1
pcs -f tmp-cib.xml alert recipient add alert-1 value=recipient id=recipient-1

Additional info:

Comment 2 Jan Pokorný [poki] 2016-10-20 20:30:57 UTC
Fixed upstream:

Comment 3 Jan Pokorný [poki] 2016-10-20 20:41:59 UTC
RHEL 7.4 should receive the bug fix via rebase: [bug 1387424].

Comment 6 errata-xmlrpc 2017-08-01 23:06:21 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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