Commit Graph

2317 Commits

Author SHA1 Message Date
Joshua Boniface b8852e116e Improve handling of root disk in GRUB
Since vdX names become sdX names inside VMs, use the same setup as the
fstab in order to map this onto a static SCSI ID.
2020-03-02 10:02:39 -05:00
Joshua Boniface 9e468d3524 Increase build-and-deploy wait time to 15 2020-02-27 14:32:01 -05:00
Joshua Boniface 11f045f100 Support showing individual userdata and script doc
Closes #89
2020-02-27 14:31:08 -05:00
Joshua Boniface fd80eb9e22 Ensure profile creation works with empty lists
If we get a 404 code back from the upper function, we should create an
empty list rather than trying to loop through the dictionary.
2020-02-24 09:30:58 -05:00
Joshua Boniface 6ac82d6ce9 Ensure single-element templates are lists
Ensures any list-assuming statements later on hold true even when there
is only a single template entry.
2020-02-21 10:50:28 -05:00
Joshua Boniface b438b9b4c2 Import gevent for production listener 2020-02-21 09:39:07 -05:00
Joshua Boniface 4417bd374b Add Python requests toolbelt to CLI deps 2020-02-20 23:27:07 -05:00
Joshua Boniface 9d5f50f82a Implement progress bars for file uploads
Provide pretty status bars to indicate upload progress for tasks that
perform large file uploads to the API ('provisioner ova upload' and
'storage volume upload') so the administrator can gauge progress and
estimated time to completion.
2020-02-20 22:42:19 -05:00
Joshua Boniface 56a9e48163 Normalize all return messages
Ensure all API return messages are formated the same: no "error", a
final period except when displaying Exception text, and a regular spaced
out format.
2020-02-20 22:42:19 -05:00
Joshua Boniface 31a117e21c Fix call to config dictionary from pvc_api 2020-02-20 15:11:20 -05:00
Joshua Boniface 57768f2583 Remove an obsolete script 2020-02-19 21:40:23 -05:00
Joshua Boniface e4e4e336b4 Handle invalid cursor setup cleanly
This seems to happen only during termination, so catch it and continue
so the loop terminates.
2020-02-19 16:29:59 -05:00
Joshua Boniface 0caea03428 Clean up redundant message output 2020-02-19 16:27:14 -05:00
Joshua Boniface 65932b20d2 Handle request failures more gracefully 2020-02-19 16:19:34 -05:00
Joshua Boniface 1b8b32b07c Don't return tuple value on error 2020-02-19 15:47:08 -05:00
Joshua Boniface 39ce704969 Implement wait for node primary/secondary in CLI
Use a different wait method of querying the node status every
half-second during the transition, in order to wait on the transition to
complete if desired.

Closes #72
2020-02-19 14:33:31 -05:00
Joshua Boniface d2a5fe59c0 Use transitional takeover states for migration
Use a pair of transitional states, "takeover" and "relinquish", when
transitioning between primary and secondary coordinator states. This
provides a clsuter-wide record that the nodes are still working during
their synchronous transition states, and should allow clients to
determine when the node(s) have fully switched over. Also add an
additional 2 seconds of wait at the end of the transition jobs to ensure
everything has had a chance to start before proceeding.

References #72
2020-02-19 14:06:54 -05:00
Joshua Boniface 8678dedfea Revert "Implement wait for node coordinator transition"
This reverts commit 0aefafa7f7.

This does not work since the API goes away during the transition.

References #72
2020-02-19 10:50:21 -05:00
Joshua Boniface 0aefafa7f7 Implement wait for node coordinator transition
References #72
2020-02-19 10:50:04 -05:00
Joshua Boniface 6db4df51c0 Remove obsolete follow_console_log function 2020-02-19 10:19:49 -05:00
Joshua Boniface 5ddf72855b Clean up obsolete is_cli flags 2020-02-19 10:18:41 -05:00
Joshua Boniface 0e05ce8b07 Use correct wording of "shut down" 2020-02-19 10:04:58 -05:00
Joshua Boniface 78780039de Add wait support to VM CLI commands
References #72
2020-02-19 10:02:32 -05:00
Joshua Boniface 99f579e41a Add wait support to API commands
References #72
2020-02-19 09:51:42 -05:00
Joshua Boniface 07577a52a9 Implement wait support for various VM commands
Implements wait support for VM restart, shutdown, move, migrate, and
unmigrate commands, similar to node flush/node unflush.

Includes some additional refactoring of the move command to make its
operation identical to migrate, only without recording the previous
node.

References #72
2020-02-19 09:45:31 -05:00
Joshua Boniface 45040a5635 Make wait flag optional on flush functions
References #72
2020-02-19 09:44:38 -05:00
Joshua Boniface 097f0d9be4 Fix bug with script load from database 2020-02-18 20:39:36 -05:00
Joshua Boniface ca68321be3 Allow modification of system templates
Closes #82
2020-02-18 16:18:27 -05:00
Joshua Boniface b322841edf Complete integration of OVA provisioner
Finishes a basic form of OVA provisioning within the existing create_vm
function. Future plans should include separating out the functions and
cleaning them up a bit more, but this is sufficient for basic operation.

Closes #71
2020-02-18 14:42:45 -05:00
Joshua Boniface 4c58addead Fix typo'd storage_host entry 2020-02-18 14:42:32 -05:00
Joshua Boniface e811c5bbfb Fix renamed import for worker 2020-02-18 12:20:42 -05:00
Joshua Boniface dd44f2f42b Correct formatting error in confirmation 2020-02-17 23:31:03 -05:00
Joshua Boniface 24c86f2c42 Remove obsolete print statement 2020-02-17 23:25:27 -05:00
Joshua Boniface db558ec91f Complete implementation of OVA handling
Add functions for uploading, listing, and removing OVA images to the API
and CLI interfaces. Includes improved parsing of the OVF and creation of
a system_template and profile for each OVA.

Also modifies some behaviour around profiles, making most components
option at creation to support both profile types (and incomplete
profiles generally).

Implementation part 2/3 - remaining: OVA VM creation

References #71
2020-02-17 23:22:50 -05:00
Joshua Boniface 7c99618752 Correct handling of bare bytes values 2020-02-17 12:32:20 -05:00
Joshua Boniface 59ca296c58 Add basic OVA profile support 2020-02-17 12:00:51 -05:00
Joshua Boniface c18c76f42c Add alembic script_location field 2020-02-17 11:36:33 -05:00
Joshua Boniface a7432281a8 Fix script link in postinst message 2020-02-17 11:31:41 -05:00
Joshua Boniface d975f90f29 Add database fields for OVA storage 2020-02-17 11:27:35 -05:00
Joshua Boniface b16e2b4925 Handle CLI wildcard addresses properly
If the local API instance is listening on a wildcard, connect to
127.0.0.1 instead.
2020-02-16 20:02:08 -05:00
Joshua Boniface 90f965f516 Remove installation of obsolete script 2020-02-16 19:51:51 -05:00
Joshua Boniface d2b52c6fe6 Avoid auto-commit in migration generation 2020-02-16 19:51:31 -05:00
Joshua Boniface 8125aea4f3 Clean up some database columns 2020-02-16 19:19:04 -05:00
Joshua Boniface f3de900bdb Import all database models 2020-02-16 19:15:21 -05:00
Joshua Boniface 9c7041f12c Update package version to 0.7 2020-02-15 23:25:47 -05:00
Joshua Boniface c67fc05219 Add DB migration update script 2020-02-15 23:23:09 -05:00
Joshua Boniface 760805fec1 Ensure database migrations are in source control 2020-02-15 23:16:40 -05:00
Joshua Boniface 158ed8d3f0 Remove obsolete schema definition 2020-02-15 23:04:21 -05:00
Joshua Boniface 574623f2a8 Remove obsolete script 2020-02-15 22:59:12 -05:00
Joshua Boniface db09b4c983 Correct some ordering in build-and-deploy 2020-02-15 22:51:35 -05:00