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
Generating a Configuration should be an absolutely safe all-or-nothing operation
Current Behavior
In case you manage it to interrupt config rendering, there is a small time window where Config Files are already stored, Config Checksum has been stored, but Config <<==>> File references are still incomplete. They're stored line by line. Nothing bad happens at the first shot, deployment does not happen - as you interrupted it.
However, when you render the configuration again with no configuration change in the meantime, Director will find a reference pointing to an configuration, which matches the config generated in memory. It will therefore just link the existing configuration. Now you get a reference to this broken config - and are allowed to deploy it.
This is VERY hard to reproduce, as there is only a short time frame where this race condition can occur. It usually does not happen in case you "Deploy" a configuration, as it will still deploy the correct config from memory. But it might happen when you first "Generate" a configuration, interrupt the process, "Generate" again, look at the generated Config (manually in the UI) and then "Deploy" that specific generated Config - which unfortunately broke in the DB at the very first shot.
Possible Solution
Storing a generated Configuration should be part of a transaction, and being either COMMITted or ROLLed BACK at once.
The text was updated successfully, but these errors were encountered:
NB: the single (and potentially large) files should not be part of this transaction. This is about generated_config entries and linked generated_config_file_config references.
Expected Behavior
Generating a Configuration should be an absolutely safe all-or-nothing operation
Current Behavior
In case you manage it to interrupt config rendering, there is a small time window where Config Files are already stored, Config Checksum has been stored, but
Config <<==>> File
references are still incomplete. They're stored line by line. Nothing bad happens at the first shot, deployment does not happen - as you interrupted it.However, when you render the configuration again with no configuration change in the meantime, Director will find a reference pointing to an configuration, which matches the config generated in memory. It will therefore just link the existing configuration. Now you get a reference to this broken config - and are allowed to deploy it.
This is VERY hard to reproduce, as there is only a short time frame where this race condition can occur. It usually does not happen in case you "Deploy" a configuration, as it will still deploy the correct config from memory. But it might happen when you first "Generate" a configuration, interrupt the process, "Generate" again, look at the generated Config (manually in the UI) and then "Deploy" that specific generated Config - which unfortunately broke in the DB at the very first shot.
Possible Solution
Storing a generated Configuration should be part of a transaction, and being either COMMITted or ROLLed BACK at once.
The text was updated successfully, but these errors were encountered: