37 Commits

Author SHA1 Message Date
1d90b066bc Add guard rails against manipulating mirrors
Snapshot mirrors should normally be promoted using "mirror promote", and
not started manually. This adds guard rails against that to the "start",
"stop", and "disable" state commands to prevent changing mirror states
without an explicit "--force" option.
2024-10-08 23:51:48 -04:00
3ea7421f09 Implement friendlier VM mirror commands
Adds two helper commands which automate sending and promoting VM
snapshots as "vm mirror" commands.

"vm mirror create" replicates the functionality of "snapshot create" and
"snapshot send", performing both in one single task using an
autogenerated dated snapshot name for automatic cross-cluster
replication.

"vm mirror promote" replicates the functionality of "vm shutdown",
"snapshot create", "snapshot send", "vm start" (remote), and,
optionally, "vm remove", performing in one single task an entire
cross-cluster VM move with or without retaining the copy on the local
cluster (if retained, the local copy becomes a snapshot mirror of the
remote, flipping their statuses).
2024-10-08 23:51:39 -04:00
8fa37d21c0 Fix handling of invalid network lengths 2024-09-29 00:39:53 -04:00
f462ebbc6b Add VM snapshot send (initial) 2024-09-28 10:49:35 -04:00
1cbadb1172 Add "mirror" VM state 2024-09-28 02:01:56 -04:00
0d918d66fe Port VM autobackups into pvcworkerd with snaps
Moves VM autobackups from being in-CLI to being handled by the
pvcworkerd system on the primary coordinator. Turns the CLI autobackup
command into an actual API client endpoint rather than having its logic
in the CLI.

In addition, modifies the new autobackup to leverage the new "pvc vm
snapshot" function set, just with special snapshot names. This helps
automate this within the new snapshot scaffolding.
2024-08-23 17:23:06 -04:00
9a661d0173 Convert VM snapshots to worker tasks
Improves manageability and offloads these from the API context.
2024-08-20 16:50:41 -04:00
7cc354466f Finish implementing snapshot import 2024-08-20 11:25:09 -04:00
d060787503 Add initial implementation of snapshot export 2024-08-19 18:46:07 -04:00
33f905459a Implement VM rollback
Closes #184
2024-08-16 10:47:18 -04:00
174e6e08e3 Correct issues with VM output formats 2024-08-16 10:46:25 -04:00
9f85c92dff Handle missing or empty snapshot lists 2024-08-16 10:46:25 -04:00
4b30d2f58a Always show snapshots 2024-08-16 10:46:25 -04:00
2fcee28fed Hide topology in long output 2024-08-16 10:46:25 -04:00
1f18e88c06 Add snapshots to VM info details 2024-08-16 10:46:25 -04:00
a4ca112128 Add snapshot count to VM list 2024-08-16 10:46:25 -04:00
0c240a5129 Add VM snapshot removal 2024-08-16 10:46:25 -04:00
553c1e670e Add VM snapshots functionality
Adds the ability to create snapshots of an entire VM, including all its
RBD disks and the VM XML config, though not any PVC metadata.
2024-08-16 10:46:25 -04:00
9714ac20b2 Update formatting for Black 24.4.0 2024-04-19 10:26:06 -04:00
9b51fe9f10 Use get() for newer keys in client 2024-01-29 09:21:02 -05:00
e5e9c7086a Add missing restore state to colours 2024-01-24 09:34:59 -05:00
6d6420a695 Add missing value to vm_define function 2024-01-23 09:58:32 -05:00
09269f182c Add live migrate max downtime selector meta field
Adds a new flag to VM metadata to allow setting the VM live migration
max downtime. This will enable very busy VMs that hang live migration to
have this value changed.
2024-01-11 00:05:50 -05:00
123c7ce857 Update copyright header on all files for 2024
Last release of 2023 is probably the best time to do this.
2023-12-29 11:16:59 -05:00
5d9e83e8ed Fix output bugs in VM information 2023-12-11 03:04:46 -05:00
484e6542c2 Port remaining tasks to new task handler
Move the create_vm and run_benchmark tasks to use the new Celery
subsystem, handlers, and wait command. Remove the obsolete, dedicated
API endpoints.

Standardize the CLI client and move the repeated handler code into a
separate common function.
2023-11-16 02:00:23 -05:00
ce17c60a20 Port OSD on-node tasks to Celery worker system
Adds Celery versions of the osd_add, osd_replace, osd_refresh,
osd_remove, and osd_db_vg_add functions.
2023-11-09 23:28:08 -05:00
89681d54b9 Port VM on-node tasks to Celery worker system
Adds Celery versions of the flush_locks, device_attach, and
device_detach functions.
2023-11-06 20:40:46 -05:00
c87736eb0a Use consistent path name and format 2023-10-24 01:20:44 -04:00
63d0a85e29 Add backup deletion command 2023-10-24 01:18:27 -04:00
55ca131c2c Handle snapshots on restore and provide options
Also rename the retain option to remove superfluous plural.
2023-10-24 00:25:06 -04:00
8d256a1737 Complete VM restore functionality 2023-10-23 22:23:17 -04:00
b997c6f31e Add support for full VM backups
Adds support for exporting full VM backups, including configuration,
metainfo, and RBD disk images, with incremental support.
2023-10-17 10:15:06 -04:00
ae7950e9b7 Fix bad import 2023-08-17 22:45:50 -04:00
d2bcaec28f Move new CLI client into place 2023-08-16 23:55:27 -04:00
a70273dbae Move old CLI client out of the way 2023-08-16 23:54:51 -04:00
4685ba1ec4 Move cli_lib to lib directory 2023-05-01 13:43:54 -04:00