Compare commits

..

1 Commits

Author SHA1 Message Date
d6b65ae371 Bump version to 1.0 2025-06-05 00:04:54 -04:00
16 changed files with 39 additions and 89 deletions

View File

@@ -1 +1 @@
1.0.3
1.0

View File

@@ -1,18 +1,5 @@
## PVC Changelog
###### [v1.0.3](https://github.com/parallelvirtualcluster/pvc/releases/tag/v1.0.3)
* Fixes silent errors in the dnsmasq DHCP lease handler which can prevent leases from updating
* Improves the 3-debootstrap.py provisioner example script to work with Debian 13+
###### [v1.0.2](https://github.com/parallelvirtualcluster/pvc/releases/tag/v1.0.2)
* [Worker Daemon] [Bugfix] Fixed a bug in the calling of osd create-db-vg command worker
###### [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.

View File

@@ -485,8 +485,6 @@ class VMBuilderScript(VMBuilder):
"acpid",
"acpi-support-base",
"wget",
"ifupdown", # be explicit for Debian 13+
"isc-dhcp-server", # required for cloud-init on Debian 13+ where this is no longer standard
]
# We need to know our root disk for later GRUB-ing
@@ -587,15 +585,13 @@ After=multi-user.target
disable_root: true
preserve_hostname: true
network:
config: disabled
datasource:
Ec2:
metadata_urls: ["http://169.254.169.254:80"]
max_wait: 5
timeout: 5
max_wait: 30
timeout: 30
apply_full_imds_network_config: true
cloud_init_modules:
- migrator

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/pyproject.toml 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.3"
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.3"
version = "1.0"
dependencies = [
"Click",
"PyYAML",

View File

@@ -2486,7 +2486,7 @@ def osd_worker_remove_osd(
)
def osd_worker_add_db_vg(zkhandler, celery, node, device):
def osd_worker_add_db_vg(zkhandler, celery, device):
# Set up stages
current_stage = 0
total_stages = 4

19
debian/changelog vendored
View File

@@ -1,22 +1,3 @@
pvc (1.0.3-0) unstable; urgency=high
* Fixes silent errors in the dnsmasq DHCP lease handler which can prevent leases from updating
* Improves the 3-debootstrap.py provisioner example script to work with Debian 13+
-- Joshua M. Boniface <joshua@boniface.me> Sun, 01 Mar 2026 22:48:49 -0500
pvc (1.0.2-0) unstable; urgency=high
* [Worker Daemon] [Bugfix] Fixed a bug in the calling of osd create-db-vg command worker
-- Joshua M. Boniface <joshua@boniface.me> Fri, 30 Jan 2026 09:58:00 -0500
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.

View File

@@ -33,7 +33,7 @@ import os
import signal
# Daemon version
version = "1.0.3"
version = "1.0"
##########################################################

View File

@@ -3,5 +3,4 @@
# PVC cluster status check for Check_MK (agent-side)
echo "<<<pvc>>>"
hostname -s
pvc --quiet cluster status --format json
pvc --quiet status --format json

View File

@@ -17,29 +17,24 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from cmk.agent_based.v2 import *
from .agent_based_api.v1 import *
from cmk.base.check_api import host_name
from time import time
from json import loads
def parse_pvc(string_table):
hostname = string_table[0][0]
data = loads(" ".join(string_table[1]))
parsed = (hostname, data)
return parsed
def discover_pvc(section):
my_node, _ = section
my_node = host_name().split(".")[0]
yield Service(item=f"PVC Node {my_node}")
yield Service(item="PVC Cluster")
def check_pvc(item, params, section):
my_node, data = section
state = State.OK
summary = ""
summary = "Stuff"
details = None
data = loads(" ".join(section[0]))
my_node = host_name().split(".")[0]
maintenance_map = {
"true": "on",
@@ -49,6 +44,7 @@ def check_pvc(item, params, section):
# Node check
if item == f"PVC Node {my_node}":
my_node = host_name().split(".")[0]
node_health = data["node_health"][my_node]["health"]
node_messages = data["node_health"][my_node]["messages"]
@@ -89,12 +85,7 @@ def check_pvc(item, params, section):
return
agent_section_pvc = AgentSection(
name="pvc",
parse_function=parse_pvc,
)
check_plugin_pvc = CheckPlugin(
register.check_plugin(
name="pvc",
service_name="%s",
check_ruleset_name="pvc",

View File

@@ -49,7 +49,7 @@ import re
import json
# Daemon version
version = "1.0.3"
version = "1.0"
##########################################################

View File

@@ -130,25 +130,21 @@ def read_lease_database(zk_conn, zk_leases_key):
def add_lease(zk_conn, zk_leases_key, expiry, macaddr, ipaddr, hostname, clientid):
if not hostname:
hostname = ""
try:
zk_conn.delete("{}/{}".format(zk_leases_key, macaddr), recursive=True)
transaction = zk_conn.transaction()
transaction.create("{}/{}".format(zk_leases_key, macaddr), "".encode("ascii"))
transaction.create(
"{}/{}/expiry".format(zk_leases_key, macaddr), expiry.encode("ascii")
)
transaction.create(
"{}/{}/ipaddr".format(zk_leases_key, macaddr), ipaddr.encode("ascii")
)
transaction.create(
"{}/{}/hostname".format(zk_leases_key, macaddr), hostname.encode("ascii")
)
transaction.create(
"{}/{}/clientid".format(zk_leases_key, macaddr), clientid.encode("ascii")
)
transaction.commit()
except Exception as e:
print(f"FATAL: {e}")
transaction = zk_conn.transaction()
transaction.create("{}/{}".format(zk_leases_key, macaddr), "".encode("ascii"))
transaction.create(
"{}/{}/expiry".format(zk_leases_key, macaddr), expiry.encode("ascii")
)
transaction.create(
"{}/{}/ipaddr".format(zk_leases_key, macaddr), ipaddr.encode("ascii")
)
transaction.create(
"{}/{}/hostname".format(zk_leases_key, macaddr), hostname.encode("ascii")
)
transaction.create(
"{}/{}/clientid".format(zk_leases_key, macaddr), clientid.encode("ascii")
)
transaction.commit()
def del_lease(zk_conn, zk_leases_key, macaddr, expiry):

View File

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