Compare commits

...

5 Commits

Author SHA1 Message Date
c331091cdd Add isc-dhcp-server to example debootstrap script
Debian 13+ no longer include isc-dhcp-server (or any DHCP client it
seems) in their default minimal stack. This can cause cloud-init to fail
early and render newly provsiioned VMs unbootable. We add it to the
example here for posterity.
2026-03-01 21:49:52 -05:00
dfc8d598cb Fix errors when overwriting DHCP leases
Ensure we remove any existing leases for the MAC first, before adding a
new entry for that MAC. Otherwise what dnsmasq returns will not be valid
and this can cause CloudInit bootstrap errors.
2026-03-01 21:10:35 -05:00
eff972a62e Bump version to 1.0.2 2026-01-30 10:05:04 -05:00
113ecec18f Fix bad function definition 2026-01-30 09:56:59 -05:00
427fd5515d Update CheckMK plugin details 2025-10-02 02:40:10 -04:00
13 changed files with 56 additions and 31 deletions

View File

@@ -1 +1 @@
1.0.1
1.0.2

View File

@@ -1,5 +1,9 @@
## PVC Changelog
###### [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

View File

@@ -485,6 +485,7 @@ class VMBuilderScript(VMBuilder):
"acpid",
"acpi-support-base",
"wget",
"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

View File

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

View File

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

View File

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

6
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
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

View File

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

View File

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

View File

@@ -17,24 +17,29 @@
# 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 .agent_based_api.v1 import *
from cmk.base.check_api import host_name
from cmk.agent_based.v2 import *
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 = host_name().split(".")[0]
my_node, _ = section
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 = "Stuff"
summary = ""
details = None
data = loads(" ".join(section[0]))
my_node = host_name().split(".")[0]
maintenance_map = {
"true": "on",
@@ -44,7 +49,6 @@ 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"]
@@ -85,7 +89,12 @@ def check_pvc(item, params, section):
return
register.check_plugin(
agent_section_pvc = AgentSection(
name="pvc",
parse_function=parse_pvc,
)
check_plugin_pvc = CheckPlugin(
name="pvc",
service_name="%s",
check_ruleset_name="pvc",

View File

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

View File

@@ -130,21 +130,25 @@ 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 = ""
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()
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}")
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.1"
version = "1.0.2"
config = cfg.get_configuration()