Merge branch 'stable-2.13' into stable-2.14
authorHrvoje Ribicic <riba@google.com>
Fri, 4 Sep 2015 12:54:54 +0000 (12:54 +0000)
committerHrvoje Ribicic <riba@google.com>
Fri, 4 Sep 2015 13:51:58 +0000 (15:51 +0200)
* 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 <riba@google.com>
Reviewed-by: Lisa Velden <velden@google.com>

1  2 
lib/cli.py
lib/cli_opts.py
lib/cmdlib/instance_storage.py
man/gnt-backup.rst
man/gnt-instance.rst
man/gnt-node.rst
qa/qa_instance.py
src/Ganeti/Query/Instance.hs

diff --cc lib/cli.py
Simple merge
diff --cc lib/cli_opts.py
Simple merge
Simple merge
@@@ -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
Simple merge
@@@ -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*}
  
Simple merge
@@@ -730,19 -720,20 +734,21 @@@ 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