Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1381569 - 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 6
Classification: Red Hat
Component: clufter
Version: 6.8
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Jan Pokorný [poki]
QA Contact:
Depends On: 1367536
TreeView+ depends on / blocked
Reported: 2016-10-04 12:58 UTC by Miroslav Lisik
Modified: 2017-03-21 11:07 UTC (History)
2 users (show)

Fixed In Version: clufter-0.59.7-1.el6
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1381522
Last Closed: 2017-03-21 11:07:29 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0716 normal SHIPPED_LIVE clufter bug fix update 2017-03-21 12:41:28 UTC

Description Miroslav Lisik 2016-10-04 12:58:26 UTC
This bug exists currently in upstream and need to be verified also in upcoming RHEL6 release.

+++ This bug was initially created as a clone of Bug #1381522 +++

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=""
Setting fence-virt-024 on
[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=""
Setting fence-virt-027 on
[root@virt-024 ~]# pcs alert create path=/path/to/file id=alert-1
[root@virt-024 ~]# pcs alert recipient add alert-1 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 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 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 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 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 id=recipient-1

Comment 3 Jan Pokorný [poki] 2016-10-20 20:46:13 UTC
Fixed upstream:

RHEL 6.9 should receive the bug fix via rebase: [bug 1367536].

Comment 7 errata-xmlrpc 2017-03-21 11:07:29 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.