Compare commits
5 Commits
a66449541d
...
v0.9.93
Author | SHA1 | Date | |
---|---|---|---|
18f09196be | |||
8419659e1b | |||
df40b779af | |||
db4f0881a2 | |||
9b51fe9f10 |
12
CHANGELOG.md
12
CHANGELOG.md
@ -1,5 +1,17 @@
|
|||||||
## PVC Changelog
|
## PVC Changelog
|
||||||
|
|
||||||
|
###### [v0.9.93](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.93)
|
||||||
|
|
||||||
|
* [API Daemon] Fixes a bug where stuck zkhandler threads were not cleaned up on error
|
||||||
|
|
||||||
|
###### [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)
|
###### [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.
|
* [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
|
import daemon_lib.config as cfg
|
||||||
|
|
||||||
# Daemon version
|
# Daemon version
|
||||||
version = "0.9.91"
|
version = "0.9.93"
|
||||||
|
|
||||||
# API version
|
# API version
|
||||||
API_VERSION = 1.0
|
API_VERSION = 1.0
|
||||||
|
@ -140,15 +140,31 @@ def call_api(
|
|||||||
# Determine the request type and hit the API
|
# Determine the request type and hit the API
|
||||||
disable_warnings()
|
disable_warnings()
|
||||||
try:
|
try:
|
||||||
|
response = None
|
||||||
if operation == "get":
|
if operation == "get":
|
||||||
response = requests.get(
|
retry_on_code = [429, 500, 502, 503, 504]
|
||||||
uri,
|
for i in range(3):
|
||||||
timeout=timeout,
|
failed = False
|
||||||
headers=headers,
|
try:
|
||||||
params=params,
|
response = requests.get(
|
||||||
data=data,
|
uri,
|
||||||
verify=config["verify_ssl"],
|
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":
|
if operation == "post":
|
||||||
response = requests.post(
|
response = requests.post(
|
||||||
uri,
|
uri,
|
||||||
@ -189,7 +205,8 @@ def call_api(
|
|||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
message = "Failed to connect to the API: {}".format(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
|
# Display debug output
|
||||||
if config["debug"]:
|
if config["debug"]:
|
||||||
|
@ -430,7 +430,7 @@ def format_list_osd(config, osd_list):
|
|||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if osd_information["is_split"]:
|
if osd_information.get("is_split") is not None:
|
||||||
osd_information["device"] = f"{osd_information['device']} [s]"
|
osd_information["device"] = f"{osd_information['device']} [s]"
|
||||||
|
|
||||||
# Deal with the size to human readable
|
# Deal with the size to human readable
|
||||||
|
@ -1717,7 +1717,7 @@ def format_info(config, domain_information, long_output):
|
|||||||
"{}Max live downtime:{} {}".format(
|
"{}Max live downtime:{} {}".format(
|
||||||
ansiprint.purple(),
|
ansiprint.purple(),
|
||||||
ansiprint.end(),
|
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(
|
setup(
|
||||||
name="pvc",
|
name="pvc",
|
||||||
version="0.9.91",
|
version="0.9.93",
|
||||||
packages=["pvc.cli", "pvc.lib"],
|
packages=["pvc.cli", "pvc.lib"],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
"Click",
|
"Click",
|
||||||
|
@ -57,10 +57,11 @@ class ZKConnection(object):
|
|||||||
schema_version = 0
|
schema_version = 0
|
||||||
zkhandler.schema.load(schema_version, quiet=True)
|
zkhandler.schema.load(schema_version, quiet=True)
|
||||||
|
|
||||||
ret = function(zkhandler, *args, **kwargs)
|
try:
|
||||||
|
ret = function(zkhandler, *args, **kwargs)
|
||||||
zkhandler.disconnect()
|
finally:
|
||||||
del zkhandler
|
zkhandler.disconnect()
|
||||||
|
del zkhandler
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
16
debian/changelog
vendored
16
debian/changelog
vendored
@ -1,3 +1,19 @@
|
|||||||
|
pvc (0.9.93-0) unstable; urgency=high
|
||||||
|
|
||||||
|
* [API Daemon] Fixes a bug where stuck zkhandler threads were not cleaned up on error
|
||||||
|
|
||||||
|
-- Joshua M. Boniface <joshua@boniface.me> Tue, 30 Jan 2024 09:51:21 -0500
|
||||||
|
|
||||||
|
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
|
pvc (0.9.91-0) unstable; urgency=high
|
||||||
|
|
||||||
* [Client CLI] Fixes a bug and improves output during cluster task events.
|
* [Client CLI] Fixes a bug and improves output during cluster task events.
|
||||||
|
@ -33,7 +33,7 @@ import os
|
|||||||
import signal
|
import signal
|
||||||
|
|
||||||
# Daemon version
|
# Daemon version
|
||||||
version = "0.9.91"
|
version = "0.9.93"
|
||||||
|
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
|
@ -49,7 +49,7 @@ import re
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
# Daemon version
|
# Daemon version
|
||||||
version = "0.9.91"
|
version = "0.9.93"
|
||||||
|
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
|
@ -44,7 +44,7 @@ from daemon_lib.vmbuilder import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Daemon version
|
# Daemon version
|
||||||
version = "0.9.91"
|
version = "0.9.93"
|
||||||
|
|
||||||
|
|
||||||
config = cfg.get_configuration()
|
config = cfg.get_configuration()
|
||||||
|
Reference in New Issue
Block a user