Commit 5c7b2e8d authored by Klaus Aehlig's avatar Klaus Aehlig

Add an RPC to provide the maintenance interval

...so that the maintenance daemon can query for the
interval at which to run.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent 3dfa8d41
......@@ -61,7 +61,9 @@ import Ganeti.Locking.Locks ( GanetiLocks(ConfigLock, BGL)
, lockLevel, LockLevel
, ClientType(ClientOther), ClientId(..) )
import qualified Ganeti.Locking.Waiting as LW
import Ganeti.Objects (ConfigData, DRBDSecret, LogicalVolume, Ip4Address)
import Ganeti.Objects ( ConfigData, DRBDSecret, LogicalVolume, Ip4Address
, configMaintenance, maintRoundDelay
)
import Ganeti.Objects.Lens (configClusterL, clusterMasterNodeL)
import Ganeti.WConfd.ConfigState (csConfigDataL)
import qualified Ganeti.WConfd.ConfigVerify as V
......@@ -154,6 +156,13 @@ writeConfigAndUnlock cid cdata = do
flushConfig :: WConfdMonad ()
flushConfig = forceConfigStateDistribution
-- *** Access to individual parts of the configuration
-- | Get the configurable value of the maintenance interval
maintenanceRoundDelay :: WConfdMonad Int
maintenanceRoundDelay = liftM ( maintRoundDelay . configMaintenance )
CW.readConfig
-- ** Temporary reservations related functions
dropAllReservations :: ClientId -> WConfdMonad ()
......@@ -384,6 +393,7 @@ exportedFunctions = [ 'echo
, 'unlockConfig
, 'writeConfigAndUnlock
, 'flushConfig
, 'maintenanceRoundDelay
-- temporary reservations (common)
, 'dropAllReservations
-- DRBD
......
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