Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
645b525ad7 | |||
ec559aec0d | |||
71ffd5a191 | |||
2739c27299 |
@ -1,5 +1,11 @@
|
|||||||
## PVC Changelog
|
## PVC Changelog
|
||||||
|
|
||||||
|
###### [v0.9.51](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.51)
|
||||||
|
|
||||||
|
* [CLI Client] Fixes a faulty literal_eval when viewing task status
|
||||||
|
* [CLI Client] Adds a confirmation flag to the vm disable command
|
||||||
|
* [Node Daemon] Removes the pvc-flush service
|
||||||
|
|
||||||
###### [v0.9.50](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.50)
|
###### [v0.9.50](https://github.com/parallelvirtualcluster/pvc/releases/tag/v0.9.50)
|
||||||
|
|
||||||
* [Node Daemon/API/CLI] Adds free memory node selector
|
* [Node Daemon/API/CLI] Adds free memory node selector
|
||||||
|
@ -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.50"
|
version = "0.9.51"
|
||||||
|
|
||||||
# API version
|
# API version
|
||||||
API_VERSION = 1.0
|
API_VERSION = 1.0
|
||||||
|
@ -23,7 +23,6 @@ from requests_toolbelt.multipart.encoder import (
|
|||||||
MultipartEncoder,
|
MultipartEncoder,
|
||||||
MultipartEncoderMonitor,
|
MultipartEncoderMonitor,
|
||||||
)
|
)
|
||||||
from ast import literal_eval
|
|
||||||
|
|
||||||
import pvc.cli_lib.ansiprint as ansiprint
|
import pvc.cli_lib.ansiprint as ansiprint
|
||||||
from pvc.cli_lib.common import UploadProgressBar, call_api
|
from pvc.cli_lib.common import UploadProgressBar, call_api
|
||||||
@ -793,10 +792,10 @@ def task_status(config, task_id=None, is_watching=False):
|
|||||||
task["type"] = task_type
|
task["type"] = task_type
|
||||||
task["worker"] = task_host
|
task["worker"] = task_host
|
||||||
task["id"] = task_job.get("id")
|
task["id"] = task_job.get("id")
|
||||||
task_args = literal_eval(task_job.get("args"))
|
task_args = task_job.get("args")
|
||||||
task["vm_name"] = task_args[0]
|
task["vm_name"] = task_args[0]
|
||||||
task["vm_profile"] = task_args[1]
|
task["vm_profile"] = task_args[1]
|
||||||
task_kwargs = literal_eval(task_job.get("kwargs"))
|
task_kwargs = task_job.get("kwargs")
|
||||||
task["vm_define"] = str(bool(task_kwargs["define_vm"]))
|
task["vm_define"] = str(bool(task_kwargs["define_vm"]))
|
||||||
task["vm_start"] = str(bool(task_kwargs["start_vm"]))
|
task["vm_start"] = str(bool(task_kwargs["start_vm"]))
|
||||||
task_data.append(task)
|
task_data.append(task)
|
||||||
|
@ -1357,15 +1357,31 @@ def vm_stop(domain, confirm_flag):
|
|||||||
default=False,
|
default=False,
|
||||||
help="Forcibly stop the VM instead of waiting for shutdown.",
|
help="Forcibly stop the VM instead of waiting for shutdown.",
|
||||||
)
|
)
|
||||||
|
@click.option(
|
||||||
|
"-y",
|
||||||
|
"--yes",
|
||||||
|
"confirm_flag",
|
||||||
|
is_flag=True,
|
||||||
|
default=False,
|
||||||
|
help="Confirm the disable",
|
||||||
|
)
|
||||||
@cluster_req
|
@cluster_req
|
||||||
def vm_disable(domain, force):
|
def vm_disable(domain, force_flag, confirm_flag):
|
||||||
"""
|
"""
|
||||||
Shut down virtual machine DOMAIN and mark it as disabled. DOMAIN may be a UUID or name.
|
Shut down virtual machine DOMAIN and mark it as disabled. DOMAIN may be a UUID or name.
|
||||||
|
|
||||||
Disabled VMs will not be counted towards a degraded cluster health status, unlike stopped VMs. Use this option for a VM that will remain off for an extended period.
|
Disabled VMs will not be counted towards a degraded cluster health status, unlike stopped VMs. Use this option for a VM that will remain off for an extended period.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
retcode, retmsg = pvc_vm.vm_state(config, domain, "disable", force=force)
|
if not confirm_flag and not config["unsafe"]:
|
||||||
|
try:
|
||||||
|
click.confirm(
|
||||||
|
"Disable VM {}".format(domain), prompt_suffix="? ", abort=True
|
||||||
|
)
|
||||||
|
except Exception:
|
||||||
|
exit(0)
|
||||||
|
|
||||||
|
retcode, retmsg = pvc_vm.vm_state(config, domain, "disable", force=force_flag)
|
||||||
cleanup(retcode, retmsg)
|
cleanup(retcode, retmsg)
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ from setuptools import setup
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pvc",
|
name="pvc",
|
||||||
version="0.9.50",
|
version="0.9.51",
|
||||||
packages=["pvc", "pvc.cli_lib"],
|
packages=["pvc", "pvc.cli_lib"],
|
||||||
install_requires=[
|
install_requires=[
|
||||||
"Click",
|
"Click",
|
||||||
|
8
debian/changelog
vendored
8
debian/changelog
vendored
@ -1,3 +1,11 @@
|
|||||||
|
pvc (0.9.51-0) unstable; urgency=high
|
||||||
|
|
||||||
|
* [CLI Client] Fixes a faulty literal_eval when viewing task status
|
||||||
|
* [CLI Client] Adds a confirmation flag to the vm disable command
|
||||||
|
* [Node Daemon] Removes the pvc-flush service
|
||||||
|
|
||||||
|
-- Joshua M. Boniface <joshua@boniface.me> Mon, 25 Jul 2022 23:25:41 -0400
|
||||||
|
|
||||||
pvc (0.9.50-0) unstable; urgency=high
|
pvc (0.9.50-0) unstable; urgency=high
|
||||||
|
|
||||||
* [Node Daemon/API/CLI] Adds free memory node selector
|
* [Node Daemon/API/CLI] Adds free memory node selector
|
||||||
|
1
debian/pvc-daemon-node.install
vendored
1
debian/pvc-daemon-node.install
vendored
@ -3,5 +3,4 @@ node-daemon/pvcnoded.sample.yaml etc/pvc
|
|||||||
node-daemon/pvcnoded usr/share/pvc
|
node-daemon/pvcnoded usr/share/pvc
|
||||||
node-daemon/pvcnoded.service lib/systemd/system
|
node-daemon/pvcnoded.service lib/systemd/system
|
||||||
node-daemon/pvc.target lib/systemd/system
|
node-daemon/pvc.target lib/systemd/system
|
||||||
node-daemon/pvc-flush.service lib/systemd/system
|
|
||||||
node-daemon/monitoring usr/share/pvc
|
node-daemon/monitoring usr/share/pvc
|
||||||
|
5
debian/pvc-daemon-node.postinst
vendored
5
debian/pvc-daemon-node.postinst
vendored
@ -7,11 +7,6 @@ systemctl daemon-reload
|
|||||||
systemctl enable /lib/systemd/system/pvcnoded.service
|
systemctl enable /lib/systemd/system/pvcnoded.service
|
||||||
systemctl enable /lib/systemd/system/pvc.target
|
systemctl enable /lib/systemd/system/pvc.target
|
||||||
|
|
||||||
# Inform administrator of the autoflush daemon if it is not enabled
|
|
||||||
if ! systemctl is-active --quiet pvc-flush.service; then
|
|
||||||
echo "NOTE: The PVC autoflush daemon (pvc-flush.service) is not enabled by default; enable it to perform automatic flush/unflush actions on host shutdown/startup."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Inform administrator of the service restart/startup not occurring automatically
|
# Inform administrator of the service restart/startup not occurring automatically
|
||||||
if systemctl is-active --quiet pvcnoded.service; then
|
if systemctl is-active --quiet pvcnoded.service; then
|
||||||
echo "NOTE: The PVC node daemon (pvcnoded.service) has not been restarted; this is up to the administrator."
|
echo "NOTE: The PVC node daemon (pvcnoded.service) has not been restarted; this is up to the administrator."
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
# Parallel Virtual Cluster autoflush daemon
|
|
||||||
|
|
||||||
[Unit]
|
|
||||||
Description = Parallel Virtual Cluster autoflush daemon
|
|
||||||
After = pvcnoded.service pvcapid.service zookeeper.service libvirtd.service ssh.service ceph.target network-online.target
|
|
||||||
Wants = pvcnoded.service
|
|
||||||
PartOf = pvc.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type = oneshot
|
|
||||||
RemainAfterExit = true
|
|
||||||
WorkingDirectory = /usr/share/pvc
|
|
||||||
TimeoutSec = 30min
|
|
||||||
ExecStartPre = /bin/sleep 30
|
|
||||||
ExecStart = /usr/bin/pvc -c local node unflush --wait
|
|
||||||
ExecStop = /usr/bin/pvc -c local node flush --wait
|
|
||||||
ExecStopPost = /bin/sleep 5
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy = pvc.target
|
|
@ -48,7 +48,7 @@ import re
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
# Daemon version
|
# Daemon version
|
||||||
version = "0.9.50"
|
version = "0.9.51"
|
||||||
|
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
|
Reference in New Issue
Block a user