Kanagaraj M has posted comments on this change.

Change subject: engine: Geo-rep monitoring
......................................................................


Patch Set 7:

(3 comments)

http://gerrit.ovirt.org/#/c/31976/7/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterGeoRepSyncJob.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterGeoRepSyncJob.java:

Line 58: 
Line 59:         List<GlusterGeoRepSession> sessions = 
getSessionsForCluster(cluster);
Line 60: 
Line 61:         if (sessions == null) {
Line 62:             log.debugFormat("No sessions returned for cluster {0} from 
CLI, nothing to do", cluster.getName());
What if the session was created from ui and deleted using cli?
Line 63:             return;
Line 64:         }
Line 65: 
Line 66:         //for each geo-rep session, find session in database and 
update details.


Line 84:      * This method updates the status depending on health of 
individual nodes
Line 85:      * @param session
Line 86:      */
Line 87:     private void updateGeoRepStatus(GlusterGeoRepSession session) {
Line 88:         GlusterVolumeEntity volume = 
getVolumeDao().getById(session.getMasterVolumeId());
masterVolume can be passed as argument
Line 89: 
Line 90:         List<HashMap<Guid, GeoRepSessionStatus>> list = new 
ArrayList<>();
Line 91:         //grouped node status
Line 92:         for (int i=0; i < volume.getBricks().size(); i= i + 
volume.getReplicaCount()) {


Line 100:             list.add(subVolumeStatusMap);
Line 101:         }
Line 102: 
Line 103:         session.setStatus(GeoRepSessionStatus.ACTIVE);
Line 104:         //iterate through grouped status to set consolidated status
below logic can be incorporated in the above loop itself?
Line 105:         for (HashMap<Guid, GeoRepSessionStatus> subVolumeStatusMap : 
list) {
Line 106:             if 
(subVolumeStatusMap.containsValue(GeoRepSessionStatus.ACTIVE)) {
Line 107:                 // healthy
Line 108:                 continue;


-- 
To view, visit http://gerrit.ovirt.org/31976
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3304addda17cf49eee93f311e043b0e15212cd91
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Kanagaraj M <kmayi...@redhat.com>
Gerrit-Reviewer: Ramesh N <rnach...@redhat.com>
Gerrit-Reviewer: Sahina Bose <sab...@redhat.com>
Gerrit-Reviewer: Shubhendu Tripathi <shtri...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to