anmolbabu has posted comments on this change.

Change subject: engine : bll command to set geo-rep config
......................................................................


Patch Set 7:

(4 comments)

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

Line 20: 
Line 21:     @Override
Line 22:     protected void executeCommand() {
Line 23:         GlusterGeoRepSession session = getGeoRepSession();
Line 24:         VDSReturnValue returnValue = 
runVdsCommand(VDSCommandType.SetGlusterVolumeGeoRepConfigDefault, new 
GlusterVolumeGeoRepConfigVdsParameters(upServer.getId(), 
session.getMasterVolumeName(), session.getSlaveHostName(), 
session.getSlaveVolumeName(), getParameters().getConfigKey()));
> Format this please
Done
Line 25:         setSucceeded(returnValue.getSucceeded());
Line 26:         if(!getSucceeded()) {
Line 27:             
handleVdsError(AuditLogType.GLUSTER_GEOREP_CONFIG_SET_DEFAULT_FAILED, 
returnValue.getVdsError().getMessage());
Line 28:             return;


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

Line 22:     protected boolean canDoAction() {
Line 23:         boolean canDoAction = super.canDoAction();
Line 24:         if(!canDoAction ) {
Line 25:             addCanDoActionMessage(VdcBllMessages.VAR__ACTION__SET);
Line 26:             
addCanDoActionMessage(VdcBllMessages.VAR__TYPE__GLUSTER_GEOREP_CONFIG);
> ??
Done
Line 27:         }
Line 28:         return canDoAction;
Line 29:     }
Line 30: 


Line 38: 
Line 39:     @Override
Line 40:     protected void executeCommand() {
Line 41:         GlusterGeoRepSession session = getGeoRepSession();
Line 42:         VDSReturnValue returnValue = 
runVdsCommand(VDSCommandType.SetGlusterVolumeGeoRepConfig, new 
GlusterVolumeGeoRepConfigVdsParameters(upServer.getId(), 
session.getMasterVolumeName(), session.getSlaveHostName(), 
session.getSlaveVolumeName(), getParameters().getConfigKey(), 
getParameters().getConfigValue()));
> format
Done
Line 43:         setSucceeded(returnValue.getSucceeded());
Line 44:         if(!getSucceeded()) {
Line 45:             
handleVdsError(AuditLogType.GLUSTER_GEOREP_CONFIG_SET_FAILED, 
returnValue.getVdsError().getMessage());
Line 46:             return;


http://gerrit.ovirt.org/#/c/35999/7/packaging/dbscripts/upgrade/03_06_0370_gluster_georep_tables.sql
File packaging/dbscripts/upgrade/03_06_0370_gluster_georep_tables.sql:

Line 19: CREATE TABLE gluster_georep_config
Line 20: (
Line 21:     session_id UUID NOT NULL,
Line 22:     config_key VARCHAR(450),
Line 23:     config_value VARCHAR(450),
> You cannot change an existing script. Please add a new script altering tabl
there are config values like 

{'description': 
'/var/lib/glusterd/geo-replication/geo-rep-master_10.70.43.151_geo-rep-slave/ssh%3A%2F%2Froot%4010.70.43.151%3Agluster%3A%2F%2F127.0.0.1%3Ageo-rep-slave-detail.status',
'optionName': 'state_detail_file'},

which is 165 chars long calculated using 
http://www.string-functions.com/length.aspx 
:D

And I think this kind of paths can be user defined as well.And yes I didn't 
find a key with a length greater than 50 chars. So, I'll undo that and also 
introduce a new script for varying the config_value length
Line 24:     _update_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT 
LOCALTIMESTAMP,
Line 25:     CONSTRAINT pk_gluster_georep_config PRIMARY KEY(session_id, 
config_key)
Line 26: ) WITH OIDS;
Line 27: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I4d98636a688f9565dff0c86c8820839cb99b1a38
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: anmolbabu <anb...@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: anmolbabu <anb...@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