As a result of an additional bit of code introduced by patch fa3c0df5, queries for instance disks sent to the configuration daemon required additional information about the instance. This information was fetched through a manual search of the list of instances, rather than the function capable of searching by name or by uuid.
This made the burnin tool used by our tests fail when inquiring for information and broke QA, and this patch fixes the problem. Signed-off-by: Hrvoje Ribicic <[email protected]> --- src/Ganeti/Confd/Server.hs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Ganeti/Confd/Server.hs b/src/Ganeti/Confd/Server.hs index 7af7f0a..b7edb34 100644 --- a/src/Ganeti/Confd/Server.hs +++ b/src/Ganeti/Confd/Server.hs @@ -242,13 +242,15 @@ buildResponse cdata req@(ConfdRequest { confdRqType = ReqNodeInstances }) = do -- | Return the list of disks for an instance given the instance uuid. buildResponse cdata req@(ConfdRequest { confdRqType = ReqInstanceDisks }) = do let cfg = fst cdata - inst_uuid <- + inst_name <- case confdRqQuery req of PlainQuery str -> return str _ -> fail $ "Invalid query type " ++ show (confdRqQuery req) - inst <- lookupContainer (Bad $ "unknown instance: " ++ inst_uuid) - inst_uuid $ configInstances cfg - case getInstDisks cfg inst_uuid of + inst <- + case getInstance cfg inst_name of + Ok i -> return i + Bad e -> fail $ "Instance not found in the configuration: " ++ show e + case getInstDisks cfg . instUuid $ inst of Ok disks -> return (ReplyStatusOk, J.showJSON disks, instSerial inst) Bad e -> fail $ "Could not retrieve disks: " ++ show e -- 2.5.0.276.gf5e568e
