Shahar Havivi has uploaded a new change for review. Change subject: Set default sync time between hosts to 100ms ......................................................................
Set default sync time between hosts to 100ms With the new RFE for reporting the actual downtime that a VM was down (ie not accessible for the user) during migration we need to note if the hosts clock time is not in sync. Change-Id: Ie58904e8dae88f17412b884e4add17cca0b4fe9f Bug-Url: https://bugzilla.redhat.com/970711 Signed-off-by: Shahar Havivi <[email protected]> --- M backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java M packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql 3 files changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/05/38405/1 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 7c95877..b4beb1c 100644 --- a/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties +++ b/backend/manager/modules/dal/src/main/resources/bundles/AuditLogMessages.properties @@ -586,7 +586,7 @@ SYSTEM_VDS_RESTART=Host ${VdsName} was restarted by the engine. SYSTEM_FAILED_VDS_RESTART=A restart initiated by the engine to Host ${VdsName} has failed. FENCE_DISABLED_IN_CLUSTER_POLICY=Fencing is disabled in Fencing Policy of the Cluster ${VdsGroupName}, so HA VMs running on a non-responsive host will not be restarted elsewhere. -VDS_TIME_DRIFT_ALERT=Host ${VdsName} has time-drift of ${Actual} seconds while maximum configured value is ${Max} seconds. +VDS_TIME_DRIFT_ALERT=Host ${VdsName} has time-drift of ${Actual} milliseconds while maximum configured value is ${Max} milliseconds. PROXY_HOST_SELECTION=Host ${Proxy} from ${Origin} was chosen as a proxy to execute fencing on Host ${VdsName}. FENCE_OPERATION_STARTED=${Action} of Host ${VdsName} initiated. FENCE_OPERATION_SUCCEEDED=${Action} of Host ${VdsName} succeeded. diff --git a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java index 3c34396..c69ff22 100644 --- a/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java +++ b/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VdsBrokerObjectsBuilder.java @@ -15,7 +15,6 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.concurrent.TimeUnit; import org.apache.commons.lang.StringUtils; import org.ovirt.engine.core.bll.network.cluster.ManagementNetworkUtil; @@ -703,8 +702,7 @@ Integer maxTimeDriftAllowed = Config.getValue(ConfigValues.HostTimeDriftInSec); Date hostDate = AssignDatetimeValue(xmlRpcStruct, VdsProperties.hostDatetime); if (hostDate != null) { - Long timeDrift = - TimeUnit.MILLISECONDS.toSeconds(Math.abs(hostDate.getTime() - System.currentTimeMillis())); + Long timeDrift = Math.abs(hostDate.getTime() - System.currentTimeMillis()); if (timeDrift > maxTimeDriftAllowed) { AuditLogableBase logable = new AuditLogableBase(vds.getId()); logable.addCustomValue("Actual", timeDrift.toString()); diff --git a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql index a27d5b6..c34aa04 100644 --- a/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql +++ b/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql @@ -178,7 +178,7 @@ select fn_db_add_config_value('HighUtilizationForEvenlyDistribute','75','general'); select fn_db_add_config_value('HighUtilizationForPowerSave','75','general'); select fn_db_add_config_value('HostPreparingForMaintenanceIdleTime', '300', 'general'); -select fn_db_add_config_value('HostTimeDriftInSec','300','general'); +select fn_db_add_config_value('HostTimeDriftInSec','100','general'); select fn_db_add_config_value('HotPlugEnabled','false','3.0'); select fn_db_add_config_value_for_versions_up_to('HotPlugCpuSupported', '{"x86_64":"false","ppc64":"false"}', '3.3'); select fn_db_add_config_value_for_versions_up_to('HotPlugCpuSupported', '{"x86_64":"true","ppc64":"false"}', '3.6'); -- To view, visit https://gerrit.ovirt.org/38405 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie58904e8dae88f17412b884e4add17cca0b4fe9f Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
