Compare commits

..

3 Commits

Author SHA1 Message Date
8283f972e4 Fix bug where RBD list is not updated on rename 2025-03-13 23:36:00 -04:00
0d97ba1f93 Integrate version hardcoding into CLI
The get_distribution load was very heavy, so follow the other parts and
just hardcode the version in. Also update bump-version to work with this
and with the new pyproject.toml configuration, and add a custom
user-agent to the API requests leveraging this version.
2025-03-13 09:26:54 -04:00
768d435445 Fix build errors 2025-03-13 00:37:18 -04:00
12 changed files with 14 additions and 59 deletions

View File

@ -1 +1 @@
1.0.1
0.9.107

View File

@ -1,22 +1,5 @@
## PVC Changelog
###### [v1.0.1](https://github.com/parallelvirtualcluster/pvc/releases/tag/v1.0.1)
* [CLI Client] [Bugfix] Fix bug with DELETE endpoints returning invalid data
###### [v1.0](https://github.com/parallelvirtualcluster/pvc/releases/tag/v1.0)
**Announcement**: We are pleased to announce PVC 1.0! Functionally speaking, there are only a few minor improvements over the previous 0.9.107, but I believe it's finally time to call this a "1.0" release. Recently I have had much less opportunity to work on PVC as I would like, so some features are still not quite there, but those can arrive in future versions over time.
**Enhancement**: The PVC CLI has been made much more efficient in terms of imports, allowing it to run on much lower spec hardware (in my case, on a small SBC). It's still not perfect, but multi-second import times are no longer an issue. The CLI client has also been moved to a more modern build system in preparation for Debian 13 "Trixie".
* [Daemons] Add cluster name to outputs during startup
* [CLI Client] Translate domain UUIDs to names in full node detail output for better readability
* [CLI Client] Fix colouring bug for mirror state
* [CLI Client] Significantly improve import efficiency throughout the client to avoid long load times on slow hardware
* [CLI Client] Port build to pyproject.toml and increase Debuild compat to 13
* [API Daemon] Fix bug with RBD list update after VM rename
* [API Daemon] Fix bug/crash if Ceph volume stats are invalid/empty
###### [v0.9.107](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.107)
* [Worker Daemon] Fixes a bug where snapshot removal fails during autobackups

View File

@ -23,7 +23,7 @@ sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," health
sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," worker-daemon/pvcworkerd/Daemon.py
sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," api-daemon/pvcapid/Daemon.py
sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," client-cli/pyproject.toml
sed -i "s,VERSION = \"${current_version}\",VERSION = \"${new_version}\"," client-cli/pvc/cli/helpers.py
sed -i "s,VERSION = \"${current_version}\",VERSION = \"${new_version}\"," client-cli/pvc/cli/cli.py
echo ${new_version} > .version
changelog_tmpdir=$( mktemp -d )
@ -48,7 +48,7 @@ echo -e "${deb_changelog_new}" >> ${deb_changelog_file}
echo -e "${deb_changelog_orig}" >> ${deb_changelog_file}
mv ${deb_changelog_file} debian/changelog
git add node-daemon/pvcnoded/Daemon.py health-daemon/pvchealthd/Daemon.py worker-daemon/pvcworkerd/Daemon.py api-daemon/pvcapid/Daemon.py client-cli/pvc/cli/helpers.py client-cli/pyproject.toml debian/changelog CHANGELOG.md .version
git add node-daemon/pvcnoded/Daemon.py health-daemon/pvchealthd/Daemon.py worker-daemon/pvcworkerd/Daemon.py api-daemon/pvcapid/Daemon.py client-cli/setup.py debian/changelog CHANGELOG.md .version
git commit -v
popd &>/dev/null

View File

@ -51,6 +51,8 @@ import click
###############################################################################
VERSION = "0.9.107"
CONTEXT_SETTINGS = dict(
help_option_names=["-h", "--help"], max_content_width=MAX_CONTENT_WIDTH
)

View File

@ -30,8 +30,6 @@ from yaml import load as yload
from yaml import SafeLoader
VERSION = "1.0.1"
DEFAULT_STORE_DATA = {"cfgfile": "/etc/pvc/pvc.conf"}
DEFAULT_STORE_FILENAME = "pvc.json"
DEFAULT_API_PREFIX = "/api/v1"

View File

@ -27,7 +27,7 @@ from requests import get, post, put, patch, delete, Response
from requests.exceptions import ConnectionError
from time import time
from urllib3 import disable_warnings
from pvc.cli.helpers import VERSION
from pvc.cli.cli import VERSION
def format_bytes(size_bytes):
@ -231,7 +231,7 @@ def call_api(
verify=config["verify_ssl"],
)
if operation == "delete":
response = delete(
response = patch, delete(
uri,
timeout=timeout,
headers=headers,

View File

@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "pvc"
version = "1.0.1"
version = "0.9.107"
dependencies = [
"Click",
"PyYAML",

View File

@ -555,16 +555,9 @@ def getCephVolumes(zkhandler, pool):
def getVolumeInformation(zkhandler, pool, volume):
# Parse the stats data
volume_stats_raw = zkhandler.read(("volume.stats", f"{pool}/{volume}"))
try:
volume_stats = dict(json.loads(volume_stats_raw))
# Format the size to something nicer
volume_stats["size"] = format_bytes_tohuman(volume_stats["size"])
except Exception:
volume_stats = dict(
json.loads(
f'{"name":"{volume}","id":"","size":0,"objects":0,"order":0,"object_size":0,"snapshot_count":0,"block_name_prefix":"","format":0,"features":[],"op_features":[],"flags":[],"create_timestamp":"","access_timestamp":"","modify_timestamp":""}'
)
)
volume_information = {"name": volume, "pool": pool, "stats": volume_stats}
return volume_information

21
debian/changelog vendored
View File

@ -1,24 +1,3 @@
pvc (1.0.1-0) unstable; urgency=high
* [CLI Client] [Bugfix] Fix bug with DELETE endpoints returning invalid data
-- Joshua M. Boniface <joshua@boniface.me> Sat, 21 Jun 2025 12:40:33 -0400
pvc (1.0-0) unstable; urgency=high
**Announcement**: We are pleased to announce PVC 1.0! Functionally speaking, there are only a few minor improvements over the previous 0.9.107, but I believe it's finally time to call this a "1.0" release. Recently I have had much less opportunity to work on PVC as I would like, so some features are still not quite there, but those can arrive in future versions over time.
**Enhancement**: The PVC CLI has been made much more efficient in terms of imports, allowing it to run on much lower spec hardware (in my case, on a small SBC). It's still not perfect, but multi-second import times are no longer an issue. The CLI client has also been moved to a more modern build system in preparation for Debian 13 "Trixie".
* [Daemons] Add cluster name to outputs during startup
* [CLI Client] Translate domain UUIDs to names in full node detail output for better readability
* [CLI Client] Fix colouring bug for mirror state
* [CLI Client] Significantly improve import efficiency throughout the client to avoid long load times on slow hardware
* [CLI Client] Port build to pyproject.toml and increase Debuild compat to 13
* [API Daemon] Fix bug with RBD list update after VM rename
* [API Daemon] Fix bug/crash if Ceph volume stats are invalid/empty
-- Joshua M. Boniface <joshua@boniface.me> Thu, 05 Jun 2025 00:04:54 -0400
pvc (0.9.107-0) unstable; urgency=high
* [Worker Daemon] Fixes a bug where snapshot removal fails during autobackups

View File

@ -33,7 +33,7 @@ import os
import signal
# Daemon version
version = "1.0.1"
version = "0.9.107"
##########################################################

View File

@ -49,7 +49,7 @@ import re
import json
# Daemon version
version = "1.0.1"
version = "0.9.107"
##########################################################

View File

@ -58,7 +58,7 @@ from daemon_lib.automirror import (
)
# Daemon version
version = "1.0.1"
version = "0.9.107"
config = cfg.get_configuration()