Commit Graph

212 Commits

Author SHA1 Message Date
Joshua Boniface 2d14fabe62 Don't throw exception while defining new VM
This would throw an exception since we tried to find the current host of
a VM that did not exist yet. If this happens, just get None.
2019-12-19 11:30:13 -05:00
Joshua Boniface c91c9ae6d5 Fix formatting of node_limit when writing 2019-12-12 21:36:21 -05:00
Joshua Boniface fff44ab44e Make node limit output nicer 2019-12-12 20:52:56 -05:00
Joshua Boniface 52127f2938 Add provisioner profile to VM information 2019-12-11 17:04:16 -05:00
Joshua Boniface a95e7d1f76 Add profile from provisioner to data stored in ZK 2019-12-11 16:49:11 -05:00
Joshua Boniface 867634cea7 Fix missing argument 2019-12-09 11:31:56 -05:00
Joshua Boniface d4dc3ac649 Enforce VM uniqueness when defining
Closes #56
2019-12-09 09:56:59 -05:00
Joshua Boniface 1fb560e996 Add DNS nameservers to networks 2019-12-08 23:55:45 -05:00
Joshua Boniface 356c12db2e Add ceph df output to pool data
Allows additional information visible in the `ceph df` command,
including pool free space and used percentage.
2019-12-06 00:47:27 -05:00
Joshua Boniface 531578fd28 Use consistent tense for VM states
Replace "failed" with "fail" and "disabled" with "disable" for
consistency with the remaining states.
2019-10-23 23:57:59 -04:00
Joshua Boniface 6a4c75deb8 Clean up unnecessary zookeeper connection handling 2019-10-23 23:50:46 -04:00
Joshua Boniface 9736a3c653 Implement disabled state in cluster status
References #53
2019-10-23 23:49:19 -04:00
Joshua Boniface 32b4ed66e8 Add VM disable command
Closes #53
2019-10-23 23:44:47 -04:00
Joshua Boniface 715640955f Better handle missing OSD stat keys 2019-10-22 13:59:28 -04:00
Joshua Boniface d5a120f490 Add colour to the health status output 2019-10-22 12:24:47 -04:00
Joshua Boniface e7129f0158 Correct invalid variable name 2019-10-22 12:18:51 -04:00
Joshua Boniface 4bff533571 Add cluster status command 2019-10-22 11:23:12 -04:00
Joshua Boniface 53dc343ea2 Avoid migration to invalid target_nodes 2019-10-17 12:16:21 -04:00
Joshua Boniface 8690d40927 Fix syntax error 2019-10-17 12:11:46 -04:00
Joshua Boniface fb29ce1167 Improve autoselection setup 2019-10-17 10:31:19 -04:00
Joshua Boniface 03447d3374 Update copyright string year to include 2019 2019-10-13 12:09:51 -04:00
Joshua Boniface 116013695f Fix bugs with bad strings 2019-10-12 18:43:29 -04:00
Joshua Boniface 75d95bbef7 Fix minor bugs 2019-10-12 02:03:23 -04:00
Joshua Boniface 18fc49fc6c Use node instead of hypervisor consistently 2019-10-12 01:59:08 -04:00
Joshua Boniface 0763bd2d51 Fix minor bugs 2019-10-12 01:55:37 -04:00
Joshua Boniface e5393082b6 Use build-in selector and respect limits in client
Use the new built-in selector option, as well as respecting node limits,
when performing migrate or move actions on a VM via the clients.
2019-10-12 01:45:44 -04:00
Joshua Boniface 8dc0c8f0ac Fix minor bugs 2019-10-12 01:36:50 -04:00
Joshua Boniface 5995353597 Implement VM metadata and use it
Implements the storing of three VM metadata attributes:
1. Node limits - allows specifying a list of hosts on which the VM must
run. This limit influences the migration behaviour of VMs.
2. Per-VM node selectors - allows each VM to have its migration
autoselection method specified, to automatically allow different methods
per VM based on the administrator's preferences.
3. VM autorestart - allows a VM to be automatically restarted from a
stopped state, presumably due to a failure to find a target node (either
due to limits or otherwise) during a flush/fence recovery, on the next
node unflush/ready state of its home hypervisor. Useful mostly in
conjunction with limits to ensure that VMs which were shut down due to
there being no valid migration targets are started back up when their
node becomes ready again.

Includes the full client interaction with these metadata options,
including printing, as well as defining a new function to modify this
metadata. For the CLI it is set/modified either on `vm define` or via the
`vm meta` command. For the API it is set/modified either on a POST to
the `/vm` endpoint (during VM definition) or on POST to the `/vm/<vm>`
endpoint. For the API this replaces the previous reserved word for VM
creation from scratch as this will no longer be implemented in-daemon
(see #22).

Closes #52
2019-10-12 01:17:39 -04:00
Joshua Boniface 76e6b42389 Add clone_volume backend command 2019-10-10 14:09:07 -04:00
Joshua Boniface b0175eafcb Fix bug in output 2019-09-27 11:25:36 -04:00
Joshua Boniface 63cf90b23d Add Python header to ceph.py 2019-09-26 14:07:52 -04:00
Joshua Boniface 0c9d6db14f Gracefully handle log following output
If the Zookeeper node goes away (e.g. VM is deleted), return a
reasonable error message instead of a stack trace.
2019-09-07 12:30:31 -04:00
Joshua Boniface 3b7c1adf71 Implement configurable replcfg (client-side)
Implements administrator-selectable replication configurations for new
pools in PVC clusters, overriding the default of copies=3,mincopies=2.
2019-08-23 14:12:15 -04:00
Joshua Boniface 2880a761c0 Move Ceph command pipe to new location
Matching the new /cmd/domain pipe, move Ceph pipe to /cmd/ceph.
2019-08-07 14:47:27 -04:00
Joshua Boniface 43756fc62b Implement lock flush function for clients
Uses a similar command pathway as the Ceph commands do, but in a
different location (pending move of the Ceph commands to a similar
location).
2019-08-07 13:38:49 -04:00
Joshua Boniface 6a712ffe7a Don't crash if VM has invalid disks
Useful if storage=False and removing a VM.
2019-07-31 23:05:00 -04:00
Joshua Boniface 2dbf276e51 Implement snapshot renaming
[3/2] Implements #44
2019-07-28 23:00:35 -04:00
Joshua Boniface e2f153c3b1 Fix the same bug in a different place 2019-07-26 23:28:57 -04:00
Joshua Boniface a5ed776692 Fix missing format string 2019-07-26 20:54:52 -04:00
Joshua Boniface c464443a9c Fix snapshot lists 2019-07-26 16:44:25 -04:00
Joshua Boniface 2710ed8432 Fix up bugs in the naming 2019-07-26 16:38:35 -04:00
Joshua Boniface 4937c01075 Remove junk whitespace 2019-07-26 15:13:21 -04:00
Joshua Boniface 1872489b1d Correct duplicating fuzzy limits
These were put in a bad spot (inside the loop) and would cause
operations to take progressively longer. Only do these once.
2019-07-26 15:13:21 -04:00
Joshua Boniface d5f263bdd6 Implement Ceph volume resize and rename in clients
[1/2] Implements #44
2019-07-26 15:13:21 -04:00
Joshua Boniface 1da7462e0d Move bad-net colour outside of string
This just trashed the formatting of the string if the network didn't
exist, despite several previous attempts to get this to align. Give up;
set the colour for the whole net list if any one network is invalid.
This is not as nice as per-network colouring but saves the hassle and
complexity.
2019-07-26 11:41:51 -04:00
Joshua Boniface 8071fb87d7 Include XML in domain information 2019-07-25 16:29:29 -04:00
Joshua Boniface fb40ef5b04 Fix typo in common 2019-07-25 15:45:45 -04:00
Joshua Boniface 75f80fa4bd Include XML output in VM information 2019-07-25 15:44:29 -04:00
Joshua Boniface bcd48648b2 Add is_migrated check function 2019-07-25 14:33:50 -04:00
Joshua Boniface 2a220cd16e Nicer colour output for coordinator state client 2019-07-12 09:31:42 -04:00