Commit 673425b8 authored by Klaus Aehlig's avatar Klaus Aehlig

Merge branch 'stable-2.9' into stable-2.10

* stable-2.9
  Revision bump for 2.9.4
  Set release date for 2.9.4
  Note UUID identification change in NEWS file
  Allow classic queries to use either names or UUIDs
  Document the change of noded's group in NEWS

Conflicts:
	NEWS: take all stable-2.9 additions, effectively
	    restoring the 2.9.4 entry, hence effectively
	    reverting 78cb4606
	configure.ac: ignore revision bump
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parents b6e31235 b57b1df4
......@@ -166,6 +166,20 @@ before rc1.
- Issue 623: IPv6 Masterd <-> Luxid communication error
Version 2.9.4
-------------
*(Released Mon, 10 Feb 2014)*
- Fix the RAPI instances-multi-alloc call
- assign unique filenames to file-based disks
- gracefully handle degraded non-diskless instances with 0 disks (issue 697)
- noded now runs with its specified group, which is the default group,
defaulting to root (issue 707)
- make using UUIDs to identify nodes in gnt-node consistently possible
(issue 703)
Version 2.9.3
-------------
......
......@@ -50,6 +50,7 @@ module Ganeti.Query.Query
, queryCompat
, getRequestedNames
, nameField
, uuidField
) where
import Control.DeepSeq
......@@ -121,6 +122,13 @@ nameField (ItemTypeLuxi QRJob) = "id"
nameField (ItemTypeOpCode QRExport) = "node"
nameField _ = "name"
-- | Computes the uuid field, or the best possible substitute, for different
-- query types.
uuidField :: ItemType -> FilterField
uuidField (ItemTypeLuxi QRJob) = nameField (ItemTypeLuxi QRJob)
uuidField (ItemTypeOpCode QRExport) = nameField (ItemTypeOpCode QRExport)
uuidField _ = "uuid"
-- | Extracts all quoted strings from a list, ignoring the
-- 'NumericValue' entries.
getAllQuotedStrings :: [FilterValue] -> [String]
......
......@@ -72,7 +72,8 @@ handleClassicQuery :: ConfigData -- ^ Cluster config
handleClassicQuery _ _ _ _ True =
return . Bad $ OpPrereqError "Sync queries are not allowed" ECodeInval
handleClassicQuery cfg qkind names fields _ = do
let flt = makeSimpleFilter (nameField qkind) names
let simpleNameFilter field = makeSimpleFilter (field qkind) names
flt = Qlang.OrFilter $ map simpleNameFilter [nameField, uuidField]
qr <- query cfg True (Qlang.Query qkind fields flt)
return $ showJSON <$> (qr >>= queryCompat)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment