commit 6743581423f9a0f11c512cae48b4ed45f5d753f5
Merge: 4c44e94 f87cedc
Author: Klaus Aehlig <[email protected]>
Date: Mon Oct 12 14:54:00 2015 +0200
Merge branch 'stable-2.13' into stable-2.14
* stable-2.13
Improve xl socat migrations
* stable-2.12
QA: Retrieve only the RAPI certificate
QA: Allow usage of specific RAPI certificates and files
QA: Reload certificates only when renew-crypto has been run
QA: Restart Ganeti after adding the RAPI users file
QA: Add reading the RAPI password from a file
QA: Allow the RAPI user to be set
QA: Do not remove nodes from cluster without destroying it
QA: Refactor RAPI handling
Increase default disk size of burnin to 1G
break line with more than 80 characters
Only search for Python-2 interpreters
Fix faulty comments / indentation
Handle Xen 4.3 states better
* stable-2.11
(no changes)
* stable-2.10
Add a test for parsing of admin_state in IAlloc backend
At IAlloc backend guess state from admin state
* stable-2.9
Update harep's man page to notify users of its limitations
Conflicts:
src/Ganeti/HTools/Backend/IAlloc.hs
Resolution:
manually apply 9c1704a5 to stable-2.13
Signed-off-by: Klaus Aehlig <[email protected]>
diff --cc src/Ganeti/HTools/Backend/IAlloc.hs
index adb9db9,7ef51a1..c4a8459
--- a/src/Ganeti/HTools/Backend/IAlloc.hs
+++ b/src/Ganeti/HTools/Backend/IAlloc.hs
@@@ -108,12 -109,13 +109,17 @@@ parseBaseInstance n a = d
su <- extract "spindle_use"
nics <- extract "nics" >>= toArray >>= asObjectList >>=
mapM (parseNic n . fromJSObject)
+ state <- (tryFromObj errorMessage a "admin_state" >>= adminStateFromRaw)
+ `mplus` Ok AdminUp
+ let getRunSt AdminOffline = StatusOffline
+ getRunSt AdminDown = StatusDown
+ getRunSt AdminUp = Running
- return (n, Instance.create n mem disk disks vcpus (getRunSt state) tags
- True 0 0 dt su nics)
+ -- Not forthcoming by default.
+ forthcoming <- extract "forthcoming" `orElse` Ok False
+ return
+ (n,
- Instance.create n mem disk disks vcpus Running tags True 0 0 dt su nics
- forthcoming)
++ Instance.create n mem disk disks vcpus (getRunSt state) tags
++ True 0 0 dt su nics forthcoming)
-- | Parses an instance as found in the cluster instance list.
parseInstance :: NameAssoc -- ^ The node name-to-index association list
--
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Matthew Scott Sucherman, Paul Terence Manicle