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
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
f82da03a62
Add first wrappers and exceptions
2021-05-28 00:19:39 -04:00
Joshua Boniface
fef230ad98
Implement class-based version of zkhander
2021-05-27 22:50:00 -04:00
Joshua Boniface
0bf276fd51
Update copyright year in headers
2021-03-25 17:01:55 -04:00
Joshua Boniface
f4ec161aa2
Update file copyright header.
...
Remove the option to select a later version of the GPL.
2021-03-25 16:58:02 -04:00
Joshua Boniface
260b39ebf2
Lint: E302 expected 2 blank lines, found X
2020-11-07 14:45:24 -05:00
Joshua Boniface
99d723dd8b
Lint: F821 undefined name 'count'
2020-11-07 13:39:51 -05:00
Joshua Boniface
6cf7f178a6
Lint: F821 undefined name 'time'
2020-11-07 13:38:54 -05:00
Joshua Boniface
5da314902f
Lint: F841 local variable '<variable>' is assigned to but never used
2020-11-06 21:13:13 -05:00
Joshua Boniface
d9e7b7ec15
Lint: F401 <library> imported but unused
2020-11-06 19:22:49 -05:00
Joshua Boniface
42c5f84ba7
Do multiple lock attempts
2020-10-21 11:21:37 -04:00
Joshua Boniface
3839040092
Add exclusive lock function
2020-10-21 10:46:41 -04:00
Joshua Boniface
72f47f216a
Revert "Add locking in common zkhander"
...
This reverts commit 53c0d2b4f6
.
This resulted in a massive performance hit and some inconsistent
behaviour. Revert for now an re-investigate later.
2020-10-21 03:49:13 -04:00
Joshua Boniface
53c0d2b4f6
Add locking in common zkhander
...
Ensures that every changed made here is locked, thus preventing
duplicate updates, etc.
2020-10-21 03:17:18 -04:00
Joshua Boniface
44efd66f2c
Fix error renaming keys
...
This function was not implemented and thus failed; implements it.
2020-03-30 21:38:18 -04:00
Joshua Boniface
4505b239eb
Rename API and common Debian packages
...
Closes #79
2020-02-08 18:50:38 -05:00