Compare commits

...

3 Commits

Author SHA1 Message Date
578e47410b Bump version to 0.9.90 2024-01-11 00:14:49 -05:00
f2818385d4 Fix possible race condition applying schemas
Found an instance where two of these fired too close together, and
caused a fatal error. Use a write lock, and then catch the schema.apply
function in case it fails anyways.
2024-01-11 00:06:11 -05:00
efd915858e Use flask manage on Debian 11 2024-01-11 00:05:56 -05:00
10 changed files with 31 additions and 10 deletions

View File

@ -1 +1 @@
0.9.89
0.9.90

View File

@ -1,5 +1,12 @@
## PVC Changelog
###### [v0.9.90](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.90)
* [Client CLI/API Daemon] Adds additional backup metainfo and an emailed report option to autobackups.
* [All] Adds a live migration maximum downtime selector to help with busy VM migrations.
* [API Daemon] Fixes a database migration bug on Debian 11.
* [Node Daemon] Fixes a race condition when applying Zookeeper schema changes.
###### [v0.9.89](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.89)
* [API/Worker Daemons] Fixes a bug with the Celery result backends not being properly initialized on Debian 10/11.

View File

@ -13,8 +13,8 @@ fi
pushd /usr/share/pvc
case "$( cat /etc/debian_version )" in
10.*|11.*)
# Debian 10 & 11
10.*)
# Debian 10
./pvcapid-manage_legacy.py db upgrade
;;
*)

View File

@ -27,7 +27,7 @@ from distutils.util import strtobool as dustrtobool
import daemon_lib.config as cfg
# Daemon version
version = "0.9.89"
version = "0.9.90"
# API version
API_VERSION = 1.0

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup(
name="pvc",
version="0.9.89",
version="0.9.90",
packages=["pvc.cli", "pvc.lib"],
install_requires=[
"Click",

9
debian/changelog vendored
View File

@ -1,3 +1,12 @@
pvc (0.9.90-0) unstable; urgency=high
* [Client CLI/API Daemon] Adds additional backup metainfo and an emailed report option to autobackups.
* [All] Adds a live migration maximum downtime selector to help with busy VM migrations.
* [API Daemon] Fixes a database migration bug on Debian 11.
* [Node Daemon] Fixes a race condition when applying Zookeeper schema changes.
-- Joshua M. Boniface <joshua@boniface.me> Thu, 11 Jan 2024 00:14:49 -0500
pvc (0.9.89-0) unstable; urgency=high
* [API/Worker Daemons] Fixes a bug with the Celery result backends not being properly initialized on Debian 10/11.

View File

@ -33,7 +33,7 @@ import os
import signal
# Daemon version
version = "0.9.89"
version = "0.9.90"
##########################################################

View File

@ -49,7 +49,7 @@ import re
import json
# Daemon version
version = "0.9.89"
version = "0.9.90"
##########################################################
@ -197,7 +197,9 @@ def entrypoint():
os.execv(sys.argv[0], sys.argv)
# Validate the schema
pvcnoded.util.zookeeper.validate_schema(logger, zkhandler)
with zkhandler.writelock("base.schema.version"):
sleep(0.5)
pvcnoded.util.zookeeper.validate_schema(logger, zkhandler)
# Define a cleanup function
def cleanup(failure=False):

View File

@ -94,7 +94,10 @@ def validate_schema(logger, zkhandler):
# Validate our schema against the active version
if not zkhandler.schema.validate(zkhandler, logger):
logger.out("Found schema violations, applying", state="i")
zkhandler.schema.apply(zkhandler)
try:
zkhandler.schema.apply(zkhandler)
except Exception as e:
logger.out(f"Failed to apply schema updates: {e}", state="w")
else:
logger.out("Schema successfully validated", state="o")

View File

@ -44,7 +44,7 @@ from daemon_lib.vmbuilder import (
)
# Daemon version
version = "0.9.89"
version = "0.9.90"
config = cfg.get_configuration()