LGTM, thanks

On Wed, May 28, 2014 at 12:37 PM, 'Jose A. Lopes' via ganeti-devel <
[email protected]> wrote:

> From: Apollon Oikonomopoulos <[email protected]>
>
> Luxid would always show user-shutdown instances as ADMIN_down when user
> shutdown was not allowed, because it was checking for only two
> possibilities:
>
>   - Either the instance is admin-up and user-down (allowed), or
>   - The instance is admin-down
>
> However there is a third state: the instance being admin-up but not
> running (or user-down but disallowed). We fix this by checking for the
> additional state.
>
> Signed-off-by: Apollon Oikonomopoulos <[email protected]>
> Signed-off-by: Jose A. Lopes <[email protected]>
> ---
>  src/Ganeti/Query/Instance.hs | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/src/Ganeti/Query/Instance.hs b/src/Ganeti/Query/Instance.hs
> index a398e49..856bbca 100644
> --- a/src/Ganeti/Query/Instance.hs
> +++ b/src/Ganeti/Query/Instance.hs
> @@ -629,6 +629,7 @@ liveInstanceStatus (instInfo, foundOnPrimary) inst
>        InstanceStateRunning | adminState == AdminUp -> Running
>                             | otherwise -> ErrorUp
>        InstanceStateShutdown | adminState == AdminUp && allowDown ->
> UserDown
> +                            | adminState == AdminUp -> ErrorDown
>                              | otherwise -> StatusDown
>    where adminState = instAdminState inst
>          instanceState = instInfoState instInfo
> --
> 1.9.1.423.g4596e3a
>
>

Reply via email to