You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4348580
Browse filesBrowse the repository at this point in the historyBrowse files
clusterer/clusterer_controller: enforce use_controller vs module-load consistency
Two startup sanity checks for a previously silent misconfiguration:
- clusterer_controller is only meaningful when the clusterer module has
use_controller=1 (the global switch that pre-creates the controller-managed
cluster stubs, sets each one's controller_managed flag so they never touch
the DB, and arms the guard that stops the controller from hijacking a native
cluster of the same id). If use_controller=0 there is no controller-managed
cluster and those safety mechanisms are off, so mod_init now FAILS (refuse to
start) rather than driving clusters clusterer never authorised. Hybrid setups
keep use_controller=1 - only the per-cluster kind differs - so this never
trips them.
- The mirror case, use_controller=1 but no clusterer_controller module bound
the controller API, logs an ERROR at clusterer child_init (the pre-created
controller-managed stubs would never obtain an identity). clusterer does NOT
abort here: its native/hybrid clusters still work; only the controller-stub
clusters are dead.
Plumbing: the clusterer_ctrl binds struct now carries clusterer's use_controller
value, and load_clusterer_ctrl_binds() sets clusterer_ctrl_bound so clusterer
can tell whether a controller registered. Verified on all permutations: pure
controller, hybrid, native-only, and both mismatches.
0 commit comments