Sahina Bose has posted comments on this change.
Change subject: gluster: Host detach case sync message corrected
......................................................................
Patch Set 1: (3 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/GlusterSyncJob.java
Line 138: if (isRemovableStatus(server.getStatus()) &&
serverDetached(server, fetchedServers)) {
Line 139: log.debugFormat("Server {0} has been removed directly
using the gluster CLI. Removing it from engine as well.",
Line 140: server.getName());
Line 141: logUtil.logServerMessage(server,
AuditLogType.GLUSTER_SERVER_REMOVED_FROM_CLI);
Line 142: logUtil.logAuditMessage(server.getVdsGroupId(), null,
server,
logServerMessage internally calls logAuditMessage. So in effect, you would be
calling this twice.
I think the fix should be in GlusterAuditLogUtil - in logAuditMessage, if
server is passed, server.getVdsGroupId can be used to setVdsGroupId in
AuditLogableBase
Line 143: AuditLogType.GLUSTER_SERVER_REMOVED_FROM_CLI,
Line 144: new HashMap<String, String>() {
Line 145: {
Line 146: put(GlusterConstants.VDS_GROUP_NAME,
server.getVdsGroupName());
Line 140: server.getName());
Line 141: logUtil.logServerMessage(server,
AuditLogType.GLUSTER_SERVER_REMOVED_FROM_CLI);
Line 142: logUtil.logAuditMessage(server.getVdsGroupId(), null,
server,
Line 143: AuditLogType.GLUSTER_SERVER_REMOVED_FROM_CLI,
Line 144: new HashMap<String, String>() {
This is for custom properties. getVdsGroupName is already available in
AuditLogableBase
Line 145: {
Line 146: put(GlusterConstants.VDS_GROUP_NAME,
server.getVdsGroupName());
Line 147: }
Line 148: });
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/constants/gluster/GlusterConstants.java
Line 24: public static final String OPTION_NEW_VALUE = "newvalue";
Line 25: public static final String OLD_STATUS = "oldstatus";
Line 26: public static final String NEW_STATUS = "newstatus";
Line 27: public static final String SERVICE_TYPE = "servicetype";
Line 28: public static final String SERVICE_NAME = "servicename";
Based on comments in GlusterSyncJob, this will not be required.
Line 29: public static final String VDS_GROUP_NAME = "VdsGroupName";
Line 30:
Line 31: public static final String HOOK_NAME = "glusterhookname";
Line 32: public static final String FAILURE_MESSAGE = "failuremessage";
--
To view, visit http://gerrit.ovirt.org/15177
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2858ded9cfac2dc6df03928b90469876878aa94d
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Shubhendu Tripathi <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches