Commit Graph

171 Commits

Author SHA1 Message Date
Joshua Boniface 30a160d5ff Fix invalid type_key 2021-06-13 21:20:10 -04:00
Joshua Boniface 1cbc66dccf Fix bugs in lease listing 2021-06-13 21:10:42 -04:00
Joshua Boniface bbd903e568 Fix bad schema name 2021-06-13 21:02:44 -04:00
Joshua Boniface 9511dc9864 Correct issue with invalid ACL ordering 2021-06-13 20:55:28 -04:00
Joshua Boniface 3013973975 Fix bad schema names 2021-06-13 20:32:41 -04:00
Joshua Boniface 8269930d40 Fix bad entry in network add 2021-06-13 18:22:13 -04:00
Joshua Boniface ae79113f7c Correct key typo and add error handler 2021-06-13 15:49:30 -04:00
Joshua Boniface 3bad3de720 Verify if key exists before reading 2021-06-13 15:39:43 -04:00
Joshua Boniface 680c62a6e4 Fix schema path call and version check 2021-06-13 14:46:30 -04:00
Joshua Boniface 88a1d89501 Fix bad key name 2021-06-13 14:29:54 -04:00
Joshua Boniface 7110a42e5f Add final schema elements after refactoring 2021-06-13 14:26:17 -04:00
Joshua Boniface 01c82f5d19 Move backup and restore into common 2021-06-13 14:25:51 -04:00
Joshua Boniface 059230d369 Convert vm.py to new ZK schema handler 2021-06-13 13:41:21 -04:00
Joshua Boniface f6e37906a9 Convert node.py to new ZK schema handler 2021-06-13 13:18:34 -04:00
Joshua Boniface 0a162b304a Convert network.py to new ZK schema handler 2021-06-12 18:40:25 -04:00
Joshua Boniface f071343333 Add DHCP lease schema and temp workaround 2021-06-12 18:22:43 -04:00
Joshua Boniface 01c762a362 Convert common.py to new ZK schema handler 2021-06-12 17:59:09 -04:00
Joshua Boniface 9b1bd8476f Convert cluster.py to new ZK schema handler 2021-06-12 17:11:32 -04:00
Joshua Boniface 6d00ec07b5 Convert ceph.py to new ZK schema handler 2021-06-12 17:09:29 -04:00
Joshua Boniface 247ae4fe2d Fix pre-refactor path bug 2021-06-10 01:18:33 -04:00
Joshua Boniface b1c13c9fc1 Fix another bug with read call 2021-06-10 01:08:18 -04:00
Joshua Boniface 75fc40a1e8 Fix bug with nkipath 2021-06-10 01:00:40 -04:00
Joshua Boniface 2aa7f87ca9 Fix bug in creating child path keys 2021-06-10 00:55:54 -04:00
Joshua Boniface 5273c4ebfa Fix bug with encoding raw creates 2021-06-10 00:52:07 -04:00
Joshua Boniface 8dc9fd6dcb Fix bug with sub self command path/key 2021-06-10 00:49:01 -04:00
Joshua Boniface f030ed974c Correct schema and handling of network subkeys
Required a bit of refactoring in the validation code to ensure we have
direct access, without relying on the translations done in the normal
zkhandler functions.
2021-06-10 00:35:42 -04:00
Joshua Boniface 9985e1dadd Add support for 2-level dynamic keys 2021-06-09 23:52:21 -04:00
Joshua Boniface 7e42118e6f Adjust lock schema in NodeInstance and VMInstance
Removes a superfluous lock and puts the sync_lock keys in more usable
places.
2021-06-09 22:51:00 -04:00
Joshua Boniface 24663a3333 Add missing VM schema entry 2021-06-09 22:12:24 -04:00
Joshua Boniface a9a57533a7 Integrate schema handling within ZKHandler
Abstracts away the schema management, especially when doing actions, to
prevent duplication in other areas.
2021-06-09 13:23:57 -04:00
Joshua Boniface 76c37e6628 Tweak some field names slightly and add missing 2021-06-09 09:58:18 -04:00
Joshua Boniface 0a04adf8f9 Allow empty sub_paths 2021-06-09 01:54:29 -04:00
Joshua Boniface f2b55ba937 Fix some bugs with migrations 2021-06-09 00:04:16 -04:00
Joshua Boniface 5540bdc86b Add automatic schema upgrade to nodes
Performs an automatic schema upgrade when all nodes are updated to the
latest version.

Addresses #129
2021-06-08 23:35:39 -04:00
Joshua Boniface 3c102b3769 Add per-node schema tracking
This will allow nodes to start with their own schema versions, and then
be updated simultaneously by the API.

References #129
2021-06-08 23:35:39 -04:00
Joshua Boniface 602dd7b714 Update version 0 schema and add full validation
Addresses #129
2021-06-08 23:35:39 -04:00
Joshua Boniface 126f0742cd Add Zookeeper schema manager to zkhandler
Adds a new class, ZKSchema, to handle schema management in Zookeeper in
an automated and consistent way. This should solve several issues:

1. Pain in managing changes to ZK keys
2. Pain in handling those changes during live upgrades
3. Simplifying the codebase to remove hardcoded ZK paths

The current master schema for PVC 0.9.19 is committed as version 0.

Addresses #129
2021-06-08 23:35:39 -04:00
Joshua Boniface f0dc0fc782 Avoid duplicating maintenance state change
This makes no functional difference, but is technically more correct.
2021-06-05 01:36:40 -04:00
Joshua Boniface 5d88e92acc Avoid returning errors with duplicate router mode
Like the previous (new) flush change, these shouldn't be errors, but
simply information "what you want is already done" messages.
2021-06-05 01:14:31 -04:00
Joshua Boniface 505c109875 Avoid re-flush or re-ready nodes if unnecessary 2021-06-05 01:08:32 -04:00
Joshua Boniface 7dea5d2fac Move logger to common, fix buffering 2021-06-01 18:50:26 -04:00
Joshua Boniface 9764090d6d Merge node common with daemon common 2021-06-01 12:22:11 -04:00
Joshua Boniface f73c433fc7 Remove useless try and import 2021-06-01 12:05:17 -04:00
Joshua Boniface a48bf2d71e More gracefully handle none selectors
Allow selection of "none" as the node selector, and handle this by
always using the cluster default instead of writing it in.
2021-06-01 11:13:13 -04:00
Joshua Boniface 33a54cf7f2 Move configuration keys to /config tree 2021-06-01 10:48:55 -04:00
Joshua Boniface d3b5b5236a Remove transactional delete
This just doesn't work due to the darn limit on recursive deletes in
transactions.
2021-05-31 19:22:01 -04:00
Joshua Boniface 8625e9bd3e Update Delete to recursive method 2021-05-31 03:14:09 -04:00
Joshua Boniface ed4f84a3ec Add log handling and persistent listener 2021-05-31 03:14:09 -04:00
Joshua Boniface 9be426507a Fix erroneous lock calls 2021-05-30 15:31:17 -04:00
Joshua Boniface 58a5b00aa1 Remove extraneous zkhandler reference 2021-05-30 01:01:40 -04:00