diff options
author | Aravinda VK <avishwan@redhat.com> | 2016-10-12 23:32:39 +0530 |
---|---|---|
committer | Aravinda VK <avishwan@redhat.com> | 2016-10-19 23:50:24 -0700 |
commit | 4b496a1465924a72826a9e8c525feff9222d92e4 (patch) | |
tree | 741453ffc6c61132f2f0249e5bc342b307a7924b /geo-replication/syncdaemon/resource.py | |
parent | 094f95692977e79cb262e3a59410b2e68cae13c2 (diff) |
geo-rep/eventsapi: Additional Events
Added following events
EVENT_GEOREP_ACTIVE
{
"nodeid": NODEID,
"ts": TIMESTAMP,
"event": "GEOREP_ACTIVE",
"message": {
"master_volume": MASTER_VOLUME_NAME,
"slave_host": SLAVE_HOST,
"slave_volume": SLAVE_VOLUME,
"brick_path": BRICK_PATH
}
}
EVENT_GEOREP_PASSIVE
{
"nodeid": NODEID,
"ts": TIMESTAMP,
"event": "GEOREP_PASSIVE",
"message": {
"master_volume": MASTER_VOLUME_NAME,
"slave_host": SLAVE_HOST,
"slave_volume": SLAVE_VOLUME,
"brick_path": BRICK_PATH
}
}
EVENT_GEOREP_CHECKPOINT_COMPLETED
{
"nodeid": NODEID,
"ts": TIMESTAMP,
"event": "GEOREP_ACTIVE",
"message": {
"master_volume": MASTER_VOLUME_NAME,
"slave_host": SLAVE_HOST,
"slave_volume": SLAVE_VOLUME,
"brick_path": BRICK_PATH,
"checkpoint_time": CHECKPOINT_TIME,
"checkpoint_completion_time": CHECKPOINT_COMPLETION_TIME
}
}
> Reviewed-on: http://review.gluster.org/15630
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Kotresh HR <khiremat@redhat.com>
> Tested-by: Kotresh HR <khiremat@redhat.com>
BUG: 1386178
Change-Id: I90716175868c59dd65c8d202e73e0ede90347b6a
Signed-off-by: Aravinda VK <avishwan@redhat.com>
(cherry picked from commit 3830b48b6a46854d6597a36b6f2089ac1e486eb5)
Reviewed-on: http://review.gluster.org/15672
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Diffstat (limited to 'geo-replication/syncdaemon/resource.py')
-rw-r--r-- | geo-replication/syncdaemon/resource.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py index 9dd8988dc6d..0b756b750e7 100644 --- a/geo-replication/syncdaemon/resource.py +++ b/geo-replication/syncdaemon/resource.py @@ -40,7 +40,7 @@ from syncdutils import ChangelogException, ChangelogHistoryNotAvailable from syncdutils import get_changelog_log_level from syncdutils import CHANGELOG_AGENT_CLIENT_VERSION from gsyncdstatus import GeorepStatus - +from syncdutils import get_master_and_slave_data_from_args UrlRX = re.compile('\A(\w+)://([^ *?[]*)\Z') HostRX = re.compile('[a-zA-Z\d](?:[a-zA-Z\d.-]*[a-zA-Z\d])?', re.I) @@ -1541,7 +1541,10 @@ class GLUSTER(AbstractUrl, SlaveLocal, SlaveRemote): changelog_register_failed = False (inf, ouf, ra, wa) = gconf.rpc_fd.split(',') changelog_agent = RepceClient(int(inf), int(ouf)) - status = GeorepStatus(gconf.state_file, gconf.local_path) + master_name, slave_data = get_master_and_slave_data_from_args( + sys.argv) + status = GeorepStatus(gconf.state_file, gconf.local_path, + master_name, slave_data) status.reset_on_worker_start() rv = changelog_agent.version() if int(rv) != CHANGELOG_AGENT_CLIENT_VERSION: |