SUSE / DeepSea

A collection of Salt files for deploying, managing and automating Ceph.
GNU General Public License v3.0
161 stars 75 forks source link

Rework config change detection to handle global.conf correctly (bsc#1181183) #1872

Closed tserong closed 3 years ago

tserong commented 3 years ago

This rather large change makes DeepSea schedule all daemons for restart if global.conf has changed. The original (unimplemented) idea is that there was going to be a tree of roles, so each individual role could depend on global.conf, so if global.conf changed, it would propagate through this tree. Unfortunately, that was never going to work due to the way the checksum verification/generation is done. The original implementation called changed.mon, then changed.osd, then changed.mgr in that order. If each of those in turn were to check if the global config had changed, then that'd be true on the first call, so the mons would get their restart flag set, but would no longer be true for subsequent calls (the mgr and osd wouldn't be restarted). So I got rid of that entire tree concept altogether, and collapsed everything back to one function which checks for all possible changes and sets the restart grains appropriately.

Fixes: https://bugzilla.suse.com/show_bug.cgi?id=1181183 Signed-off-by: Tim Serong tserong@suse.com

tserong commented 3 years ago

@jan--f do you mind eyeballing this? It'll make a lot more sense if you do a side-by-side/split diff, rather than a unified diff, given the magnitude of the change.

tserong commented 3 years ago

Yeah, good idea, I'll sort something out for docs