Fix config sync after freezing namespaces #9648
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was accidentally broken by #9627 because during config sync, a config validation happens that uses
--define System.ZonesStageVarDir=...
which fails on the now frozen namespace.This commit changes this to use
Internal.ZonesStageVarDir
instead. After all, this is used for internal functionality, users should not directly interact with this flag.Additionally, it no longer freezes the
Internal
namespace which actually allows usingInternal.ZonesStageVarDir
in the first place. This also fixes--define Internal.Debug*
which was also broken by said PR. Freezing of theInternal
namespace is not necessary for performance reasons as it's not searched implicitly (for example when accessingglobals.x
) and should users actually interact with it, they should know by that name that they are on their own.The PR also includes an additional commit that improves the error handling for
--define
so that a proper error message is shown when a user tries to update something in a read-only namespace rather than resulting in a crash with a crash log.Test
Updating the config on master-1, result of the incoming config sync on master-2.
Before (a24375b)
Config sync fails with an error, regardless of whether the config is valid:
Contents of that log file:
After (fd1aa73)
Same setting, config sync works again:
fixes #9639