Bug 1304421 - [RFE] Calamari should emit event when there is a change in mon leader state.
[RFE] Calamari should emit event when there is a change in mon leader state.
Product: Red Hat Ceph Storage
Classification: Red Hat
Component: Calamari (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: 2.0
Assigned To: Gregory Meno
Harish NV Rao
Depends On:
Blocks: 1291304 1343229
  Show dependency treegraph
Reported: 2016-02-03 09:47 EST by Darshan
Modified: 2017-02-17 14:51 EST (History)
7 users (show)

See Also:
Fixed In Version: calamari-server-1.4.1-1.el7cp
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-08-23 15:29:52 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 2934151 None None None 2017-02-17 14:51 EST
Red Hat Product Errata RHBA-2016:1755 normal SHIPPED_LIVE Red Hat Ceph Storage 2.0 bug fix and enhancement update 2016-08-23 19:23:52 EDT

  None (edit)
Description Darshan 2016-02-03 09:47:04 EST
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:

Actual results:

Expected results:

Additional info:
Comment 4 Gregory Meno 2016-04-28 01:02:49 EDT
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 04:15:09 EDT
Any update on this issue ?
Comment 8 Darshan 2016-06-08 02:22:57 EDT
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 13 Darshan 2016-06-20 02:40:13 EDT
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 Gregory Meno 2016-06-20 14:05:56 EDT
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 15:29:52 EDT
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.