Skip to content

Commit a273e23

Browse files
authored
Merge pull request #199 from jandryuk/rm-xenmgr-idle
Remove xenmgr idle support
2 parents 8fb99ad + 641bf5b commit a273e23

4 files changed

Lines changed: 3 additions & 29 deletions

File tree

xenmgr/Main.hs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,20 +233,13 @@ periodics xm_context rpccontext =
233233
-- The list of actions we run periodically
234234
actions =
235235
[
236-
(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
236+
(30000, checkStorage)-- every 30 secs checks amount of free space on storage partition
237237
]
238238

239239
checkStorage = do
240240
rpc rpccontext hostCheckFreeStorage
241241
return ()
242242

243-
hostMonitorIdleness :: XmContext -> Rpc ()
244-
hostMonitorIdleness xm_context = do
245-
idle_time <- fromIntegral <$> inputGetIdleTime
246-
idle_time_threshold <- appIdleTimeThreshold
247-
when (idle_time_threshold /= 0 && idle_time >= idle_time_threshold ) $
248-
runXM xm_context hostSleep
249-
250243
exposeStuff :: XM ()
251244
exposeStuff = do
252245
testingCtx <- liftIO $ testingCreateContext

xenmgr/XenMgr/Config.hs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ module XenMgr.Config
2727
, appSvmAutoStartDelay
2828
, appOverwriteServiceVmSettings
2929
, appXcDiagTimeout
30-
, appIdleTimeThreshold
3130
, appArgoHostsFile
3231
, appMultiGpuPt
3332
, appSeamlessTrafficDefault
@@ -43,7 +42,6 @@ module XenMgr.Config
4342
, appSetSvmAutoStartDelay
4443
, appSetOverwriteServiceVmSettings
4544
, appSetXcDiagTimeout
46-
, appSetIdleTimeThreshold
4745
, appSetArgoHostsFile
4846
, appSetPlatformCryptoKeyDirs
4947
, appConfigurableSaveChangesAcrossReboots
@@ -169,15 +167,6 @@ appXcDiagTimeout =
169167
appSetXcDiagTimeout :: Int -> Rpc ()
170168
appSetXcDiagTimeout to = dbWrite "/xenmgr/xc-diag-timeout" to
171169

172-
-- defaults to 0s
173-
appIdleTimeThreshold :: Rpc Int
174-
appIdleTimeThreshold =
175-
dbMaybeRead "/xenmgr/idle-time-threshold" >>= return . fromMaybe 0
176-
177-
appSetIdleTimeThreshold :: Int -> Rpc ()
178-
appSetIdleTimeThreshold to = dbWrite "/xenmgr/idle-time-threshold" to
179-
180-
181170
-- Should we be updating /etc/hosts with argo addresses. defaults to true
182171
appArgoHostsFile :: Rpc Bool
183172
appArgoHostsFile = dbMaybeRead "/xenmgr/argo-hosts-file" >>= return . fromMaybe True

xenmgr/XenMgr/Connect/InputDaemon.hs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ module XenMgr.Connect.InputDaemon (
2424
, inputAuthSetContextFlags
2525
, inputOnSignal
2626
, inputGetFocusedDomainID
27-
, inputGetIdleTime
2827
, inputSwitchFocus
2928
, inputLock
3029
, inputUpdateSeamlessMouseSettings
@@ -85,10 +84,3 @@ inputDaemon =
8584
Proxy inputDaemonObj $ fromString "com.citrix.xenclient.input"
8685
where
8786
inputDaemonObj = RemoteObject (fromString "com.citrix.xenclient.input") (fromString "/")
88-
89-
inputGetIdleTime :: Rpc (Int32)
90-
inputGetIdleTime = call comCitrixXenclientInputGetIdleTime
91-
92-
93-
94-

xenmgr/XenMgr/Expose/XenmgrObject.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ implementation xm testingCtx =
100100
, comCitrixXenclientXenmgrConfigGetBypassSha1sumChecks = appBypassSha1SumChecks
101101
, comCitrixXenclientXenmgrConfigGetXcDiagTimeout = fromIntegral <$> appXcDiagTimeout
102102
, comCitrixXenclientXenmgrConfigSetXcDiagTimeout = \t -> appSetXcDiagTimeout (fromIntegral t) >> cc
103-
, comCitrixXenclientXenmgrConfigUiGetIdleTimeThreshold = fromIntegral <$> appIdleTimeThreshold
104-
, comCitrixXenclientXenmgrConfigUiSetIdleTimeThreshold = \t -> appSetIdleTimeThreshold (fromIntegral t) >> cc
103+
, comCitrixXenclientXenmgrConfigUiGetIdleTimeThreshold = return 0
104+
, comCitrixXenclientXenmgrConfigUiSetIdleTimeThreshold = \t -> return () >> cc
105105
, comCitrixXenclientXenmgrConfigGetPlatformCryptoKeyDirs = appGetPlatformCryptoKeyDirs
106106
, comCitrixXenclientXenmgrConfigSetPlatformCryptoKeyDirs = \v -> appSetPlatformCryptoKeyDirs v >> cc
107107
, comCitrixXenclientXenmgrConfigGetGuestOnlyNetworking = appGetGuestOnlyNetworking

0 commit comments

Comments
 (0)