[Pkg-ganeti-devel] [ganeti] 03/05: Run the Ganeti QA suite as DEP-8 test
Apollon Oikonomopoulos
apoikos at moszumanska.debian.org
Sat Jan 2 13:13:11 UTC 2016
This is an automated email from the git hooks/post-receive script.
apoikos pushed a commit to branch debian/stable/jessie
in repository ganeti.
commit 9de81e3a08b36ae22a59aa4661c1b57d04adf7c9
Author: Apollon Oikonomopoulos <apoikos at debian.org>
Date: Tue Jul 21 15:48:38 2015 +0300
Run the Ganeti QA suite as DEP-8 test
Use a vcluster configuration to run the QA suite as a DEP-8 test. The
test needs root access, will mess with the network config and possibly
break the testbed.
The json definition was adapted from upstream's buildbot config[1].
[1] http://git.ganeti.org/?p=buildbot.git;a=blob;f=roles/buildmaster/files/srv/buildbot/masters/ganeti/qa-vcluster-tiny.json;h=e9fd0355af906eb5987ffc2e8677c837ade1bc34;hb=HEAD
---
debian/tests/control | 3 ++
debian/tests/vcluster-qa | 31 ++++++++++++
debian/tests/vcluster-qa.json | 107 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 141 insertions(+)
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..40360da
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: vcluster-qa
+Restrictions: needs-root, breaks-testbed, isolation-container, allow-stderr
+Depends: ganeti, ganeti-instance-debootstrap, python-yaml, procps, iptables
diff --git a/debian/tests/vcluster-qa b/debian/tests/vcluster-qa
new file mode 100755
index 0000000..341996c
--- /dev/null
+++ b/debian/tests/vcluster-qa
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# Run Ganeti's QA suite as a DEP-8 test.
+# WARNING: This may break your system so be sure to use an ephemeral container.
+
+set -e
+
+# Create two network interfaces: the master netdev (gnt) and the bridge
+# (gnt-br0)
+
+ip link add gnt type dummy && ip link set gnt up
+ip link add gnt-br0 type bridge && ip link set gnt-br0 up
+
+# Generate an SSH keypair for root and set up SSH access
+ssh-keygen -t dsa -b 1024 -f /root/.ssh/id_dsa -N ''
+cat /root/.ssh/id_dsa.pub >> /root/.ssh/authorized_keys
+ssh-keyscan localhost >> /root/.ssh/known_hosts
+
+# Setup the vcluster
+mkdir /tmp/ganeti-vcluster
+
+/usr/lib/ganeti/tools/vcluster-setup -c 5 -i 5 -n gnt /tmp/ganeti-vcluster
+
+# Setup the python library path to point to the installed Ganeti instance
+export PYTHONPATH="/usr/share/ganeti/default"
+
+# Disable initscript redirection to systemctl, as this breaks vcluster
+export _SYSTEMCTL_SKIP_REDIRECT=1
+
+# Run the QA suite
+./qa/ganeti-qa.py --yes-do-it debian/tests/vcluster-qa.json
diff --git a/debian/tests/vcluster-qa.json b/debian/tests/vcluster-qa.json
new file mode 100644
index 0000000..4a7db71
--- /dev/null
+++ b/debian/tests/vcluster-qa.json
@@ -0,0 +1,107 @@
+{
+ "name": "cluster",
+ "#rename": "disabled",
+
+ "# Virtual cluster": null,
+ "vcluster-master": "localhost",
+ "vcluster-basedir": "/tmp/ganeti-vcluster",
+
+ "cluster-init-args": ["--no-etc-hosts", "--no-drbd-storage"],
+
+ "enabled-hypervisors": "fake",
+ "enabled-disk-templates": "diskless",
+ "hypervisor-parameters": {},
+ "primary_ip_version": 4,
+
+ "os": "debootstrap+default",
+ "mem": "1G",
+ "maxmem": "1G",
+ "minmem": "512M",
+
+ "# Lists of disk sizes": null,
+ "disk": ["512M"],
+ "disk-growth": ["512M"],
+
+ "# Instance policy specs": null,
+ "ispec_mem_size_max": 1024,
+ "ispec_disk_size_min": 0,
+ "ispec_disk_count_min": 0,
+
+ "master-netdev": "gnt",
+ "default-nicparams": { "mode": "bridged", "link": "gnt-br0" },
+
+ "# Important: per-node root SSH keys and vcluster don't work together": null,
+ "modify_ssh_setup": false,
+
+ "nodes": [
+ {
+ "# Master node": null,
+ "primary": "node1",
+ "secondary": "192.0.2.10"
+ },
+
+ {
+ "primary": "node2",
+ "secondary": "192.0.2.11"
+ },
+
+ {
+ "primary": "node3",
+ "secondary": "192.0.2.12"
+ },
+
+ {
+ "primary": "node4",
+ "secondary": "192.0.2.13"
+ },
+
+ {
+ "primary": "node5",
+ "secondary": "192.0.2.14"
+ }
+ ],
+
+ "instances": [
+ { "name": "instance1" },
+ { "name": "instance2" },
+ { "name": "instance3" },
+ { "name": "instance4" },
+ { "name": "instance5" }
+ ],
+
+ "tests": {
+ "default": true,
+ "default-instance-tests": true,
+
+ "# NOTE: The tests below are disabled because they do not work": null,
+ "# properly in virtual clusters. Some could be made to work with": null,
+ "# a bit of work on the QA code.": null,
+
+ "cluster-burnin": false,
+ "cluster-exclusive-storage": false,
+ "cluster-reserved-lvs": false,
+ "env": false,
+ "group-custom-ssh-port": false,
+ "haskell-confd": false,
+ "htools": false,
+ "instance-add-drbd-disk": false,
+ "instance-add-plain-disk": false,
+ "instance-export": false,
+ "instance-import": false,
+ "instance-modify": false,
+ "instance-recreate-disks": false,
+ "instance-remove-drbd-offline": false,
+ "instance-rename": false,
+ "instance-communication": false,
+ "exclusive-storage-instance-tests": false,
+ "test-jobqueue": false,
+
+ "job-list": true,
+
+ "jobqueue-performance": false,
+
+ "# the end": null
+ },
+
+ "# vim: set syntax=javascript :": null
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ganeti/ganeti.git
More information about the Pkg-ganeti-devel
mailing list