Shireesh Anjal has posted comments on this change.
Change subject: engine:Sync gluster hooks
......................................................................
Patch Set 6: Looks good to me, but someone else must approve
(3 inline comments)
Few minor comments in-line. Needs +1 from Eli for DB scripts.
....................................................
File backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql
Line 137: select fn_db_add_config_value('GlusterHooksEnabled', 'false', '3.0');
Line 138: select fn_db_add_config_value('GlusterHooksEnabled', 'false', '3.1');
Line 139: select fn_db_add_config_value('GlusterRefreshHeavyWeight', 'false',
'3.0');
Line 140: select fn_db_add_config_value('GlusterRefreshHeavyWeight', 'false',
'3.1');
Line 141: select fn_db_add_config_value('GlusterRefreshRateHooks', '600',
'general');
The value for hooks refresh rate can be more - say 2 hours (7200) ?
Line 142: select fn_db_add_config_value('GlusterRefreshRateLight', '5',
'general');
Line 143: select fn_db_add_config_value('GlusterRefreshRateHeavy', '300',
'general');
Line 144: select fn_db_add_config_value('GlusterSupport', 'false', '3.0');
Line 145: select
fn_db_add_config_value('GlusterVolumeOptionGroupVirtValue','virt','general');
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterHookSyncJob.java
Line 149: if (newHook == null) {
Line 150: newHook = fetchedHook;
Line 151: newHook.setClusterId(clusterId);
Line 152: newHook.setId(Guid.NewGuid());
Line 153: log.infoFormat("Adding new hook {0} in server
{1} ", key,server);
Maybe the log message can be changed similar to the audit log message?
Line 154: logMessage(clusterId, key,
AuditLogType.GLUSTER_HOOK_ADDED);
Line 155: //for new hook we need to fetch content as
well -TBD: in another patch
Line 156:
existingHookServersMap.put(newHook.getId(),new HashSet<VDS>());
Line 157: }
Line 197:
missingServerHook.setStatus(GlusterHookStatus.MISSING);
Line 198:
getHooksDao().saveOrUpdateGlusterServerHook(missingServerHook);
Line 199: }
Line 200: GlusterHookEntity hookEntity =
getHooksDao().getById(hookId);
Line 201: if (existingHookMap.get(hookEntity.getHookKey()) != null) {
A comment here would help understand the code better :)
Line 202: hookEntity =
existingHookMap.get(hookEntity.getHookKey());
Line 203: }
Line 204: hookEntity.addMissingConflict();
Line 205: existingHookMap.put(hookEntity.getHookKey(), hookEntity);
--
To view, visit http://gerrit.ovirt.org/13943
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2766edd4e810677a200cf5c45d334cabef5f2924
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sahina Bose <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches