diff --git a/build-deb.sh b/build-deb.sh index 61cdb665..66e9e8b1 100755 --- a/build-deb.sh +++ b/build-deb.sh @@ -1,5 +1,5 @@ #!/bin/sh -ver="0.2" +ver="0.3" git pull rm ../pvc_* dh_make -p pvc_${ver} --createorig --single --yes diff --git a/virtualization-daemon/pvcvd/ansiiprint.py b/daemon-common/lib/ansiiprint.py similarity index 100% rename from virtualization-daemon/pvcvd/ansiiprint.py rename to daemon-common/lib/ansiiprint.py diff --git a/virtualization-daemon/pvcvd/zkhandler.py b/daemon-common/lib/zkhandler.py similarity index 98% rename from virtualization-daemon/pvcvd/zkhandler.py rename to daemon-common/lib/zkhandler.py index 54bfc07f..5b1b99c4 100644 --- a/virtualization-daemon/pvcvd/zkhandler.py +++ b/daemon-common/lib/zkhandler.py @@ -21,7 +21,7 @@ ############################################################################### import kazoo.client -import pvcvd.ansiiprint as ansiiprint +import ansiiprint # Child list function def listchildren(zk_conn, key): diff --git a/debian/changelog b/debian/changelog index 8760d657..49510291 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +pvc (0.3-1) unstable; urgency=medium + + * Code and package reorganization pending additional daemons + + -- Joshua Boniface Wed, 12 Sep 2018 12:08:28 -0400 + pvc (0.2-1) unstable; urgency=medium * Minor version bump with stability fixes diff --git a/debian/control b/debian/control index b4bf8273..2343b8c4 100644 --- a/debian/control +++ b/debian/control @@ -6,9 +6,18 @@ Standards-Version: 3.9.8 Homepage: https://www.boniface.me X-Python3-Version: >= 3.2 +Package: pvc-daemon-common +Architecture: all +Depends: python3-kazoo, python3-psutil, python3-apscheduler +Suggests: pvc-virtualization-daemon, pvc-client +Description: Parallel Virtual Cluster common daemon libraries (Python 3) + The Parallel Virtual Cluster provides a management solution for QEMU/KVM virtual clusters. + . + This package installs the common daemon libraries + Package: pvc-virtualization-daemon Architecture: all -Depends: python3-kazoo, python3-libvirt, python3-psutil, python3-apscheduler, ipmitool, libvirt-daemon-system +Depends: pvc-daemon-common, python3-libvirt, ipmitool, libvirt-daemon-system Suggests: pvc-client Description: Parallel Virtual Cluster virtualization daemon (Python 3) The Parallel Virtual Cluster provides a management solution for QEMU/KVM virtual clusters, diff --git a/debian/pvc-daemon-common.install b/debian/pvc-daemon-common.install new file mode 100644 index 00000000..371ce8ec --- /dev/null +++ b/debian/pvc-daemon-common.install @@ -0,0 +1 @@ +daemon-common/lib usr/share/pvc diff --git a/debian/pvc-virtualization-daemon.postinst b/debian/pvc-virtualization-daemon.postinst index dfcb4131..60865eb7 100644 --- a/debian/pvc-virtualization-daemon.postinst +++ b/debian/pvc-virtualization-daemon.postinst @@ -1,6 +1,6 @@ #!/bin/sh # Enable the servive -systemctl enable /lib/systemd/system/pvcd.service +systemctl enable /lib/systemd/system/pvcvd.service -echo "The PVC daemon has not been started. Create a config file at /etc/pvc/pvcd.conf then start it." +echo "The PVC virtualization daemon has not been started. Create a config file at /etc/pvc/pvcvd.conf then start it." diff --git a/debian/pvc-virtualization-daemon.prerm b/debian/pvc-virtualization-daemon.prerm index c71ce66b..5694171f 100644 --- a/debian/pvc-virtualization-daemon.prerm +++ b/debian/pvc-virtualization-daemon.prerm @@ -1,5 +1,5 @@ #!/bin/sh # Disable the service -systemctl disable pvcd.service +systemctl disable pvcvd.service diff --git a/virtualization-daemon/pvcvd.service b/virtualization-daemon/pvcvd.service index ffe834f3..48436a5c 100644 --- a/virtualization-daemon/pvcvd.service +++ b/virtualization-daemon/pvcvd.service @@ -1,14 +1,14 @@ -# Parallel Virtual Cluster node daemon unit file +# Parallel Virtual Cluster virtualization daemon unit file [Unit] -Description = Parallel Virtual Cluster node daemon +Description = Parallel Virtual Cluster virtualization daemon After = network-online.target libvirtd.service zookeeper.service [Service] Type = simple WorkingDirectory = /usr/share/pvc Environment = PYTHONUNBUFFERED=true -Environment = PVCD_CONFIG_FILE=/etc/pvc/pvcd.conf -ExecStart = /usr/share/pvc/pvcd.py +Environment = PVCD_CONFIG_FILE=/etc/pvc/pvcvd.conf +ExecStart = /usr/share/pvc/pvcvd.py Restart = on-failure [Install] diff --git a/virtualization-daemon/pvcvd/Daemon.py b/virtualization-daemon/pvcvd/Daemon.py index fc191258..b38ce4b6 100644 --- a/virtualization-daemon/pvcvd/Daemon.py +++ b/virtualization-daemon/pvcvd/Daemon.py @@ -33,8 +33,9 @@ import time import configparser import apscheduler.schedulers.background -import pvcvd.ansiiprint as ansiiprint -import pvcvd.zkhandler as zkhandler +import lib.ansiiprint as ansiiprint +import lib.zkhandler as zkhandler + import pvcvd.VMInstance as VMInstance import pvcvd.NodeInstance as NodeInstance diff --git a/virtualization-daemon/pvcvd/NodeInstance.py b/virtualization-daemon/pvcvd/NodeInstance.py index 926c8263..e51bb759 100644 --- a/virtualization-daemon/pvcvd/NodeInstance.py +++ b/virtualization-daemon/pvcvd/NodeInstance.py @@ -21,8 +21,8 @@ ############################################################################### import os, sys, psutil, socket, time, libvirt, kazoo.client, threading, subprocess -import pvcvd.ansiiprint as ansiiprint -import pvcvd.zkhandler as zkhandler +import lib.ansiiprint as ansiiprint +import lib.zkhandler as zkhandler class NodeInstance(): # Initialization function diff --git a/virtualization-daemon/pvcvd/VMInstance.py b/virtualization-daemon/pvcvd/VMInstance.py index f6b03c52..0f3880e5 100644 --- a/virtualization-daemon/pvcvd/VMInstance.py +++ b/virtualization-daemon/pvcvd/VMInstance.py @@ -21,8 +21,8 @@ ############################################################################### import os, sys, uuid, socket, time, threading, libvirt, kazoo.client -import pvcvd.ansiiprint as ansiiprint -import pvcvd.zkhandler as zkhandler +import lib.ansiiprint as ansiiprint +import lib.zkhandler as zkhandler class VMInstance: # Initialization function