File: vcluster-qa

package info (click to toggle)
ganeti 2.16.0-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 16,660 kB
  • sloc: python: 105,115; haskell: 43,768; sh: 3,896; makefile: 2,763
file content (39 lines) | stat: -rwxr-xr-x 1,177 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/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 rsa -b 2048 -f /root/.ssh/id_rsa -N ''
cat /root/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
ssh-keyscan localhost >> /root/.ssh/known_hosts

vcluster_dir="/tmp/ganeti-vcluster"

if [ -n "$AUTOPKGTEST_ARTIFACTS" ]; then
	mkdir "${AUTOPKGTEST_ARTIFACTS}/ganeti-vcluster"
	ln -s "${AUTOPKGTEST_ARTIFACTS}/ganeti-vcluster" "$vcluster_dir"
else
	mkdir -p "$vcluster_dir"
fi

# Setup the vcluster

/usr/lib/ganeti/tools/vcluster-setup -c 5 -i 5 -n gnt "$vcluster_dir"

# 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