Shireesh Anjal has posted comments on this change.

Change subject: engine: Refresh gluster data periodically
......................................................................


Patch Set 20: (10 inline comments)

Thanks Allon for catching some good ones! Responses to comments inline. I'm 
sending another patch-set incorporating most of the comments.

....................................................
File backend/manager/dbscripts/network_sp.sql
Line 310:    AS $procedure$
Line 311: BEGIN
Line 312:    RETURN QUERY SELECT i.*
Line 313:    FROM vds_interface_view i,
Line 314:               vds_static v
Done
Line 315:    WHERE i.addr = v_addr
Line 316:    AND   v.vds_group_id = v_cluster_id
Line 317:    AND   i.vds_id = v.vds_id;
Line 318: 


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterManager.java
Line 69:  */
Line 70: public class GlusterManager {
Line 71:     private static final String ENTITY_BRICK = "brick";
Line 72:     private static final String ENTITY_OPTION = "option";
Line 73:     private static GlusterManager instance = new GlusterManager();
Done
Line 74:     private static Log log = LogFactory.getLog(GlusterManager.class);
Line 75:     private static final int GLUSTER_REFRESH_RATE_LIGHT =
Line 76:             Config.<Integer> 
GetValue(ConfigValues.GlusterRefreshRateLight);
Line 77:     private static final int GLUSTER_REFRESH_RATE_HEAVY =


Line 70: public class GlusterManager {
Line 71:     private static final String ENTITY_BRICK = "brick";
Line 72:     private static final String ENTITY_OPTION = "option";
Line 73:     private static GlusterManager instance = new GlusterManager();
Line 74:     private static Log log = LogFactory.getLog(GlusterManager.class);
Done
Line 75:     private static final int GLUSTER_REFRESH_RATE_LIGHT =
Line 76:             Config.<Integer> 
GetValue(ConfigValues.GlusterRefreshRateLight);
Line 77:     private static final int GLUSTER_REFRESH_RATE_HEAVY =
Line 78:             Config.<Integer> 
GetValue(ConfigValues.GlusterRefreshRateHeavy);


Line 72:     private static final String ENTITY_OPTION = "option";
Line 73:     private static GlusterManager instance = new GlusterManager();
Line 74:     private static Log log = LogFactory.getLog(GlusterManager.class);
Line 75:     private static final int GLUSTER_REFRESH_RATE_LIGHT =
Line 76:             Config.<Integer> 
GetValue(ConfigValues.GlusterRefreshRateLight);
I'm not sure I understand this - could you please elaborate?
Line 77:     private static final int GLUSTER_REFRESH_RATE_HEAVY =
Line 78:             Config.<Integer> 
GetValue(ConfigValues.GlusterRefreshRateHeavy);
Line 79: 
Line 80:     private GlusterManager() {


Line 318:      * @return
Line 319:      */
Line 320:     private Set<GlusterServerInfo> fetchServers(VDS upServer, 
List<VDS> existingServers) {
Line 321:         Set<GlusterServerInfo> fetchedServers = null;
Line 322:         while (fetchedServers == null && existingServers.size() > 0) {
Done
Line 323:             fetchedServers = fetchServers(upServer);
Line 324:             if (fetchedServers == null) {
Line 325:                 logServerMessage(upServer, 
AuditLogType.GLUSTER_SERVERS_LIST_FAILED);
Line 326:                 // Couldn't fetch servers from the up server. Mark it 
as non-operational


Line 409:     protected Map<String, GlusterVolumeEntity> fetchVolumes(VDS 
upServer) {
Line 410:         VDSReturnValue result =
Line 411:                 Backend.getInstance()
Line 412:                         .getResourceManager()
Line 413:                         
.RunVdsCommand(VDSCommandType.GlusterVolumesList,
Done
Line 414:                                 new 
GlusterVolumesListVDSParameters(upServer.getId(), upServer.getvds_group_id()));
Line 415: 
Line 416:         return result.getSucceeded() ? (Map<String, 
GlusterVolumeEntity>) result.getReturnValue() : null;
Line 417:     }


....................................................
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/gluster/GlusterManagerTest.java
Line 152:     private List<Guid> addedBrickIds = new ArrayList<Guid>();
Line 153:     private List<GlusterBrickEntity> bricksWithChangedStatus = new 
ArrayList<GlusterBrickEntity>();
Line 154: 
Line 155:     @Before
Line 156:     public void setUp() throws Exception {
Done
Line 157:         createObjects();
Line 158:     }
Line 159: 
Line 160:     private void mockConfig() {


Line 156:     public void setUp() throws Exception {
Line 157:         createObjects();
Line 158:     }
Line 159: 
Line 160:     private void mockConfig() {
Done
Line 161:         mcr.mockConfigValue(ConfigValues.GlusterRefreshRateLight, 5);
Line 162:         mcr.mockConfigValue(ConfigValues.GlusterRefreshRateHeavy, 
300);
Line 163:     }
Line 164: 


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/NonOperationalReason.java
Line 13:     VERSION_INCOMPATIBLE_WITH_CLUSTER(5),
Line 14:     KVM_NOT_RUNNING(6),
Line 15:     TIMEOUT_RECOVERING_FROM_CRASH(7),
Line 16:     VM_NETWORK_IS_BRIDGELESS(8),
Line 17:     GLUSTER_COMMAND_FAILED(9),
I've started doing this after it was discussed on engine-devel in the thread 
http://lists.ovirt.org/pipermail/engine-devel/2012-April/001315.html
Line 18:     ;
Line 19: 
Line 20:     private final int value;
Line 21: 


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/vdscommands/VDSCommandType.java
Line 138:     GlusterHostRemove("org.ovirt.engine.core.vdsbroker.gluster"),
Line 139:     GlusterHostAdd("org.ovirt.engine.core.vdsbroker.gluster"),
Line 140:     GlusterServersList("org.ovirt.engine.core.vdsbroker.gluster"),
Line 141:     
GetGlusterVolumeAdvancedDetails("org.ovirt.engine.core.vdsbroker.gluster"),
Line 142:     GlusterVolumesList("org.ovirt.engine.core.vdsbroker.gluster"),
yes, intentional based on 
http://lists.ovirt.org/pipermail/engine-devel/2012-April/001315.html
Line 143:     ;
Line 144: 
Line 145:     String packageName;
Line 146: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I6b61eb6e93105e46e2706eac1d94bc10717224c2
Gerrit-PatchSet: 20
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shireesh Anjal <san...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Shireesh Anjal <san...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to