LGTM

On Fri, Sep 4, 2015 at 3:15 PM, 'Hrvoje Ribicic' via ganeti-devel <
[email protected]> wrote:

> commit ab7f9561a27031d00f7392454a7b8213e7fa3934
> Merge: d34baa7 7149806
> Author: Hrvoje Ribicic <[email protected]>
> Date:   Fri Sep 4 12:54:54 2015 +0000
>
>     Merge branch 'stable-2.13' into stable-2.14
>
>     * stable-2.13
>       Fix typo in example
>       Update documentation of --print-jobid
>
>     * stable-2.12
>       Add forgotten IPOLICY_SPINDLE_RATIO to __all__ variable
>       Make QA turn on user-shutdown when testing it
>       Fix disabling of user shutdown reporting
>       Make confd answer disk requests querying by name
>       gnt-node add: password auth is only one method
>
>     * stable-2.11
>       (no changes)
>
>     * stable-2.10
>       (no changes)
>
>     * stable-2.9
>       Document quoting of special values in key-value parameters
>       replace-disks: fix --ignore-ipolicy
>
>     Conflicts:
>       src/Ganeti/Query/Instance.hs # Added Just and Maybes
>
>     Signed-off-by: Hrvoje Ribicic <[email protected]>
>
> diff --cc man/gnt-backup.rst
> index 29c506a,0f00b80..ecb0923
> --- a/man/gnt-backup.rst
> +++ b/man/gnt-backup.rst
> @@@ -26,10 -26,10 +26,10 @@@ EXPOR
>
>   | **export** {-n *node*}
>   | [\--shutdown-timeout=*N*] [\--noshutdown] [\--remove-instance]
> - | [\--ignore-remove-failures] [\--submit] [\--print-job-id]
> + | [\--ignore-remove-failures] [\--submit] [\--print-jobid]
>   | [\--transport-compression=*compression-mode*]
>   | [\--zero-free-space] [\--zeroing-timeout-fixed]
>  -| [\--zeroing-timeout-per-mib]
>  +| [\--zeroing-timeout-per-mib] [\--long-sleep]
>   | {*instance*}
>
>   Exports an instance to the target node. All the instance data and
> diff --cc man/gnt-node.rst
> index 71b6fd7,a8f5bd7..0940d7f
> --- a/man/gnt-node.rst
> +++ b/man/gnt-node.rst
> @@@ -92,9 -95,8 +95,9 @@@ Example:
>   EVACUATE
>   ~~~~~~~~
>
> - | **evacuate** [-f] [\--early-release] [\--submit] [\--print-job-id]
> + | **evacuate** [-f] [\--early-release] [\--submit] [\--print-jobid]
>   | [{-I|\--iallocator} *NAME* \| {-n|\--new-secondary}
> *destination\_node*]
>  +| [--ignore-soft-errors]
>   | [{-p|\--primary-only} \| {-s|\--secondary-only} ]
>   |  {*node*}
>
> diff --cc src/Ganeti/Query/Instance.hs
> index e3e55af,132b31b..1c704ee
> --- a/src/Ganeti/Query/Instance.hs
> +++ b/src/Ganeti/Query/Instance.hs
> @@@ -730,19 -720,20 +734,20 @@@ liveInstanceStatus cfg (instInfo, found
>             fromContainer $ getFilledInstHvParams (C.toList C.hvcGlobals)
> cfg inst
>
>           allowDown =
> -           instHypervisor inst /= Just Kvm ||
> -           (Map.member C.hvKvmUserShutdown hvparams &&
> -            hvparams Map.! C.hvKvmUserShutdown == J.JSBool True)
> +           userShutdownEnabled cfg &&
>  -          (instHypervisor inst /= Kvm ||
> ++          (instHypervisor inst /= Just Kvm ||
> +            (Map.member C.hvKvmUserShutdown hvparams &&
> +             hvparams Map.! C.hvKvmUserShutdown == J.JSBool True))
>
>   -- | Determines the status of a dead instance.
> - deadInstanceStatus :: Instance -> InstanceStatus
> - deadInstanceStatus inst =
> + deadInstanceStatus :: ConfigData -> Instance -> InstanceStatus
> + deadInstanceStatus cfg inst =
>     case instAdminState inst of
>  -    AdminUp -> ErrorDown
>  -    AdminDown | wasCleanedUp && userShutdownEnabled cfg -> UserDown
>  -              | otherwise -> StatusDown
>  -    AdminOffline -> StatusOffline
>  -  where wasCleanedUp = instAdminStateSource inst == UserSource
>  +    Just AdminUp -> ErrorDown
> -     Just AdminDown | instAdminStateSource inst == Just UserSource ->
> UserDown
> ++    Just AdminDown | wasCleanedUp && userShutdownEnabled cfg -> UserDown
>  +                   | otherwise -> StatusDown
>  +    Just AdminOffline -> StatusOffline
> -     Nothing -> StatusDown
> ++  where wasCleanedUp = instAdminStateSource inst == Just UserSource
>
>   -- | Determines the status of the instance, depending on whether it is
> possible
>   -- to communicate with its primary node, on which node it is, and its
>



-- 
Lisa Velden
Software Engineer
[email protected]

Google Germany GmbH
Dienerstraße 12
80331 München

Geschäftsführer: Graham Law, Christine Elizabeth Flores
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Reply via email to