Ramesh N has uploaded a new change for review.

Change subject: gluster: mark brick as down when port is N/A & TCP is enabled
......................................................................

gluster: mark brick as down when port is N/A & TCP is enabled

  Currently bricks are getting marked as down when Port is 'N/A'.
This is valid because when glusterd restarts some bricks may not signin
with the glusterd process and results in glusterd not knowing the port
of the brick. In this case, old clients will still work and can connect
to the brick, but new client won't be able to connect to the brick.
So it make sense to mark the brick as down.

 Recently gluster has added support for RDMA and volume can be
created with only RDMA transport. So, if TCP transport is not
enabled then value for brick port will be 'N/A' and we should
not mark the brick as down in this case.

Change-Id: I957b5be043b60cc08bd3b0bba0426ccbf23f91ef
Bug-Url: https://bugzilla.redhat.com/1194150
Signed-off-by: Ramesh Nachimuthu <[email protected]>
---
M 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeStatusReturnForXmlRpc.java
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/41/37941/1

diff --git 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeStatusReturnForXmlRpc.java
 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeStatusReturnForXmlRpc.java
index 187d3f3..35d21e1 100644
--- 
a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeStatusReturnForXmlRpc.java
+++ 
b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/gluster/GlusterVolumeStatusReturnForXmlRpc.java
@@ -20,6 +20,7 @@
 import org.ovirt.engine.core.common.businessentities.gluster.MemoryStatus;
 import org.ovirt.engine.core.common.businessentities.gluster.Mempool;
 import org.ovirt.engine.core.common.businessentities.gluster.ServiceType;
+import org.ovirt.engine.core.common.businessentities.gluster.TransportType;
 import org.ovirt.engine.core.common.utils.gluster.GlusterCoreUtil;
 import org.ovirt.engine.core.compat.Guid;
 import org.ovirt.engine.core.dal.dbbroker.DbFacade;
@@ -205,7 +206,7 @@
                 if (brick.containsKey(PORT)) {
                     if (StringUtils.isNumeric((String)brick.get(PORT))) {
                         brickProperties.setPort(Integer.parseInt((String) 
brick.get(PORT)));
-                    } else {
+                    } else if 
(volume.getTransportTypes().contains(TransportType.TCP)) {
                         //if there's no port registered, then the brick status 
is down.
                         brickProperties.setStatus(GlusterStatus.DOWN);
                     }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I957b5be043b60cc08bd3b0bba0426ccbf23f91ef
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ramesh N <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to