Compare commits

..

5 Commits

12 changed files with 94 additions and 48 deletions

View File

@ -1 +1 @@
0.9.31 0.9.32

View File

@ -40,8 +40,27 @@ The core node and API daemons, as well as the CLI API client, are written in Pyt
To get started with PVC, please see the [About](https://parallelvirtualcluster.readthedocs.io/en/latest/about/) page for general information about the project, and the [Getting Started](https://parallelvirtualcluster.readthedocs.io/en/latest/getting-started/) page for details on configuring your first cluster. To get started with PVC, please see the [About](https://parallelvirtualcluster.readthedocs.io/en/latest/about/) page for general information about the project, and the [Getting Started](https://parallelvirtualcluster.readthedocs.io/en/latest/getting-started/) page for details on configuring your first cluster.
## Screenshots
While PVC's API and internals aren't very screenshot-worthy, here is some example output of the CLI tool.
<p><img alt="Node listing" src="docs/images/pvc-nodes.png"/><br/><i>Listing the nodes in a cluster</i></p>
<p><img alt="Network listing" src="docs/images/pvc-networks.png"/><br/><i>Listing the networks in a cluster, showing 3 bridged and 1 IPv4-only managed networks</i></p>
<p><img alt="VM listing and migration" src="docs/images/pvc-migration.png"/><br/><i>Listing a limited set of VMs and migrating one with status updates</i></p>
<p><img alt="Node logs" src="docs/images/pvc-nodelog.png"/><br/><i>Viewing the logs of a node (keepalives and VM [un]migration)</i></p>
## Changelog ## Changelog
#### v0.9.32
* [CLI Client] Fixes some incorrect colours in network lists
* [Documentation] Adds documentation screenshots of CLI client
* [Node Daemon] Fixes a bug if VM stats gathering fails
#### v0.9.31 #### v0.9.31
* [Packages] Cleans up obsolete Suggests lines * [Packages] Cleans up obsolete Suggests lines

View File

@ -25,7 +25,7 @@ import yaml
from distutils.util import strtobool as dustrtobool from distutils.util import strtobool as dustrtobool
# Daemon version # Daemon version
version = '0.9.31' version = '0.9.32'
# API version # API version
API_VERSION = 1.0 API_VERSION = 1.0

View File

@ -491,14 +491,10 @@ def net_sriov_vf_info(config, node, vf):
# Output display functions # Output display functions
# #
def getColour(value): def getColour(value):
if value in ['True', "start"]: if value in ["False", "None"]:
return ansiprint.green()
elif value in ["restart", "shutdown"]:
return ansiprint.yellow()
elif value in ["stop", "fail"]:
return ansiprint.red()
else:
return ansiprint.blue() return ansiprint.blue()
else:
return ansiprint.green()
def getOutputColours(network_information): def getOutputColours(network_information):

View File

@ -2,7 +2,7 @@ from setuptools import setup
setup( setup(
name='pvc', name='pvc',
version='0.9.31', version='0.9.32',
packages=['pvc', 'pvc.cli_lib'], packages=['pvc', 'pvc.cli_lib'],
install_requires=[ install_requires=[
'Click', 'Click',

8
debian/changelog vendored
View File

@ -1,3 +1,11 @@
pvc (0.9.32-0) unstable; urgency=high
* [CLI Client] Fixes some incorrect colours in network lists
* [Documentation] Adds documentation screenshots of CLI client
* [Node Daemon] Fixes a bug if VM stats gathering fails
-- Joshua M. Boniface <joshua@boniface.me> Thu, 19 Aug 2021 12:37:58 -0400
pvc (0.9.31-0) unstable; urgency=high pvc (0.9.31-0) unstable; urgency=high
* [Packages] Cleans up obsolete Suggests lines * [Packages] Cleans up obsolete Suggests lines

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

BIN
docs/images/pvc-nodelog.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

BIN
docs/images/pvc-nodes.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

View File

@ -40,8 +40,27 @@ The core node and API daemons, as well as the CLI API client, are written in Pyt
To get started with PVC, please see the [About](https://parallelvirtualcluster.readthedocs.io/en/latest/about/) page for general information about the project, and the [Getting Started](https://parallelvirtualcluster.readthedocs.io/en/latest/getting-started/) page for details on configuring your first cluster. To get started with PVC, please see the [About](https://parallelvirtualcluster.readthedocs.io/en/latest/about/) page for general information about the project, and the [Getting Started](https://parallelvirtualcluster.readthedocs.io/en/latest/getting-started/) page for details on configuring your first cluster.
## Screenshots
While PVC's API and internals aren't very screenshot-worthy, here is some example output of the CLI tool.
<p><img alt="Node listing" src="images/pvc-nodes.png"/><br/><i>Listing the nodes in a cluster</i></p>
<p><img alt="Network listing" src="images/pvc-networks.png"/><br/><i>Listing the networks in a cluster, showing 3 bridged and 1 IPv4-only managed networks</i></p>
<p><img alt="VM listing and migration" src="images/pvc-migration.png"/><br/><i>Listing a limited set of VMs and migrating one with status updates</i></p>
<p><img alt="Node logs" src="images/pvc-nodelog.png"/><br/><i>Viewing the logs of a node (keepalives and VM [un]migration)</i></p>
## Changelog ## Changelog
#### v0.9.32
* [CLI Client] Fixes some incorrect colours in network lists
* [Documentation] Adds documentation screenshots of CLI client
* [Node Daemon] Fixes a bug if VM stats gathering fails
#### v0.9.31 #### v0.9.31
* [Packages] Cleans up obsolete Suggests lines * [Packages] Cleans up obsolete Suggests lines

View File

@ -56,7 +56,7 @@ import pvcnoded.CephInstance as CephInstance
import pvcnoded.MetadataAPIInstance as MetadataAPIInstance import pvcnoded.MetadataAPIInstance as MetadataAPIInstance
# Version string for startup output # Version string for startup output
version = '0.9.31' version = '0.9.32'
############################################################################### ###############################################################################
# PVCD - node daemon startup program # PVCD - node daemon startup program
@ -1675,11 +1675,7 @@ def collect_vm_stats(queue):
domain_memory_stats = domain.memoryStats() domain_memory_stats = domain.memoryStats()
domain_cpu_stats = domain.getCPUStats(True)[0] domain_cpu_stats = domain.getCPUStats(True)[0]
except Exception as e: except Exception as e:
if debug: logger.out("Failed getting VM information for {}: {}".format(domain.name(), e), state='w', prefix='vm-thread')
try:
logger.out("Failed getting VM information for {}: {}".format(domain.name(), e), state='d', prefix='vm-thread')
except Exception:
pass
continue continue
# Ensure VM is present in the domain_list # Ensure VM is present in the domain_list
@ -1689,6 +1685,7 @@ def collect_vm_stats(queue):
if debug: if debug:
logger.out("Getting disk statistics for VM {}".format(domain_name), state='d', prefix='vm-thread') logger.out("Getting disk statistics for VM {}".format(domain_name), state='d', prefix='vm-thread')
domain_disk_stats = [] domain_disk_stats = []
try:
for disk in tree.findall('devices/disk'): for disk in tree.findall('devices/disk'):
disk_name = disk.find('source').get('name') disk_name = disk.find('source').get('name')
if not disk_name: if not disk_name:
@ -1702,10 +1699,14 @@ def collect_vm_stats(queue):
"wr_bytes": disk_stats[3], "wr_bytes": disk_stats[3],
"err": disk_stats[4] "err": disk_stats[4]
}) })
except Exception as e:
logger.out("Failed to get disk stats for VM {}: {}".format(domain_name, e), state='w', prefix='vm-thread')
continue
if debug: if debug:
logger.out("Getting network statistics for VM {}".format(domain_name), state='d', prefix='vm-thread') logger.out("Getting network statistics for VM {}".format(domain_name), state='d', prefix='vm-thread')
domain_network_stats = [] domain_network_stats = []
try:
for interface in tree.findall('devices/interface'): for interface in tree.findall('devices/interface'):
interface_type = interface.get('type') interface_type = interface.get('type')
if interface_type not in ['bridge']: if interface_type not in ['bridge']:
@ -1725,6 +1726,9 @@ def collect_vm_stats(queue):
"wr_errors": interface_stats[6], "wr_errors": interface_stats[6],
"wr_drops": interface_stats[7] "wr_drops": interface_stats[7]
}) })
except Exception as e:
logger.out("Failed to get network stats for VM {}: {}".format(domain_name, e), state='w', prefix='vm-thread')
continue
# Create the final dictionary # Create the final dictionary
domain_stats = { domain_stats = {