diff options
Diffstat (limited to 'opendc-compute/opendc-compute-service/src')
2 files changed, 9 insertions, 4 deletions
diff --git a/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/driver/HostState.kt b/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/driver/HostState.kt index 6d85ee2d..ca6c625c 100644 --- a/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/driver/HostState.kt +++ b/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/driver/HostState.kt @@ -27,12 +27,17 @@ package org.opendc.compute.service.driver */ public enum class HostState { /** - * The host is up. + * The host is up and able to host guests. */ UP, /** - * The host is down. + * The host is in a (forced) down state and unable to host any guests. */ - DOWN + DOWN, + + /** + * The host is in an error state and unable to host any guests. + */ + ERROR, } diff --git a/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/internal/ComputeServiceImpl.kt b/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/internal/ComputeServiceImpl.kt index 21aaa19e..52ee780b 100644 --- a/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/internal/ComputeServiceImpl.kt +++ b/opendc-compute/opendc-compute-service/src/main/kotlin/org/opendc/compute/service/internal/ComputeServiceImpl.kt @@ -411,7 +411,7 @@ internal class ComputeServiceImpl( // Re-schedule on the new machine requestSchedulingCycle() } - HostState.DOWN -> { + else -> { logger.debug { "[${clock.instant()}] Host ${host.uid} state changed: $newState" } val hv = hostToView[host] ?: return |
