Compare commits
1 Commits
v0.9.96
...
37e0b6be71
Author | SHA1 | Date | |
---|---|---|---|
37e0b6be71 |
12
CHANGELOG.md
12
CHANGELOG.md
@ -1,22 +1,10 @@
|
|||||||
## PVC Changelog
|
## PVC Changelog
|
||||||
|
|
||||||
###### [v0.9.96](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.96)
|
|
||||||
|
|
||||||
* [API Daemon] Fixes a bug when reporting node stats
|
|
||||||
* [API Daemon] Fixes a bug deleteing successful benchmark results
|
|
||||||
|
|
||||||
###### [v0.9.95](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.95)
|
|
||||||
|
|
||||||
* [API Daemon/CLI Client] Adds a flag to allow duplicate VNIs in network templates
|
|
||||||
* [API Daemon] Ensures that storage template disks are returned in disk ID order
|
|
||||||
* [Client CLI] Fixes a display bug showing all OSDs as split
|
|
||||||
|
|
||||||
###### [v0.9.94](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.94)
|
###### [v0.9.94](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.94)
|
||||||
|
|
||||||
* [CLI Client] Fixes an incorrect ordering issue with autobackup summary emails
|
* [CLI Client] Fixes an incorrect ordering issue with autobackup summary emails
|
||||||
* [API Daemon/CLI Client] Adds an additional safety check for 80% cluster fullness when doing volume adds or resizes
|
* [API Daemon/CLI Client] Adds an additional safety check for 80% cluster fullness when doing volume adds or resizes
|
||||||
* [API Daemon/CLI Client] Adds safety checks to volume clones as well
|
* [API Daemon/CLI Client] Adds safety checks to volume clones as well
|
||||||
* [API Daemon] Fixes a few remaining memory bugs for stopped/disabled VMs
|
|
||||||
|
|
||||||
###### [v0.9.93](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.93)
|
###### [v0.9.93](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.93)
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ from distutils.util import strtobool as dustrtobool
|
|||||||
import daemon_lib.config as cfg
|
import daemon_lib.config as cfg
|
||||||
|
|
||||||
# Daemon version
|
# Daemon version
|
||||||
version = "0.9.96"
|
version = "0.9.94"
|
||||||
|
|
||||||
# API version
|
# API version
|
||||||
API_VERSION = 1.0
|
API_VERSION = 1.0
|
||||||
|
@ -7139,11 +7139,7 @@ class API_Provisioner_Template_Network_Net_Root(Resource):
|
|||||||
"name": "vni",
|
"name": "vni",
|
||||||
"required": True,
|
"required": True,
|
||||||
"helptext": "A valid VNI must be specified.",
|
"helptext": "A valid VNI must be specified.",
|
||||||
},
|
}
|
||||||
{
|
|
||||||
"name": "permit_duplicate",
|
|
||||||
"required": False,
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
@Authenticator
|
@Authenticator
|
||||||
@ -7159,11 +7155,6 @@ class API_Provisioner_Template_Network_Net_Root(Resource):
|
|||||||
type: integer
|
type: integer
|
||||||
required: false
|
required: false
|
||||||
description: PVC network VNI
|
description: PVC network VNI
|
||||||
- in: query
|
|
||||||
name: permit_duplicate
|
|
||||||
type: boolean
|
|
||||||
required: false
|
|
||||||
description: Bypass checks to permit duplicate VNIs for niche usecases
|
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: OK
|
description: OK
|
||||||
@ -7177,7 +7168,7 @@ class API_Provisioner_Template_Network_Net_Root(Resource):
|
|||||||
id: Message
|
id: Message
|
||||||
"""
|
"""
|
||||||
return api_provisioner.create_template_network_element(
|
return api_provisioner.create_template_network_element(
|
||||||
template, reqargs.get("vni", None), reqargs.get("permit_duplicate", False)
|
template, reqargs.get("vni", None)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -7215,27 +7206,13 @@ class API_Provisioner_Template_Network_Net_Element(Resource):
|
|||||||
return _vni, 200
|
return _vni, 200
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
@RequestParser(
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"name": "permit_duplicate",
|
|
||||||
"required": False,
|
|
||||||
}
|
|
||||||
]
|
|
||||||
)
|
|
||||||
@Authenticator
|
@Authenticator
|
||||||
def post(self, template, vni, reqargs):
|
def post(self, template, vni):
|
||||||
"""
|
"""
|
||||||
Create a new network {vni} in network template {template}
|
Create a new network {vni} in network template {template}
|
||||||
---
|
---
|
||||||
tags:
|
tags:
|
||||||
- provisioner / template
|
- provisioner / template
|
||||||
parameters:
|
|
||||||
- in: query
|
|
||||||
name: permit_duplicate
|
|
||||||
type: boolean
|
|
||||||
required: false
|
|
||||||
description: Bypass checks to permit duplicate VNIs for niche usecases
|
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: OK
|
description: OK
|
||||||
@ -7248,9 +7225,7 @@ class API_Provisioner_Template_Network_Net_Element(Resource):
|
|||||||
type: object
|
type: object
|
||||||
id: Message
|
id: Message
|
||||||
"""
|
"""
|
||||||
return api_provisioner.create_template_network_element(
|
return api_provisioner.create_template_network_element(template, vni)
|
||||||
template, vni, reqargs.get("permit_duplicate", False)
|
|
||||||
)
|
|
||||||
|
|
||||||
@Authenticator
|
@Authenticator
|
||||||
def delete(self, template, vni):
|
def delete(self, template, vni):
|
||||||
|
@ -125,7 +125,7 @@ def list_template(limit, table, is_fuzzy=True):
|
|||||||
args = (template_data["id"],)
|
args = (template_data["id"],)
|
||||||
cur.execute(query, args)
|
cur.execute(query, args)
|
||||||
disks = cur.fetchall()
|
disks = cur.fetchall()
|
||||||
data[template_id]["disks"] = sorted(disks, key=lambda x: x["disk_id"])
|
data[template_id]["disks"] = disks
|
||||||
|
|
||||||
close_database(conn, cur)
|
close_database(conn, cur)
|
||||||
|
|
||||||
@ -284,28 +284,27 @@ def create_template_network(name, mac_template=None):
|
|||||||
return retmsg, retcode
|
return retmsg, retcode
|
||||||
|
|
||||||
|
|
||||||
def create_template_network_element(name, vni, permit_duplicate=False):
|
def create_template_network_element(name, vni):
|
||||||
if list_template_network(name, is_fuzzy=False)[-1] != 200:
|
if list_template_network(name, is_fuzzy=False)[-1] != 200:
|
||||||
retmsg = {"message": 'The network template "{}" does not exist.'.format(name)}
|
retmsg = {"message": 'The network template "{}" does not exist.'.format(name)}
|
||||||
retcode = 400
|
retcode = 400
|
||||||
return retmsg, retcode
|
return retmsg, retcode
|
||||||
|
|
||||||
if not permit_duplicate:
|
networks, code = list_template_network_vnis(name)
|
||||||
networks, code = list_template_network_vnis(name)
|
if code != 200:
|
||||||
if code != 200:
|
networks = []
|
||||||
networks = []
|
found_vni = False
|
||||||
found_vni = False
|
for network in networks:
|
||||||
for network in networks:
|
if network["vni"] == vni:
|
||||||
if network["vni"] == vni:
|
found_vni = True
|
||||||
found_vni = True
|
if found_vni:
|
||||||
if found_vni:
|
retmsg = {
|
||||||
retmsg = {
|
"message": 'The VNI "{}" in network template "{}" already exists.'.format(
|
||||||
"message": 'The VNI "{}" in network template "{}" already exists.'.format(
|
vni, name
|
||||||
vni, name
|
)
|
||||||
)
|
}
|
||||||
}
|
retcode = 400
|
||||||
retcode = 400
|
return retmsg, retcode
|
||||||
return retmsg, retcode
|
|
||||||
|
|
||||||
conn, cur = open_database(config)
|
conn, cur = open_database(config)
|
||||||
try:
|
try:
|
||||||
|
@ -4849,27 +4849,13 @@ def cli_provisioner_template_network_vni():
|
|||||||
@connection_req
|
@connection_req
|
||||||
@click.argument("name")
|
@click.argument("name")
|
||||||
@click.argument("vni")
|
@click.argument("vni")
|
||||||
@click.option(
|
def cli_provisioner_template_network_vni_add(name, vni):
|
||||||
"-d",
|
|
||||||
"--permit-duplicate",
|
|
||||||
"permit_duplicate_flag",
|
|
||||||
is_flag=True,
|
|
||||||
default=False,
|
|
||||||
help="Permit a duplicate VNI if one already exists",
|
|
||||||
)
|
|
||||||
def cli_provisioner_template_network_vni_add(name, vni, permit_duplicate_flag):
|
|
||||||
"""
|
"""
|
||||||
Add a new network VNI to network template NAME.
|
Add a new network VNI to network template NAME.
|
||||||
|
|
||||||
Networks will be added to VMs in the order they are added and displayed within the template.
|
Networks will be added to VMs in the order they are added and displayed within the template.
|
||||||
|
|
||||||
NOTE: Normally, the API prevents duplicate VNIs from being added to the same network template
|
|
||||||
by returning an error, as this requirement is very niche. If you do not desire this behaviour,
|
|
||||||
use the "-d"/"--permit-duplicate" option to bypass the check.
|
|
||||||
"""
|
"""
|
||||||
params = dict()
|
params = dict()
|
||||||
if permit_duplicate_flag:
|
|
||||||
params["permit_duplicate"] = True
|
|
||||||
|
|
||||||
retcode, retdata = pvc.lib.provisioner.template_element_add(
|
retcode, retdata = pvc.lib.provisioner.template_element_add(
|
||||||
CLI_CONFIG, name, vni, params, element_type="net", template_type="network"
|
CLI_CONFIG, name, vni, params, element_type="net", template_type="network"
|
||||||
|
@ -430,9 +430,7 @@ def format_list_osd(config, osd_list):
|
|||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if osd_information.get("is_split") is not None and osd_information.get(
|
if osd_information.get("is_split") is not None:
|
||||||
"is_split"
|
|
||||||
):
|
|
||||||
osd_information["device"] = f"{osd_information['device']} [s]"
|
osd_information["device"] = f"{osd_information['device']} [s]"
|
||||||
|
|
||||||
# Deal with the size to human readable
|
# Deal with the size to human readable
|
||||||
|
@ -2,7 +2,7 @@ from setuptools import setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pvc",
|
name="pvc",
|
||||||
version="0.9.96",
|
version="0.9.94",
|
||||||
packages=["pvc.cli", "pvc.lib"],
|
packages=["pvc.cli", "pvc.lib"],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
"Click",
|
"Click",
|
||||||
|
@ -115,13 +115,12 @@ class BenchmarkError(Exception):
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
def cleanup(job_name, db_conn=None, db_cur=None, zkhandler=None, final=False):
|
def cleanup(job_name, db_conn=None, db_cur=None, zkhandler=None):
|
||||||
if db_conn is not None and db_cur is not None:
|
if db_conn is not None and db_cur is not None:
|
||||||
if not final:
|
# Clean up our dangling result
|
||||||
# Clean up our dangling result (non-final runs only)
|
query = "DELETE FROM storage_benchmarks WHERE job = %s;"
|
||||||
query = "DELETE FROM storage_benchmarks WHERE job = %s;"
|
args = (job_name,)
|
||||||
args = (job_name,)
|
db_cur.execute(query, args)
|
||||||
db_cur.execute(query, args)
|
|
||||||
db_conn.commit()
|
db_conn.commit()
|
||||||
# Close the database connections cleanly
|
# Close the database connections cleanly
|
||||||
close_database(db_conn, db_cur)
|
close_database(db_conn, db_cur)
|
||||||
@ -411,7 +410,6 @@ def worker_run_benchmark(zkhandler, celery, config, pool):
|
|||||||
db_conn=db_conn,
|
db_conn=db_conn,
|
||||||
db_cur=db_cur,
|
db_cur=db_cur,
|
||||||
zkhandler=zkhandler,
|
zkhandler=zkhandler,
|
||||||
final=True,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
current_stage += 1
|
current_stage += 1
|
||||||
|
@ -1230,7 +1230,7 @@ def get_resource_metrics(zkhandler):
|
|||||||
)
|
)
|
||||||
output_lines.append("# TYPE pvc_vm_memory_stats_actual gauge")
|
output_lines.append("# TYPE pvc_vm_memory_stats_actual gauge")
|
||||||
for vm in vm_data:
|
for vm in vm_data:
|
||||||
actual_memory = vm["memory_stats"].get("actual", 0)
|
actual_memory = vm["memory_stats"]["actual"]
|
||||||
output_lines.append(
|
output_lines.append(
|
||||||
f"pvc_vm_memory_stats_actual{{vm=\"{vm['name']}\"}} {actual_memory}"
|
f"pvc_vm_memory_stats_actual{{vm=\"{vm['name']}\"}} {actual_memory}"
|
||||||
)
|
)
|
||||||
@ -1238,7 +1238,7 @@ def get_resource_metrics(zkhandler):
|
|||||||
output_lines.append("# HELP pvc_vm_memory_stats_rss PVC VM RSS memory KB")
|
output_lines.append("# HELP pvc_vm_memory_stats_rss PVC VM RSS memory KB")
|
||||||
output_lines.append("# TYPE pvc_vm_memory_stats_rss gauge")
|
output_lines.append("# TYPE pvc_vm_memory_stats_rss gauge")
|
||||||
for vm in vm_data:
|
for vm in vm_data:
|
||||||
rss_memory = vm["memory_stats"].get("rss", 0)
|
rss_memory = vm["memory_stats"]["rss"]
|
||||||
output_lines.append(
|
output_lines.append(
|
||||||
f"pvc_vm_memory_stats_rss{{vm=\"{vm['name']}\"}} {rss_memory}"
|
f"pvc_vm_memory_stats_rss{{vm=\"{vm['name']}\"}} {rss_memory}"
|
||||||
)
|
)
|
||||||
|
@ -69,8 +69,6 @@ def getNodeHealthDetails(zkhandler, node_name, node_health_plugins):
|
|||||||
plugin_message,
|
plugin_message,
|
||||||
plugin_data,
|
plugin_data,
|
||||||
) = tuple(all_plugin_data[pos_start:pos_end])
|
) = tuple(all_plugin_data[pos_start:pos_end])
|
||||||
if plugin_data is None:
|
|
||||||
continue
|
|
||||||
plugin_output = {
|
plugin_output = {
|
||||||
"name": plugin,
|
"name": plugin,
|
||||||
"last_run": int(plugin_last_run) if plugin_last_run is not None else None,
|
"last_run": int(plugin_last_run) if plugin_last_run is not None else None,
|
||||||
@ -158,9 +156,9 @@ def getNodeInformation(zkhandler, node_name):
|
|||||||
zkhandler, node_name, node_health_plugins
|
zkhandler, node_name, node_health_plugins
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
if _node_network_stats is not None:
|
||||||
node_network_stats = json.loads(_node_network_stats)
|
node_network_stats = json.loads(_node_network_stats)
|
||||||
except Exception:
|
else:
|
||||||
node_network_stats = dict()
|
node_network_stats = dict()
|
||||||
|
|
||||||
# Construct a data structure to represent the data
|
# Construct a data structure to represent the data
|
||||||
|
16
debian/changelog
vendored
16
debian/changelog
vendored
@ -1,24 +1,8 @@
|
|||||||
pvc (0.9.96-0) unstable; urgency=high
|
|
||||||
|
|
||||||
* [API Daemon] Fixes a bug when reporting node stats
|
|
||||||
* [API Daemon] Fixes a bug deleteing successful benchmark results
|
|
||||||
|
|
||||||
-- Joshua M. Boniface <joshua@boniface.me> Fri, 08 Mar 2024 14:23:06 -0500
|
|
||||||
|
|
||||||
pvc (0.9.95-0) unstable; urgency=high
|
|
||||||
|
|
||||||
* [API Daemon/CLI Client] Adds a flag to allow duplicate VNIs in network templates
|
|
||||||
* [API Daemon] Ensures that storage template disks are returned in disk ID order
|
|
||||||
* [Client CLI] Fixes a display bug showing all OSDs as split
|
|
||||||
|
|
||||||
-- Joshua M. Boniface <joshua@boniface.me> Fri, 09 Feb 2024 12:42:00 -0500
|
|
||||||
|
|
||||||
pvc (0.9.94-0) unstable; urgency=high
|
pvc (0.9.94-0) unstable; urgency=high
|
||||||
|
|
||||||
* [CLI Client] Fixes an incorrect ordering issue with autobackup summary emails
|
* [CLI Client] Fixes an incorrect ordering issue with autobackup summary emails
|
||||||
* [API Daemon/CLI Client] Adds an additional safety check for 80% cluster fullness when doing volume adds or resizes
|
* [API Daemon/CLI Client] Adds an additional safety check for 80% cluster fullness when doing volume adds or resizes
|
||||||
* [API Daemon/CLI Client] Adds safety checks to volume clones as well
|
* [API Daemon/CLI Client] Adds safety checks to volume clones as well
|
||||||
* [API Daemon] Fixes a few remaining memory bugs for stopped/disabled VMs
|
|
||||||
|
|
||||||
-- Joshua M. Boniface <joshua@boniface.me> Mon, 05 Feb 2024 09:58:07 -0500
|
-- Joshua M. Boniface <joshua@boniface.me> Mon, 05 Feb 2024 09:58:07 -0500
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ import os
|
|||||||
import signal
|
import signal
|
||||||
|
|
||||||
# Daemon version
|
# Daemon version
|
||||||
version = "0.9.96"
|
version = "0.9.94"
|
||||||
|
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
|
@ -49,7 +49,7 @@ import re
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
# Daemon version
|
# Daemon version
|
||||||
version = "0.9.96"
|
version = "0.9.94"
|
||||||
|
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
|
@ -44,7 +44,7 @@ from daemon_lib.vmbuilder import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Daemon version
|
# Daemon version
|
||||||
version = "0.9.96"
|
version = "0.9.94"
|
||||||
|
|
||||||
|
|
||||||
config = cfg.get_configuration()
|
config = cfg.get_configuration()
|
||||||
|
Reference in New Issue
Block a user