Bug 1381569

Summary: missing option '-f <file>' and parameter 'value=<recipient-value>' in generated pcs alert commands
Product: Red Hat Enterprise Linux 6 Reporter: Miroslav Lisik <mlisik>
Component: clufterAssignee: Jan Pokorný [poki] <jpokorny>
Status: CLOSED ERRATA QA Contact: cluster-qe <cluster-qe>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.8CC: cluster-qe, jpokorny
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: clufter-0.59.7-1.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1381522 Environment:
Last Closed: 2017-03-21 11:07:29 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:
Bug Depends On: 1367536    
Bug Blocks:    

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="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@example.com 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@example.com 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@example.com 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@example.com 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.