diff --git a/xenmgr/Main.hs b/xenmgr/Main.hs index b7a4edf7..a33a6021 100644 --- a/xenmgr/Main.hs +++ b/xenmgr/Main.hs @@ -233,20 +233,13 @@ periodics xm_context rpccontext = -- The list of actions we run periodically actions = [ - (30000, checkStorage),(30000, void $ rpc rpccontext (hostMonitorIdleness xm_context) )-- every 30 secs checks amount of free space on storage partition and idle time of host + (30000, checkStorage)-- every 30 secs checks amount of free space on storage partition ] checkStorage = do rpc rpccontext hostCheckFreeStorage return () -hostMonitorIdleness :: XmContext -> Rpc () -hostMonitorIdleness xm_context = do - idle_time <- fromIntegral <$> inputGetIdleTime - idle_time_threshold <- appIdleTimeThreshold - when (idle_time_threshold /= 0 && idle_time >= idle_time_threshold ) $ - runXM xm_context hostSleep - exposeStuff :: XM () exposeStuff = do testingCtx <- liftIO $ testingCreateContext diff --git a/xenmgr/XenMgr/Config.hs b/xenmgr/XenMgr/Config.hs index 8afe5dcd..228c7597 100644 --- a/xenmgr/XenMgr/Config.hs +++ b/xenmgr/XenMgr/Config.hs @@ -27,7 +27,6 @@ module XenMgr.Config , appSvmAutoStartDelay , appOverwriteServiceVmSettings , appXcDiagTimeout - , appIdleTimeThreshold , appArgoHostsFile , appMultiGpuPt , appSeamlessTrafficDefault @@ -43,7 +42,6 @@ module XenMgr.Config , appSetSvmAutoStartDelay , appSetOverwriteServiceVmSettings , appSetXcDiagTimeout - , appSetIdleTimeThreshold , appSetArgoHostsFile , appSetPlatformCryptoKeyDirs , appConfigurableSaveChangesAcrossReboots @@ -169,15 +167,6 @@ appXcDiagTimeout = appSetXcDiagTimeout :: Int -> Rpc () appSetXcDiagTimeout to = dbWrite "/xenmgr/xc-diag-timeout" to --- defaults to 0s -appIdleTimeThreshold :: Rpc Int -appIdleTimeThreshold = - dbMaybeRead "/xenmgr/idle-time-threshold" >>= return . fromMaybe 0 - -appSetIdleTimeThreshold :: Int -> Rpc () -appSetIdleTimeThreshold to = dbWrite "/xenmgr/idle-time-threshold" to - - -- Should we be updating /etc/hosts with argo addresses. defaults to true appArgoHostsFile :: Rpc Bool appArgoHostsFile = dbMaybeRead "/xenmgr/argo-hosts-file" >>= return . fromMaybe True diff --git a/xenmgr/XenMgr/Connect/InputDaemon.hs b/xenmgr/XenMgr/Connect/InputDaemon.hs index 64fa9fe5..18589aa1 100644 --- a/xenmgr/XenMgr/Connect/InputDaemon.hs +++ b/xenmgr/XenMgr/Connect/InputDaemon.hs @@ -24,7 +24,6 @@ module XenMgr.Connect.InputDaemon ( , inputAuthSetContextFlags , inputOnSignal , inputGetFocusedDomainID - , inputGetIdleTime , inputSwitchFocus , inputLock , inputUpdateSeamlessMouseSettings @@ -85,10 +84,3 @@ inputDaemon = Proxy inputDaemonObj $ fromString "com.citrix.xenclient.input" where inputDaemonObj = RemoteObject (fromString "com.citrix.xenclient.input") (fromString "/") - -inputGetIdleTime :: Rpc (Int32) -inputGetIdleTime = call comCitrixXenclientInputGetIdleTime - - - - diff --git a/xenmgr/XenMgr/Expose/XenmgrObject.hs b/xenmgr/XenMgr/Expose/XenmgrObject.hs index 2aa07b9f..6ed410f4 100644 --- a/xenmgr/XenMgr/Expose/XenmgrObject.hs +++ b/xenmgr/XenMgr/Expose/XenmgrObject.hs @@ -100,8 +100,8 @@ implementation xm testingCtx = , comCitrixXenclientXenmgrConfigGetBypassSha1sumChecks = appBypassSha1SumChecks , comCitrixXenclientXenmgrConfigGetXcDiagTimeout = fromIntegral <$> appXcDiagTimeout , comCitrixXenclientXenmgrConfigSetXcDiagTimeout = \t -> appSetXcDiagTimeout (fromIntegral t) >> cc - , comCitrixXenclientXenmgrConfigUiGetIdleTimeThreshold = fromIntegral <$> appIdleTimeThreshold - , comCitrixXenclientXenmgrConfigUiSetIdleTimeThreshold = \t -> appSetIdleTimeThreshold (fromIntegral t) >> cc + , comCitrixXenclientXenmgrConfigUiGetIdleTimeThreshold = return 0 + , comCitrixXenclientXenmgrConfigUiSetIdleTimeThreshold = \t -> return () >> cc , comCitrixXenclientXenmgrConfigGetPlatformCryptoKeyDirs = appGetPlatformCryptoKeyDirs , comCitrixXenclientXenmgrConfigSetPlatformCryptoKeyDirs = \v -> appSetPlatformCryptoKeyDirs v >> cc , comCitrixXenclientXenmgrConfigGetGuestOnlyNetworking = appGetGuestOnlyNetworking