Commit Graph

24 Commits

Author SHA1 Message Date
Joshua Boniface 77e215b0eb Don't queue flushes without --wait
Don't try to queue up a flush when there is already a flush lock; direct
the user to use --wait (which will actually wait before triggering the
new action), or try again later.
2019-06-27 14:36:58 -04:00
Joshua Boniface b52cf01ecc Make conditionals more Pythonic 2019-06-25 12:36:37 -04:00
Joshua Boniface 80de40252b Add shutdown colour to output 2019-06-19 14:28:04 -04:00
Joshua Boniface 39a45a1e0f Fix bug with daemon_state 2019-06-19 14:19:00 -04:00
Joshua Boniface bc38af774e Check that node is in run state before primary
Fixes #37
2019-06-19 12:49:34 -04:00
Joshua Boniface 3ba3c339a7 Show vCPU count on CLI output
Showing the static, total number of CPUs was pointless. Instead,
show the number of allocated vCPUs. To preserve space, no longer
show the host CPU count in the list.
2019-06-02 22:30:26 -04:00
Joshua Boniface b9774bdf03 Increase wait sleeps in node flush/unflush 2019-05-26 23:21:01 -04:00
Joshua Boniface 73443ecbaf Update vm.py to allow API use 2019-05-20 22:15:28 -04:00
Joshua Boniface 91ea96b772 Actually send wait for unflush 2019-05-11 00:16:38 -04:00
Joshua Boniface 62a71af46e Implement locking for unflush as well
References #32
2019-05-11 00:13:03 -04:00
Joshua Boniface c19902d952 Implement flush locking for nodes
Implements a locking mechanism to prevent clobbering of node
flushes. When a flush begins, a global cluster lock is placed
which is freed once the flush completes. While the lock is in place,
other flush events queue waiting for the lock to free before
proceeding.

Modifies the CLI output flow when the `--wait` option is specified.
First, if a lock exists when running the command, the message is
tweaked to indicate this, and the client will wait first for the
lock to free, and then for the flush as normal. Second, the wait
depends on the active lock rather than the domain_status for
consistency purposes.

Closes #32
2019-05-10 23:52:24 -04:00
Joshua Boniface 045ad131af Update node.py to allow API use
Addresses #33
2019-05-10 23:27:34 -04:00
Joshua Boniface 1126382ac9 Initial API including fixes to common functons
Some functions were doing `click.echo` inside themselves; don't
do that as it's not API compatible, just return everything.
2019-03-21 11:19:28 -04:00
Joshua Boniface 36ac20e5a7 Increase state length width 2019-03-13 20:28:33 -04:00
Joshua Boniface a6806ad5e0 Change router state name to coordinator 2018-11-18 20:00:40 -05:00
Joshua Boniface 720469d389 Standardize the layout of lists (dynamic fields) 2018-11-02 00:42:44 -04:00
Joshua Boniface 2c2208ab07 Tweak some output formatting in lists 2018-11-01 23:24:38 -04:00
Joshua Boniface 4b924e54d9 Fix children list typo 2018-10-27 16:03:01 -04:00
Joshua Boniface 2b115160a2 Use zkhandler for everything; add delete operation 2018-10-27 15:51:52 -04:00
Joshua Boniface 59219c4e97 Increase domain state length 2018-10-21 22:10:13 -04:00
Joshua Boniface d464bf74da Increase width of daemon_state line 2018-10-21 15:19:24 -04:00
Joshua Boniface 05af23064f Fix name of "ansiiprint" since it's "ANSI" 2018-10-20 15:28:25 -04:00
Joshua Boniface 49d5b60f15 Remove superfluous Hypervisor mention 2018-10-14 02:47:30 -04:00
Joshua Boniface f198f62563 Massive rejigger into single daemon
Completely restructure the daemon code to move the 4 discrete daemons
into a single daemon that can be run on every hypervisor. Introduce the
idea of a static list of "coordinator" nodes which are configured at
install time to run Zookeeper and FRR in router mode, and which are
allowed to take on client network management duties (gateway, DHCP, DNS,
etc.) while also allowing them to run VMs (i.e. no dedicated "router"
nodes required).
2018-10-14 02:40:54 -04:00