mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 08:52:39 +01:00
4da74166fe
Summary: Ref T11044. One popular tool in a modern operations environment is Puppet. The primary purpose of this tool is to randomly revert hosts to older or different configurations. Introducing an element of chaotic unpredictability into operations trains staff to be on high alert at all times, rather than lulled into complacency by predictability or consistency. When Puppet reverts a Phabricator host's configuration to an older version, we might start writing data to a lot of crazy places where it shouldn't go. This will create a big sticky mess that is virtually impossible to undo, mostly because we'll get two files with ID 123 or two tasks with ID 456 or whatever else and good luck with that. Instead, after changing the partition layout, require `bin/storage partition` to be run. This writes a copy of the config everywhere. Then, when we start serving web requests, make sure every database has the exact same config. This will foil Puppet by refusing to run requests on hosts it has reverted. Test Plan: - Changed partition configuration. - Ran Phabricator. - FOILED! - Ran `bin/storage partition` to sync config. - Things worked again. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11044 Differential Revision: https://secure.phabricator.com/D16910
5 lines
229 B
SQL
5 lines
229 B
SQL
CREATE TABLE {$NAMESPACE}_meta_data.hoststate (
|
|
stateKey VARCHAR(128) NOT NULL COLLATE {$COLLATE_TEXT},
|
|
stateValue LONGTEXT NOT NULL COLLATE {$COLLATE_TEXT},
|
|
PRIMARY KEY (stateKey)
|
|
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
|