Compare commits
9 Commits
bb77c5f1fc
...
v1.0.1
Author | SHA1 | Date | |
---|---|---|---|
7df1ca8c6e | |||
b9106134ee | |||
7274c1c8e6 | |||
479482ef75 | |||
cfb13fbccf | |||
9ca0217154 | |||
9ec2884e40 | |||
e5c8318b8e | |||
5831c3a425 |
17
CHANGELOG.md
17
CHANGELOG.md
@ -1,5 +1,22 @@
|
|||||||
## PVC Changelog
|
## 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)
|
###### [v0.9.107](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.107)
|
||||||
|
|
||||||
* [Worker Daemon] Fixes a bug where snapshot removal fails during autobackups
|
* [Worker Daemon] Fixes a bug where snapshot removal fails during autobackups
|
||||||
|
@ -22,7 +22,8 @@ sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," node-d
|
|||||||
sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," health-daemon/pvchealthd/Daemon.py
|
sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," health-daemon/pvchealthd/Daemon.py
|
||||||
sed -i "s,version = \"${current_version}\",version = \"${new_version}\"," worker-daemon/pvcworkerd/Daemon.py
|
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}\"," api-daemon/pvcapid/Daemon.py
|
||||||
sed -i "s,version=\"${current_version}\",version=\"${new_version}\"," client-cli/setup.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
|
||||||
echo ${new_version} > .version
|
echo ${new_version} > .version
|
||||||
|
|
||||||
changelog_tmpdir=$( mktemp -d )
|
changelog_tmpdir=$( mktemp -d )
|
||||||
@ -47,7 +48,7 @@ echo -e "${deb_changelog_new}" >> ${deb_changelog_file}
|
|||||||
echo -e "${deb_changelog_orig}" >> ${deb_changelog_file}
|
echo -e "${deb_changelog_orig}" >> ${deb_changelog_file}
|
||||||
mv ${deb_changelog_file} debian/changelog
|
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/setup.py 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/pvc/cli/helpers.py client-cli/pyproject.toml debian/changelog CHANGELOG.md .version
|
||||||
git commit -v
|
git commit -v
|
||||||
|
|
||||||
popd &>/dev/null
|
popd &>/dev/null
|
||||||
|
@ -97,10 +97,7 @@ def version(ctx, param, value):
|
|||||||
if not value or ctx.resilient_parsing:
|
if not value or ctx.resilient_parsing:
|
||||||
return
|
return
|
||||||
|
|
||||||
from pkg_resources import get_distribution
|
echo(CLI_CONFIG, f"Parallel Virtual Cluster CLI client version {VERSION}")
|
||||||
|
|
||||||
version = get_distribution("pvc").version
|
|
||||||
echo(CLI_CONFIG, f"Parallel Virtual Cluster CLI client version {version}")
|
|
||||||
ctx.exit()
|
ctx.exit()
|
||||||
|
|
||||||
|
|
||||||
|
@ -30,6 +30,8 @@ from yaml import load as yload
|
|||||||
from yaml import SafeLoader
|
from yaml import SafeLoader
|
||||||
|
|
||||||
|
|
||||||
|
VERSION = "1.0.1"
|
||||||
|
|
||||||
DEFAULT_STORE_DATA = {"cfgfile": "/etc/pvc/pvc.conf"}
|
DEFAULT_STORE_DATA = {"cfgfile": "/etc/pvc/pvc.conf"}
|
||||||
DEFAULT_STORE_FILENAME = "pvc.json"
|
DEFAULT_STORE_FILENAME = "pvc.json"
|
||||||
DEFAULT_API_PREFIX = "/api/v1"
|
DEFAULT_API_PREFIX = "/api/v1"
|
||||||
|
@ -27,6 +27,7 @@ from requests import get, post, put, patch, delete, Response
|
|||||||
from requests.exceptions import ConnectionError
|
from requests.exceptions import ConnectionError
|
||||||
from time import time
|
from time import time
|
||||||
from urllib3 import disable_warnings
|
from urllib3 import disable_warnings
|
||||||
|
from pvc.cli.helpers import VERSION
|
||||||
|
|
||||||
|
|
||||||
def format_bytes(size_bytes):
|
def format_bytes(size_bytes):
|
||||||
@ -166,6 +167,9 @@ def call_api(
|
|||||||
config["api_scheme"], config["api_host"], config["api_prefix"], request_uri
|
config["api_scheme"], config["api_host"], config["api_prefix"], request_uri
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Add custom User-Agent header
|
||||||
|
headers["User-Agent"] = f"pvc-client-cli/{VERSION}"
|
||||||
|
|
||||||
# Craft the authentication header if required
|
# Craft the authentication header if required
|
||||||
if config["api_key"]:
|
if config["api_key"]:
|
||||||
headers["X-Api-Key"] = config["api_key"]
|
headers["X-Api-Key"] = config["api_key"]
|
||||||
@ -227,7 +231,7 @@ def call_api(
|
|||||||
verify=config["verify_ssl"],
|
verify=config["verify_ssl"],
|
||||||
)
|
)
|
||||||
if operation == "delete":
|
if operation == "delete":
|
||||||
response = patch, delete(
|
response = delete(
|
||||||
uri,
|
uri,
|
||||||
timeout=timeout,
|
timeout=timeout,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "pvc"
|
name = "pvc"
|
||||||
version = "0.9.107"
|
version = "1.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"Click",
|
"Click",
|
||||||
"PyYAML",
|
"PyYAML",
|
||||||
|
@ -555,9 +555,16 @@ def getCephVolumes(zkhandler, pool):
|
|||||||
def getVolumeInformation(zkhandler, pool, volume):
|
def getVolumeInformation(zkhandler, pool, volume):
|
||||||
# Parse the stats data
|
# Parse the stats data
|
||||||
volume_stats_raw = zkhandler.read(("volume.stats", f"{pool}/{volume}"))
|
volume_stats_raw = zkhandler.read(("volume.stats", f"{pool}/{volume}"))
|
||||||
volume_stats = dict(json.loads(volume_stats_raw))
|
try:
|
||||||
# Format the size to something nicer
|
volume_stats = dict(json.loads(volume_stats_raw))
|
||||||
volume_stats["size"] = format_bytes_tohuman(volume_stats["size"])
|
# 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}
|
volume_information = {"name": volume, "pool": pool, "stats": volume_stats}
|
||||||
return volume_information
|
return volume_information
|
||||||
|
@ -605,12 +605,14 @@ def rename_vm(zkhandler, domain, new_domain):
|
|||||||
rbd_list.append(disk["name"].split("/")[1])
|
rbd_list.append(disk["name"].split("/")[1])
|
||||||
|
|
||||||
# Rename each volume in turn
|
# Rename each volume in turn
|
||||||
|
rbd_list_new = []
|
||||||
for idx, rbd in enumerate(rbd_list):
|
for idx, rbd in enumerate(rbd_list):
|
||||||
rbd_new = re.sub(r"{}".format(domain), new_domain, rbd)
|
rbd_new = re.sub(r"{}".format(domain), new_domain, rbd)
|
||||||
# Skip renaming if nothing changed
|
# Skip renaming if nothing changed
|
||||||
if rbd_new == rbd:
|
if rbd_new == rbd:
|
||||||
continue
|
continue
|
||||||
ceph.rename_volume(zkhandler, pool_list[idx], rbd, rbd_new)
|
ceph.rename_volume(zkhandler, pool_list[idx], rbd, rbd_new)
|
||||||
|
rbd_list_new.append(f"{pool_list[idx]}/{rbd_new}")
|
||||||
|
|
||||||
# Replace the name in the config
|
# Replace the name in the config
|
||||||
vm_config_new = (
|
vm_config_new = (
|
||||||
@ -627,6 +629,7 @@ def rename_vm(zkhandler, domain, new_domain):
|
|||||||
[
|
[
|
||||||
(("domain", dom_uuid), new_domain),
|
(("domain", dom_uuid), new_domain),
|
||||||
(("domain.xml", dom_uuid), vm_config_new),
|
(("domain.xml", dom_uuid), vm_config_new),
|
||||||
|
(("domain.rbdlist", dom_uuid), ",".join(rbd_list_new)),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
21
debian/changelog
vendored
21
debian/changelog
vendored
@ -1,3 +1,24 @@
|
|||||||
|
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
|
pvc (0.9.107-0) unstable; urgency=high
|
||||||
|
|
||||||
* [Worker Daemon] Fixes a bug where snapshot removal fails during autobackups
|
* [Worker Daemon] Fixes a bug where snapshot removal fails during autobackups
|
||||||
|
1
debian/control
vendored
1
debian/control
vendored
@ -5,6 +5,7 @@ Maintainer: Joshua Boniface <joshua@boniface.me>
|
|||||||
Standards-Version: 3.9.8
|
Standards-Version: 3.9.8
|
||||||
Homepage: https://www.boniface.me
|
Homepage: https://www.boniface.me
|
||||||
X-Python3-Version: >= 3.7
|
X-Python3-Version: >= 3.7
|
||||||
|
Build-Depends: pybuild-plugin-pyproject, dh-python
|
||||||
|
|
||||||
Package: pvc-daemon-node
|
Package: pvc-daemon-node
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
2
debian/rules
vendored
2
debian/rules
vendored
@ -14,7 +14,7 @@ override_dh_python3:
|
|||||||
|
|
||||||
override_dh_auto_clean:
|
override_dh_auto_clean:
|
||||||
find $(CURDIR) -name "__pycache__" -o -name ".pybuild" -exec rm -fr {} + || true
|
find $(CURDIR) -name "__pycache__" -o -name ".pybuild" -exec rm -fr {} + || true
|
||||||
rm -r $(CURDIR)/client-cli/build
|
rm -r $(CURDIR)/client-cli/build || true
|
||||||
|
|
||||||
# If you need to rebuild the Sphinx documentation
|
# If you need to rebuild the Sphinx documentation
|
||||||
# Add spinxdoc to the dh --with line
|
# Add spinxdoc to the dh --with line
|
||||||
|
@ -33,7 +33,7 @@ import os
|
|||||||
import signal
|
import signal
|
||||||
|
|
||||||
# Daemon version
|
# Daemon version
|
||||||
version = "0.9.107"
|
version = "1.0.1"
|
||||||
|
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
|
@ -49,7 +49,7 @@ import re
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
# Daemon version
|
# Daemon version
|
||||||
version = "0.9.107"
|
version = "1.0.1"
|
||||||
|
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
|
@ -58,7 +58,7 @@ from daemon_lib.automirror import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Daemon version
|
# Daemon version
|
||||||
version = "0.9.107"
|
version = "1.0.1"
|
||||||
|
|
||||||
|
|
||||||
config = cfg.get_configuration()
|
config = cfg.get_configuration()
|
||||||
|
Reference in New Issue
Block a user