Compare commits
3 Commits
a66449541d
...
v0.9.92
Author | SHA1 | Date | |
---|---|---|---|
df40b779af | |||
db4f0881a2 | |||
9b51fe9f10 |
@ -1,5 +1,13 @@
|
||||
## PVC Changelog
|
||||
|
||||
###### [v0.9.92](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.92)
|
||||
|
||||
* [CLI Client] Adds the new restore state to the colours list for VM status
|
||||
* [API Daemon] Fixes an incorrect variable assignment
|
||||
* [Provisioner] Improves the error handling of various steps in the debootstrap and rinse example scripts
|
||||
* [CLI Client] Fixes two bugs around missing keys that were added recently (uses get() instead direct dictionary refs)
|
||||
* [CLI Client] Improves API error handling via GET retries (x3) and better server status code handling
|
||||
|
||||
###### [v0.9.91](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.91)
|
||||
|
||||
* [Client CLI] Fixes a bug and improves output during cluster task events.
|
||||
|
@ -27,7 +27,7 @@ from distutils.util import strtobool as dustrtobool
|
||||
import daemon_lib.config as cfg
|
||||
|
||||
# Daemon version
|
||||
version = "0.9.91"
|
||||
version = "0.9.92"
|
||||
|
||||
# API version
|
||||
API_VERSION = 1.0
|
||||
|
@ -140,15 +140,31 @@ def call_api(
|
||||
# Determine the request type and hit the API
|
||||
disable_warnings()
|
||||
try:
|
||||
response = None
|
||||
if operation == "get":
|
||||
response = requests.get(
|
||||
uri,
|
||||
timeout=timeout,
|
||||
headers=headers,
|
||||
params=params,
|
||||
data=data,
|
||||
verify=config["verify_ssl"],
|
||||
)
|
||||
retry_on_code = [429, 500, 502, 503, 504]
|
||||
for i in range(3):
|
||||
failed = False
|
||||
try:
|
||||
response = requests.get(
|
||||
uri,
|
||||
timeout=timeout,
|
||||
headers=headers,
|
||||
params=params,
|
||||
data=data,
|
||||
verify=config["verify_ssl"],
|
||||
)
|
||||
if response.status_code in retry_on_code:
|
||||
failed = True
|
||||
continue
|
||||
except requests.exceptions.ConnectionError:
|
||||
failed = True
|
||||
pass
|
||||
if failed:
|
||||
error = f"Code {response.status_code}" if response else "Timeout"
|
||||
raise requests.exceptions.ConnectionError(
|
||||
f"Failed to connect after 3 tries ({error})"
|
||||
)
|
||||
if operation == "post":
|
||||
response = requests.post(
|
||||
uri,
|
||||
@ -189,7 +205,8 @@ def call_api(
|
||||
)
|
||||
except Exception as e:
|
||||
message = "Failed to connect to the API: {}".format(e)
|
||||
response = ErrorResponse({"message": message}, 500)
|
||||
code = response.status_code if response else 504
|
||||
response = ErrorResponse({"message": message}, code)
|
||||
|
||||
# Display debug output
|
||||
if config["debug"]:
|
||||
|
@ -430,7 +430,7 @@ def format_list_osd(config, osd_list):
|
||||
)
|
||||
continue
|
||||
|
||||
if osd_information["is_split"]:
|
||||
if osd_information.get("is_split") is not None:
|
||||
osd_information["device"] = f"{osd_information['device']} [s]"
|
||||
|
||||
# Deal with the size to human readable
|
||||
|
@ -1717,7 +1717,7 @@ def format_info(config, domain_information, long_output):
|
||||
"{}Max live downtime:{} {}".format(
|
||||
ansiprint.purple(),
|
||||
ansiprint.end(),
|
||||
f"{domain_information['migration_max_downtime']} ms",
|
||||
f"{domain_information.get('migration_max_downtime')} ms",
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -2,7 +2,7 @@ from setuptools import setup
|
||||
|
||||
setup(
|
||||
name="pvc",
|
||||
version="0.9.91",
|
||||
version="0.9.92",
|
||||
packages=["pvc.cli", "pvc.lib"],
|
||||
install_requires=[
|
||||
"Click",
|
||||
|
10
debian/changelog
vendored
10
debian/changelog
vendored
@ -1,3 +1,13 @@
|
||||
pvc (0.9.92-0) unstable; urgency=high
|
||||
|
||||
* [CLI Client] Adds the new restore state to the colours list for VM status
|
||||
* [API Daemon] Fixes an incorrect variable assignment
|
||||
* [Provisioner] Improves the error handling of various steps in the debootstrap and rinse example scripts
|
||||
* [CLI Client] Fixes two bugs around missing keys that were added recently (uses get() instead direct dictionary refs)
|
||||
* [CLI Client] Improves API error handling via GET retries (x3) and better server status code handling
|
||||
|
||||
-- Joshua M. Boniface <joshua@boniface.me> Mon, 29 Jan 2024 09:39:10 -0500
|
||||
|
||||
pvc (0.9.91-0) unstable; urgency=high
|
||||
|
||||
* [Client CLI] Fixes a bug and improves output during cluster task events.
|
||||
|
@ -33,7 +33,7 @@ import os
|
||||
import signal
|
||||
|
||||
# Daemon version
|
||||
version = "0.9.91"
|
||||
version = "0.9.92"
|
||||
|
||||
|
||||
##########################################################
|
||||
|
@ -49,7 +49,7 @@ import re
|
||||
import json
|
||||
|
||||
# Daemon version
|
||||
version = "0.9.91"
|
||||
version = "0.9.92"
|
||||
|
||||
|
||||
##########################################################
|
||||
|
@ -44,7 +44,7 @@ from daemon_lib.vmbuilder import (
|
||||
)
|
||||
|
||||
# Daemon version
|
||||
version = "0.9.91"
|
||||
version = "0.9.92"
|
||||
|
||||
|
||||
config = cfg.get_configuration()
|
||||
|
Reference in New Issue
Block a user