Compare commits

...

8 Commits

Author SHA1 Message Date
f1df1cfe93 Bump version to 0.9.55 2022-10-04 13:21:40 -04:00
5942aa50fc Avoid raise/handle deadlocks
Can cause log flooding in some edge cases and isn't really needed any
longer. Use a proper conditional followed by an actual error handler.
2022-10-03 14:04:12 -04:00
096bcdfd75 Try a literal eval first
This is a breakage between the older version of Celery (Deb10) and
newer. The hard removal broke Deb10 instances.

So try that first, and on failure, assume newer Celery format.
2022-09-06 10:34:50 -04:00
239c392892 Bump version to 0.9.54 2022-08-23 11:01:05 -04:00
172d0a86e4 Use proper SSLContext and enable TLSv1
It's bad, but sometimes you need to access the API from a very old
software version. So just enable it for now and clean it up later.
2022-08-23 10:58:47 -04:00
d8e57a26c5 Fix bad variable name 2022-08-18 11:37:57 -04:00
9b499b9f48 Bump version to 0.9.53 2022-08-12 17:47:11 -04:00
881550b610 Actually fix VM sorting
Due to the executor the previous attempt did not work.
2022-08-12 17:46:29 -04:00
10 changed files with 74 additions and 20 deletions

View File

@ -1 +1 @@
0.9.52 0.9.55

View File

@ -1,5 +1,19 @@
## PVC Changelog ## PVC Changelog
###### [v0.9.55](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.55)
* Fixes a problem with the literal eval handler in the provisioner (again)
* Fixes a potential log deadlock in Zookeeper-lost situations when doing keepalives
###### [v0.9.54](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.54)
[CLI Client] Fixes a bad variable reference from the previous change
[API Daemon] Enables TLSv1 with an SSLContext object for maximum compatibility
###### [v0.9.53](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.53)
* [API] Fixes sort order of VM list (for real this time)
###### [v0.9.52](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.52) ###### [v0.9.52](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.52)
* [CLI] Fixes a bug with vm modify not requiring a cluster * [CLI] Fixes a bug with vm modify not requiring a cluster

View File

@ -22,10 +22,12 @@
import os import os
import yaml import yaml
from ssl import SSLContext, TLSVersion
from distutils.util import strtobool as dustrtobool from distutils.util import strtobool as dustrtobool
# Daemon version # Daemon version
version = "0.9.52" version = "0.9.55"
# API version # API version
API_VERSION = 1.0 API_VERSION = 1.0
@ -123,7 +125,10 @@ def entrypoint():
import pvcapid.flaskapi as pvc_api # noqa: E402 import pvcapid.flaskapi as pvc_api # noqa: E402
if config["ssl_enabled"]: if config["ssl_enabled"]:
context = (config["ssl_cert_file"], config["ssl_key_file"]) context = SSLContext()
context.minimum_version = TLSVersion.TLSv1
context.get_ca_certs()
context.load_cert_chain(config["ssl_cert_file"], keyfile=config["ssl_key_file"])
else: else:
context = None context = None

View File

@ -26,6 +26,7 @@ from requests_toolbelt.multipart.encoder import (
import pvc.cli_lib.ansiprint as ansiprint import pvc.cli_lib.ansiprint as ansiprint
from pvc.cli_lib.common import UploadProgressBar, call_api from pvc.cli_lib.common import UploadProgressBar, call_api
from ast import literal_eval
# #
@ -792,10 +793,16 @@ def task_status(config, task_id=None, is_watching=False):
task["type"] = task_type task["type"] = task_type
task["worker"] = task_host task["worker"] = task_host
task["id"] = task_job.get("id") task["id"] = task_job.get("id")
task_args = task_job.get("args") try:
task_args = literal_eval(task_job.get("args"))
except Exception:
task_args = task_job.get("args")
task["vm_name"] = task_args[0] task["vm_name"] = task_args[0]
task["vm_profile"] = task_args[1] task["vm_profile"] = task_args[1]
task_kwargs = task_job.get("kwargs") try:
task_kwargs = literal_eval(task_job.get("kwargs"))
except Exception:
task_kwargs = task_job.get("kwargs")
task["vm_define"] = str(bool(task_kwargs["define_vm"])) task["vm_define"] = str(bool(task_kwargs["define_vm"]))
task["vm_start"] = str(bool(task_kwargs["start_vm"])) task["vm_start"] = str(bool(task_kwargs["start_vm"]))
task_data.append(task) task_data.append(task)

View File

@ -1353,7 +1353,7 @@ def vm_stop(domain, confirm_flag):
@click.argument("domain") @click.argument("domain")
@click.option( @click.option(
"--force", "--force",
"force", "force_flag",
is_flag=True, is_flag=True,
default=False, default=False,
help="Forcibly stop the VM instead of waiting for shutdown.", help="Forcibly stop the VM instead of waiting for shutdown.",

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup( setup(
name="pvc", name="pvc",
version="0.9.52", version="0.9.55",
packages=["pvc", "pvc.cli_lib"], packages=["pvc", "pvc.cli_lib"],
install_requires=[ install_requires=[
"Click", "Click",

View File

@ -1292,4 +1292,4 @@ def get_list(zkhandler, node, state, tag, limit, is_fuzzy=True, negate=False):
except Exception: except Exception:
pass pass
return True, vm_data_list return True, sorted(vm_data_list, key=lambda d: d["name"])

20
debian/changelog vendored
View File

@ -1,3 +1,23 @@
pvc (0.9.55-0) unstable; urgency=high
* Fixes a problem with the literal eval handler in the provisioner (again)
* Fixes a potential log deadlock in Zookeeper-lost situations when doing keepalives
-- Joshua M. Boniface <joshua@boniface.me> Tue, 04 Oct 2022 13:21:40 -0400
pvc (0.9.54-0) unstable; urgency=high
[CLI Client] Fixes a bad variable reference from the previous change
[API Daemon] Enables TLSv1 with an SSLContext object for maximum compatibility
-- Joshua M. Boniface <joshua@boniface.me> Tue, 23 Aug 2022 11:01:05 -0400
pvc (0.9.53-0) unstable; urgency=high
* [API] Fixes sort order of VM list (for real this time)
-- Joshua M. Boniface <joshua@boniface.me> Fri, 12 Aug 2022 17:47:11 -0400
pvc (0.9.52-0) unstable; urgency=high pvc (0.9.52-0) unstable; urgency=high
* [CLI] Fixes a bug with vm modify not requiring a cluster * [CLI] Fixes a bug with vm modify not requiring a cluster

View File

@ -48,7 +48,7 @@ import re
import json import json
# Daemon version # Daemon version
version = "0.9.52" version = "0.9.55"
########################################################## ##########################################################

View File

@ -661,15 +661,19 @@ def node_keepalive(logger, config, zkhandler, this_node):
zkhandler.read("base.config.migration_target_selector") zkhandler.read("base.config.migration_target_selector")
!= config["migration_target_selector"] != config["migration_target_selector"]
): ):
raise zkhandler.write(
[
(
"base.config.migration_target_selector",
config["migration_target_selector"],
)
]
)
except Exception: except Exception:
zkhandler.write( logger.out(
[ "Failed to set migration target selector in Zookeeper",
( state="e",
"base.config.migration_target_selector", prefix="main-thread",
config["migration_target_selector"],
)
]
) )
# Set the upstream IP in Zookeeper for clients to read # Set the upstream IP in Zookeeper for clients to read
@ -680,10 +684,14 @@ def node_keepalive(logger, config, zkhandler, this_node):
zkhandler.read("base.config.upstream_ip") zkhandler.read("base.config.upstream_ip")
!= config["upstream_floating_ip"] != config["upstream_floating_ip"]
): ):
raise zkhandler.write(
[("base.config.upstream_ip", config["upstream_floating_ip"])]
)
except Exception: except Exception:
zkhandler.write( logger.out(
[("base.config.upstream_ip", config["upstream_floating_ip"])] "Failed to set upstream floating IP in Zookeeper",
state="e",
prefix="main-thread",
) )
# Get past state and update if needed # Get past state and update if needed