Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally prevent unintended database schema updates #84

Closed
sjmudd opened this issue Feb 20, 2017 · 4 comments
Closed

Optionally prevent unintended database schema updates #84

sjmudd opened this issue Feb 20, 2017 · 4 comments
Assignees

Comments

@sjmudd
Copy link
Collaborator

sjmudd commented Feb 20, 2017

Some time ago we had 2 configuration settings to optionally avoid database upgrades:

  • SkipOrchestratorDatabaseUpdate
  • SmartOrchestratorDatabaseUpdate

These were removed as the code to handle updates was improved and considered more reliable.
I think that a similar option would be good to reinstate, especially on large environments.

Reasoning is:

  • the current assumption is that all versions of the code in use are identical. If you deploy large amounts of servers and also run orchestrator on application nodes too then achieving this instantly is likely to become harder and harder.
  • if you have a cluster of orchestrator nodes (providing an http service) then you probably want to update the database only when no nodes are trying to write to the database so possibly only with a single node being active. You really don't want any other servers suddenly trying to upgrade the database without prior notice and preparation.

So probably in a small environment it's ok to let this happen automatically and I think it's fine for it to be the default behaviour. However, an option to prevent this would at least ensure that an unintended run by some orchestrator binary won't generate ALTER TABLE commands which potentially might lock up the main orchestrator node while it tries to write to the same table.

I suggest we add a configuration setting AvoidDatabaseUpdates bool which by default has a value of false and intend to write a patch to support such a change.

I have been bitten by this sort of thing happening a number of times now and would prefer to stop everything and only on a single node allow the update, after which point the configuration setting would be disabled again.

@sjmudd
Copy link
Collaborator Author

sjmudd commented Feb 20, 2017

Might it be simplest to revert this: 54a0b54 ?

@shlomi-noach
Copy link
Collaborator

Yes, makes perfect sense!

@shlomi-noach
Copy link
Collaborator

addressed by #85

@shlomi-noach
Copy link
Collaborator

closed by #85

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants