Commit b88ac7b8 authored by Klaus Aehlig's avatar Klaus Aehlig
Browse files

Remove all references to the masterd socket



...as masterd is no more.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent 321a794c
......@@ -456,7 +456,7 @@ genOLuxiSocket defSocket =
OptComplFile)
oLuxiSocket :: IO OptType
oLuxiSocket = liftM genOLuxiSocket Path.defaultMasterSocket
oLuxiSocket = liftM genOLuxiSocket Path.defaultQuerySocket
oMachineReadable :: OptType
oMachineReadable =
......
......@@ -458,7 +458,7 @@ main opts args = do
unless (null args) $
exitErr "this program doesn't take any arguments."
luxiDef <- Path.defaultMasterSocket
luxiDef <- Path.defaultQuerySocket
let master = fromMaybe luxiDef $ optLuxi opts
opts' = opts { optLuxi = Just master }
......
......@@ -150,7 +150,7 @@ main opts clusters = do
"t_disk" "f_disk" "Score"
when (null clusters) $ do
def_socket <- Path.defaultMasterSocket
def_socket <- Path.defaultQuerySocket
let lsock = fromMaybe def_socket (optLuxi opts)
let name = local
input_data <- Luxi.loadData lsock
......
......@@ -30,7 +30,6 @@ module Ganeti.Path
, socketDir
, livelockDir
, livelockFile
, defaultMasterSocket
, defaultQuerySocket
, defaultWConfdSocket
, confdHmacKey
......@@ -100,10 +99,6 @@ livelockDir = runDir `pjoin` "livelocks"
livelockFile :: FilePath -> IO FilePath
livelockFile = pjoin livelockDir
-- | The default path for the master-daemon LUXI socket.
defaultMasterSocket :: IO FilePath
defaultMasterSocket = socketDir `pjoin` "ganeti-master"
-- | The default LUXI socket for queries.
defaultQuerySocket :: IO FilePath
defaultQuerySocket = socketDir `pjoin` "ganeti-query"
......
......@@ -60,8 +60,7 @@ import Ganeti.Logging
import Ganeti.Luxi
import qualified Ganeti.Query.Language as Qlang
import qualified Ganeti.Query.Cluster as QCluster
import Ganeti.Path ( queueDir, jobQueueLockFile, jobQueueDrainFile
, defaultMasterSocket)
import Ganeti.Path ( queueDir, jobQueueLockFile, jobQueueDrainFile )
import Ganeti.Rpc
import qualified Ganeti.Query.Exec as Exec
import Ganeti.Query.Query
......@@ -320,12 +319,10 @@ handleCall _ qstat cfg (ChangeJobPriority jid prio) = do
return $ showJSON (True, "Priorities of pending opcodes for job "
++ show (fromJobId jid) ++ " have been changed"
++ " to " ++ show prio)
Ok Nothing -> runResultT $ do
Ok Nothing ->
-- Job has already started; so we have to forward the request
-- to the job, currently handled by masterd.
socketpath <- liftIO defaultMasterSocket
cl <- liftIO $ getLuxiClient socketpath
ResultT $ callMethod (ChangeJobPriority jid prio) cl
-- to the job.
runResultT . return $ showJSON (False, "Job already forked off")
handleCall _ qstat cfg (CancelJob jid) = do
let jName = (++) "job " . show $ fromJobId jid
......
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