Bug 1304421

Summary: [RFE] Calamari should emit event when there is a change in mon leader state.
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Darshan <dnarayan>
Component: CalamariAssignee: Christina Meno <gmeno>
Calamari sub component: Back-end QA Contact: Harish NV Rao <hnallurv>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: unspecified CC: ceph-eng-bugs, flucifre, gmeno, hnallurv, jquinn, kdreyer, poelstra
Version: 1.3.1   
Target Milestone: rc   
Target Release: 2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: calamari-server-1.4.1-1.el7cp Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-23 19:29:52 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:
Bug Depends On:    
Bug Blocks: 1291304, 1343229    

Description Darshan 2016-02-03 14:47:04 UTC
Description of problem:
Calamari should emit an event when there is a change in mon leader ie whenever a new leader is elected, with all relevant info.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 Christina Meno 2016-04-28 05:02:49 UTC
curl https://chacra.ceph.com/r/calamari/1.4.0-rc8/centos/7/x86_64/calamari-server-1.4.0-rc8_6_g3050509.el7.centos.x86_64.rpm

cd /etc/yum.repos.d && sudo curl \
            http://puddle.ceph.redhat.com/puddles/rhscon/2/latest/RHSCON-2.repo -O

sudo yum install supervisor python-zmq python-msgpack

sudo rpm -ivh --nodeps calamari-server-1.4.0-rc8_6_g3050509.el7.centos.x86_64.rpm 

sudo calamari-ctl initialize # expected to emit an ERROR, ignore for now

# edit /etc/calamari/calamari.conf to enable the salt events
emit_events_to_salt_event_bus = True

sudo supervisorctl restart all

now if you've connected the salt-minion to the master you should be able to see events happen by running this:
sudo salt-run state.event pretty=True

on the salt-master


# you may need to allow the firewall to open up ports 4505 and 4506 on the salt-master node

Comment 7 Darshan 2016-06-03 08:15:09 UTC
Any update on this issue ?

Comment 8 Darshan 2016-06-08 06:22:57 UTC
I tried this with a cluster having 3 monitors. I brought down the leader monitor. But I did not see any event for leader change.

Additional info:
In a discussion with gregory, he had mentioned that a small change would be needed to fix this.

Comment 11 Christina Meno 2016-06-14 16:28:18 UTC
https://github.com/ceph/calamari/releases/tag/v1.4.1

Comment 13 Darshan 2016-06-20 06:40:13 UTC
The fix works as expected. I tried this with a cluster having 3 monitors. I brought down the leader monitor and was able to see an event in salt-bus as follows:

 {'_stamp': '2016-06-20T05:50:53.983588', 'pretag': None, 'cmd': '_minion_event', 'tag': 'calamari/ceph/mon/leaderChanged', 'data': {'message': "Mon 'clusterOne.xxxxxx-xxx' now quorum leader  (on xxxxxx-xxx.xxx.xxx.xxx.xxxxx.xxx)", 'severity': 'INFO', 'tags': {'fqdn': 'xxx.xxx.xxx.xxx.xxx', 'fsid': '6805675e-efdc-40ee-9ca2-820698b6b0c1'}}, 'id': 'xxx.xxx.xxx.xxx.xxx'}

Marking it as verified.

Comment 14 Christina Meno 2016-06-20 18:05:56 UTC
Bara Please omit it from release notes see https://bugzilla.redhat.com/show_bug.cgi?id=1303928#c8

Comment 17 errata-xmlrpc 2016-08-23 19:29:52 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.

https://access.redhat.com/errata/RHBA-2016:1755