Commit Graph

192 Commits

Author SHA1 Message Date
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
Joshua Boniface e765ec7f49 Handle client connection falures gracefully 2019-07-12 00:55:06 -04:00
Joshua Boniface 0d513fea4d Add delay after deleting VM
Otherwise there might still be a watcher on the block device when we go
to delete it, which causes a failure.
2019-07-10 19:05:36 -04:00
Joshua Boniface 7a8aee9fe7 Remove flush locking functionality
This just seemed like more trouble that it was worth. Flush locks were
originally intended as a way to counteract the weird issues around
flushing that were mostly fixed by the code refactoring, so this will
help test if those issues are truly gone. If not, will look into a
cleaner solution that doesn't result in unchangeable states.
2019-07-09 23:59:17 -04:00
Joshua Boniface ffc2a6ee1b Fix display bug 2019-07-09 10:47:56 -04:00
Joshua Boniface 6426607769 Store list of RBD disks in ZK
Store a basic list of RBD disks in Zookeeper for access by the node
subsystem to handle RBD locks. This avoids the need to implement complex
parsing logic inside the fencing configuration (or elsewhere).

Also handle a malformed XML content properly during VM define.
2019-07-09 10:22:23 -04:00
Joshua Boniface e263a05237 Reorganize client functions
Move some functions to the common file for future usage.
2019-07-09 09:29:47 -04:00
Joshua Boniface b5af3a16a8 Join features list in CLI output 2019-07-08 22:47:04 -04:00
Joshua Boniface a3de9da513 Add quotes around vars in all return messages 2019-07-08 22:37:26 -04:00
Joshua Boniface dd78aa8fb8 Use quotes around variables in output 2019-07-08 22:31:24 -04:00
Joshua Boniface 1ce2cfc3e3 Convert units on CLI output and format ops too 2019-07-08 22:03:34 -04:00
Joshua Boniface dda4cc282e Fix bad element names 2019-07-08 21:41:54 -04:00
Joshua Boniface b2cc444024 Correct bad bracket type 2019-07-08 21:40:06 -04:00
Joshua Boniface 359886e335 Correct variable name bugs 2019-07-08 21:35:18 -04:00
Joshua Boniface 31b4dd9aed Show radosdf output in clients 2019-07-08 10:59:49 -04:00
Joshua Boniface f75216d946 Make force_migrate not replace existing node
Previous to this, if once force-migrated a VM, the previous_node value
would be updated to the current node, which is likely never what an
administrator would want. Change this functionality so that the previous
node value is not changed, and update the documentation to reflect this.
2019-07-07 15:10:48 -04:00
Joshua Boniface 4f6d0baf6c Fix bad ZK node entry 2019-07-06 01:42:55 -04:00
Joshua Boniface 7d56ecb13d Apply tweak to rule direction handling 2019-07-05 21:38:47 -04:00
Joshua Boniface 5ac3d55b8d Always use the passed domain in messages
Don't ever output an ugly UUID unless that's what was actually sent to
the function. Makes output much much nicer, especially on errors.
2019-07-05 16:38:54 -04:00
Joshua Boniface 18520d6c77 Support disabling fuzzy limit matching
Used for the APIs when they filter by name but we don't want a fuzzy
limit since we specified an exact name.
2019-07-05 16:30:20 -04:00
Joshua Boniface dc16f51b2a Fix variable naming bug 2019-07-05 14:18:18 -04:00