Commit Graph

2541 Commits

Author SHA1 Message Date
Joshua Boniface 07f2006f68 Fix bug when removing OSDs
Ensure the OSD is down as well as out or purge might fail.
2021-12-28 03:05:34 -05:00
Joshua Boniface f4c7fdffb8 Handle detect strings as arguments for blockdevs
Allows specifying blockdevs in the OSD and OSD-DB addition commands as
detect strings rather than actual block device paths. This provides
greater flexibility for automation with pvcbootstrapd (which originates
the concept of detect strings) and in general usage as well.
2021-12-28 02:53:02 -05:00
Joshua Boniface be1b67b8f0 Allow bypassing confirm message for benchmarks 2021-12-23 21:00:42 -05:00
Joshua Boniface d68f6a945e Add auditing to local syslog from PVC client
This ensures that any client command is logged by the local system.
Helps ensure Accounting for users of the CLI. Currently logs the full
command executed along with the $USER environment variable contents.
2021-12-10 16:17:33 -05:00
Joshua Boniface c776aba8b3 Standardize fuzzy matching and use fullmatch
Solves two problems:

1. How match fuzziness was used was very inconsistent; make them all the
same, i.e. "if is_fuzzy and limit, apply .* to both sides".

2. Use re.fullmatch instead of re.match to ensure exact matching of the
regex to the value. Without fuzziness, this would sometimes cause
inconsistent behavior, for instance if a limit was non-fuzzy "vm",
expecting to match the actual "vm", but also matching "vm1" too.
2021-12-06 16:35:29 -05:00
Joshua Boniface 2461941421 Remove "and started" from message text
This is not necessarily the case.
2021-11-29 16:42:26 -05:00
Joshua Boniface 68954a79ec Fix bug with cloned image sizes 2021-11-29 14:56:50 -05:00
Joshua Boniface a2fa6ed450 Fix bugs with legacy benchmark format 2021-11-26 11:42:35 -05:00
Joshua Boniface 02a2f6a27a Bump version to 0.9.45 2021-11-25 09:34:20 -05:00
Joshua Boniface a75b951605 Ensure echo always has an argument 2021-11-25 09:33:26 -05:00
Joshua Boniface 658e80350f Fix ordering of pvcnoded unit
We want to be after network.target and want network-online.target
2021-11-18 16:56:49 -05:00
Joshua Boniface 3aa20fbaa3 Bump version to 0.9.44 2021-11-11 16:20:38 -05:00
Joshua Boniface 6d101df1ff Add Munin plugin for Ceph utilization 2021-11-08 15:21:09 -05:00
Joshua Boniface be6a3992c1 Add 0.05s to connection timeout
This is recommended by the Python Requests documentation:

> It’s a good practice to set connect timeouts to slightly larger than a
  multiple of 3, which is the default TCP packet retransmission window.
2021-11-08 03:11:41 -05:00
Joshua Boniface d76da0f25a Use separate connect and data timeouts
This allows us to keep a very low connect timeout of 3 seconds, but also
ensure that long commands (e.g. --wait or VM disable) can take as long
as the API requires to complete.

Avoids having to explicitly set very long single-instance timeouts for
other functions which would block forever on an unreachable API.
2021-11-08 03:10:09 -05:00
Joshua Boniface bc722ce9b8 Fix quote in sed for unstable deb build 2021-11-08 02:54:27 -05:00
Joshua Boniface 7890c32c59 Add sudo to deploy-package task 2021-11-08 02:41:10 -05:00
Joshua Boniface 6febcfdd97 Bump version to 0.9.43 2021-11-08 02:29:17 -05:00
Joshua Boniface 11d8ce70cd Fix sed commands after Black formatting change 2021-11-08 02:29:05 -05:00
Joshua Boniface a17d9439c0 Remove references to Ansible manual 2021-11-08 00:29:47 -05:00
Joshua Boniface 9cd02eb148 Remove Ansible and Testing manuals
The Ansible manual can't keep up with the other repo, so it should live
there instead (eventually, after significant rewrites).

The Testing page is obsoleted by the "test-cluster" script.
2021-11-08 00:25:27 -05:00
Joshua Boniface 459485c202 Allow American spelling for compatibility 2021-11-08 00:09:59 -05:00
Joshua Boniface 9f92d5d822 Shorten help messages slightly to fit 2021-11-08 00:07:21 -05:00
Joshua Boniface 947ac561c8 Add forced colour support
Allows preserving colour within e.g. watch, where Click would normally
determine that it is "not a terminal". This is done via the wrapper echo
which filters via the local config.
2021-11-08 00:04:20 -05:00
Joshua Boniface ca143c1968 Add funding configuration 2021-11-06 18:05:17 -04:00
Joshua Boniface 6e110b178c Add start delineators to command output 2021-11-06 13:35:30 -04:00
Joshua Boniface d07d37d08e Revamp formatting and linting on commit
Remove the prepare script, and run the two stages manually. Better
handle Black reformatting by doing a check (for the errcode) then
reformat and abort commit to review.
2021-11-06 13:34:33 -04:00
Joshua Boniface 0639b16c86 Apply more granular timeout formatting
We don't need to wait forever if state changes aren't waiting or disable
(which does a shutdown before returning).
2021-11-06 13:34:03 -04:00
Joshua Boniface 1cf8706a52 Up timeout when setting VM state
Ensures the API won't time out immediately especially during a
wait-flagged or disable action.
2021-11-06 04:15:10 -04:00
Joshua Boniface dd8f07526f Use positive check rather than negative
Ensure the VM is start before doing shutdown/stop, rather than being
stopped. Prevents overwrite of existing disable state and other
weirdness.
2021-11-06 04:08:33 -04:00
Joshua Boniface 5a5e5da663 Add disable forcing to CLI
References #148
2021-11-06 04:02:50 -04:00
Joshua Boniface 739b60b91e Perform automatic shutdown/stop on VM disable
Instead of requiring the VM to already be stopped, instead allow disable
state changes to perform a shutdown first. Also add a force option which
will do a hard stop instead of a shutdown.

References #148
2021-11-06 03:57:24 -04:00
Joshua Boniface 16544227eb Reformat recent changes with Black 2021-11-06 03:27:07 -04:00
Joshua Boniface 73e3746885 Fix linting error F541 f-string placeholders 2021-11-06 03:26:03 -04:00
Joshua Boniface 66230ce971 Fix linting errors F522/F523 unused args 2021-11-06 03:24:50 -04:00
Joshua Boniface fbfbd70461 Rename build-deb.sh to build-stable-deb.sh
Unifies the naming with the other build-unstable-deb.sh script.
2021-11-06 03:18:58 -04:00
Joshua Boniface 2506098223 Remove obsolete gitlab-ci config 2021-11-06 03:18:22 -04:00
Joshua Boniface 83e887c4ee Ensure all helper scripts pushd/popd
Make sure all of these move to the root of the repository first, then
return to where they were afterwards, using pushd/popd. This allows them
to be executed from anywhere in the repo.
2021-11-06 03:17:47 -04:00
Joshua Boniface 4eb0f3bb8a Unify formatting and linting
Ensures optimal formatting in addition to linting during manual deploys
and during pre-commit actions.
2021-11-06 03:10:17 -04:00
Joshua Boniface adc767e32f Add newline to start of lint 2021-11-06 03:04:14 -04:00
Joshua Boniface 2083fd824a Reformat code with Black code formatter
Unify the code style along PEP and Black principles using the tool.
2021-11-06 03:02:43 -04:00
Joshua Boniface 3aa74a3940 Add safe mode to Black 2021-11-06 02:59:54 -04:00
Joshua Boniface 71d94bbeab Move Flake configuration into dedicated file
Avoid passing arguments in the script.
2021-11-06 02:55:37 -04:00
Joshua Boniface 718f689df9 Clean up linter after Black add (pass two) 2021-11-06 02:51:14 -04:00
Joshua Boniface 268b5c0b86 Exclude Alembic migrations from Black
These files are autogenerated with their own formats, so we don't want
to override that.
2021-11-06 02:46:06 -04:00
Joshua Boniface b016b9bf3d Clean up linter after Black add (pass one) 2021-11-06 02:44:24 -04:00
Joshua Boniface 7604b9611f Add black formatter to project root 2021-11-06 02:44:05 -04:00
Joshua Boniface b21278fd80 Add Basic Builder configuration
Configuration for my new CI system under Gitea.
2021-10-31 00:09:55 -04:00
Joshua Boniface 3b02034b70 Add some delay and additional tries to fencing 2021-10-27 16:24:17 -04:00
Joshua Boniface c7a5b41b1e Fix ordering to show correct message 2021-10-27 13:37:52 -04:00