If a node is removed from the list of master candidates, we want to make sure that after the operation the configuration will not be distributed to the node any more. Without requiring full distribution, it's possible that the node still receives configuration update from a previous call.
Also include the master node(s). (While this shouldn't change without master failover, if it does, it's definitely a good idea to flush the configuration.) Signed-off-by: Petr Pudlak <[email protected]> --- src/Ganeti/WConfd/ConfigState.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Ganeti/WConfd/ConfigState.hs b/src/Ganeti/WConfd/ConfigState.hs index 274819f..cd62959 100644 --- a/src/Ganeti/WConfd/ConfigState.hs +++ b/src/Ganeti/WConfd/ConfigState.hs @@ -38,6 +38,7 @@ import Control.Applicative import Data.Function (on) import System.Time (ClockTime(..)) +import Ganeti.Config import Ganeti.Lens import Ganeti.Objects import Ganeti.Objects.Lens @@ -65,5 +66,8 @@ bumpSerial now = set mTimeL now . over serialL succ needsFullDist :: ConfigState -> ConfigState -> Bool needsFullDist = on (/=) watched where - watched = (,) <$> clusterCandidateCerts . configCluster . csConfigData - <*> clusterMasterNode . configCluster . csConfigData + watched = (,,,) + <$> clusterCandidateCerts . configCluster . csConfigData + <*> clusterMasterNode . configCluster . csConfigData + <*> getMasterNodes . csConfigData + <*> getMasterCandidates . csConfigData -- 1.9.1.423.g4596e3a
