Revision 833c32b3 src/Ganeti/WConfd/Server.hs
b/src/Ganeti/WConfd/Server.hs | ||
---|---|---|
43 | 43 |
import Ganeti.UDSServer |
44 | 44 |
|
45 | 45 |
import Ganeti.Runtime |
46 |
import Ganeti.Utils.AsyncWorker |
|
47 | 46 |
import Ganeti.WConfd.ConfigState |
47 |
import Ganeti.WConfd.ConfigWriter |
|
48 | 48 |
import Ganeti.WConfd.Core |
49 | 49 |
import Ganeti.WConfd.Monad |
50 | 50 |
|
... | ... | |
69 | 69 |
-- TODO: Lock the configuration file so that running the daemon twice fails? |
70 | 70 |
conf_file <- Path.clusterConfFile |
71 | 71 |
|
72 |
dhOpt <- runResultT $ mkDaemonHandle conf_file mkConfigState emptyAllocation |
|
73 |
(const $ mkAsyncWorker (return ())) |
|
74 |
-- TODO: read current lock allocation from disk |
|
72 |
dhOpt <- runResultT $ do |
|
73 |
(cdata, cstat) <- loadConfigFromFile conf_file |
|
74 |
-- TODO: read current lock allocation from disk |
|
75 |
mkDaemonHandle conf_file |
|
76 |
(mkConfigState cdata) |
|
77 |
emptyAllocation |
|
78 |
(saveConfigAsyncTask conf_file cstat) |
|
75 | 79 |
dh <- withError (strMsg . ("Initialization of the daemon failed" ++) . show) |
76 | 80 |
dhOpt |
77 | 81 |
|
Also available in: Unified diff