Shubhendu Tripathi has uploaded a new change for review. Change subject: gluster: Show host name also on action on services ......................................................................
gluster: Show host name also on action on services Earlier the event log message shown in case of start/stop/restart of services was shown in the format "SWIFT services started on cluster <clustername>." Corrected the same to show host name as well in the form "SWIFT services started on <hostname> on cluster <clustername>". Change-Id: Ic840e8e20a28e31ba79ee17eabf201fe3941ce7d Bug-Url: https://bugzilla.redhat.com/973528 Signed-off-by: Shubhendu Tripathi <shtri...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommand.java M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/constants/gluster/GlusterConstants.java M backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties 3 files changed, 13 insertions(+), 17 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/18/15718/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommand.java index 45d8a2e..c9b6c60 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/gluster/ManageGlusterServiceCommand.java @@ -69,10 +69,11 @@ this.serverId = params.getServerId(); this.serviceType = params.getServiceType(); this.actionType = params.getActionType(); + if (serverId != null) { + setVdsId(serverId); + } if (clusterId != null) { setVdsGroupId(clusterId); - } else if (serverId != null) { - setVdsId(serverId); } } @@ -230,12 +231,11 @@ @Override public Map<String, String> getCustomValues() { + if (serverId != null) { + addCustomValue(GlusterConstants.SERVER, getVdsName()); + } if (clusterId != null) { - addCustomValue(GlusterConstants.SERVICE_GROUP_TYPE, GlusterConstants.SERVICE_GROUP_TYPE_CLUSTER); - addCustomValue(GlusterConstants.SERVICE_GROUP_NAME, getVdsGroupName()); - } else if (serverId != null) { - addCustomValue(GlusterConstants.SERVICE_GROUP_TYPE, GlusterConstants.SERVICE_GROUP_TYPE_SERVER); - addCustomValue(GlusterConstants.SERVICE_GROUP_NAME, getVdsName()); + addCustomValue(GlusterConstants.CLUSTER, getVdsGroupName()); } return super.getCustomValues(); diff --git a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/constants/gluster/GlusterConstants.java b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/constants/gluster/GlusterConstants.java index 2c29aad..ef77860 100644 --- a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/constants/gluster/GlusterConstants.java +++ b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/constants/gluster/GlusterConstants.java @@ -28,10 +28,6 @@ public static final String SERVICE_NAME = "servicename"; public static final String SERVER = "server"; public static final String SERVICE = "service"; - public static final String SERVICE_GROUP_TYPE = "ServiceGroupType"; - public static final String SERVICE_GROUP_NAME = "ServiceGroupName"; - public static final String SERVICE_GROUP_TYPE_CLUSTER = "cluster"; - public static final String SERVICE_GROUP_TYPE_SERVER = "server"; public static final String MANAGE_GLUSTER_SERVICE_ACTION_TYPE_START = "start"; public static final String MANAGE_GLUSTER_SERVICE_ACTION_TYPE_STOP = "stop"; public static final String MANAGE_GLUSTER_SERVICE_ACTION_TYPE_RESTART = "restart"; diff --git a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties index 772ea2e..d6992c7 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties @@ -626,10 +626,10 @@ GLUSTER_HOOK_REMOVE_FAILED=Failed to remove Gluster Hook ${GlusterHookName} from cluster ${VdsGroupName}. ${FailureMessage} GLUSTER_HOOK_REFRESH=Refreshed gluster hooks in Cluster ${VdsGroupName}. GLUSTER_HOOK_REFRESH_FAILED=Failed to refresh gluster hooks in Cluster ${VdsGroupName}. -GLUSTER_SERVICE_STARTED=SWIFT services started on ${ServiceGroupType} ${ServiceGroupName}. -GLUSTER_SERVICE_START_FAILED=Could not start SWIFT services on ${ServiceGroupType} ${ServiceGroupName}. -GLUSTER_SERVICE_STOPPED=SWIFT services stopped on ${ServiceGroupType} ${ServiceGroupName}. -GLUSTER_SERVICE_STOP_FAILED=Could not stop SWIFT services on ${ServiceGroupType} ${ServiceGroupName}. +GLUSTER_SERVICE_STARTED=SWIFT services started on host [${server}] on cluster [${cluster}]. +GLUSTER_SERVICE_START_FAILED=Could not start SWIFT services on host [${server}] on cluster [${cluster}]. +GLUSTER_SERVICE_STOPPED=SWIFT services stopped on host [${server}] on cluster [${cluster}]. +GLUSTER_SERVICE_STOP_FAILED=Could not stop SWIFT services on host [${server}] on cluster [${cluster}]. GLUSTER_SERVICES_LIST_NOT_FETCHED=Could not fetch list of services from ${ServiceGroupType} named ${ServiceGroupName}. -GLUSTER_SERVICE_RESTARTED=SWIFT services re-started on ${ServiceGroupType} ${ServiceGroupName}. -GLUSTER_SERVICE_RESTART_FAILED=Could not re-start SWIF services on ${ServiceGroupType} ${ServiceGroupName}. +GLUSTER_SERVICE_RESTARTED=SWIFT services re-started on host [${server}] on cluster [${cluster}]. +GLUSTER_SERVICE_RESTART_FAILED=Could not re-start SWIF services on host [${server}] on cluster [${cluster}]. -- To view, visit http://gerrit.ovirt.org/15718 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic840e8e20a28e31ba79ee17eabf201fe3941ce7d Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shubhendu Tripathi <shtri...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches