Yaniv Bronhaim has uploaded a new change for review.
Change subject: Adding to vdsm automation lago env setup for functional tests ......................................................................
Adding to vdsm automation lago env setup for functional tests
lago_control.sh - is the main script which runs lagocli command lago-env.json - defines the vms environment reposync-config.repo - are all repos that required in the vms template-repo.json - maybe later will come from lago repo but currently it specifies from where to download images deploy-script - the directory includes specific script that will run automatically on the vm after installation - the use of those script is in lago_control.sh, for each vm what scripts will run after first boot
check-patch only runs ./lago_control.sh from current loaction
Change-Id: I463c754bd70679449d0841caeef1b845b5709f1c Signed-off-by: Yaniv Bronhaim ybronhei@redhat.com --- M automation/check-patch.sh A automation/deploy-scripts/add_local_repo.sh A automation/deploy-scripts/bz_1195882_libvirt_workaround.sh A automation/deploy-scripts/setup_host.sh A automation/deploy-scripts/setup_vdsm_tests.sh A automation/deploy-scripts/start_vdsm.sh A automation/lago-env.json A automation/lago_control.sh A automation/reposync-config.repo A automation/template-repo.json 10 files changed, 415 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/48268/1
diff --git a/automation/check-patch.sh b/automation/check-patch.sh index c3f0020..aa677ab 100755 --- a/automation/check-patch.sh +++ b/automation/check-patch.sh @@ -13,3 +13,6 @@ if git diff-tree --no-commit-id --name-only -r HEAD | grep --quiet 'vdsm.spec.in' ; then yum -y install exported-artifacts/!(*.src).rpm fi + +# Run functional tests +./lago_control.sh diff --git a/automation/deploy-scripts/add_local_repo.sh b/automation/deploy-scripts/add_local_repo.sh new file mode 120000 index 0000000..c203e49 --- /dev/null +++ b/automation/deploy-scripts/add_local_repo.sh @@ -0,0 +1 @@ +../../common/deploy-scripts/add_local_repo.sh \ No newline at end of file diff --git a/automation/deploy-scripts/bz_1195882_libvirt_workaround.sh b/automation/deploy-scripts/bz_1195882_libvirt_workaround.sh new file mode 120000 index 0000000..b92ddbe --- /dev/null +++ b/automation/deploy-scripts/bz_1195882_libvirt_workaround.sh @@ -0,0 +1 @@ +../../common/deploy-scripts/bz_1195882_libvirt_workaround.sh \ No newline at end of file diff --git a/automation/deploy-scripts/setup_host.sh b/automation/deploy-scripts/setup_host.sh new file mode 120000 index 0000000..5fc19a8 --- /dev/null +++ b/automation/deploy-scripts/setup_host.sh @@ -0,0 +1 @@ +../../common/deploy-scripts/setup_host.sh \ No newline at end of file diff --git a/automation/deploy-scripts/setup_vdsm_tests.sh b/automation/deploy-scripts/setup_vdsm_tests.sh new file mode 100644 index 0000000..ca1bb83 --- /dev/null +++ b/automation/deploy-scripts/setup_vdsm_tests.sh @@ -0,0 +1,2 @@ +yum install --nogpgcheck -y vdsm vdsm-cli vdsm-tests +vdsm-tool configure --force diff --git a/automation/deploy-scripts/start_vdsm.sh b/automation/deploy-scripts/start_vdsm.sh new file mode 100644 index 0000000..63e1230 --- /dev/null +++ b/automation/deploy-scripts/start_vdsm.sh @@ -0,0 +1 @@ +systemctl start vdsmd diff --git a/automation/lago-env.json b/automation/lago-env.json new file mode 100644 index 0000000..15d56c2 --- /dev/null +++ b/automation/lago-env.json @@ -0,0 +1,93 @@ +{ + "domains": { + "host-el7": { + "nics": [ + { + "net": "lago" + } + ], + "disks": [ + { + "template_name": "centos7_host", + "type": "template", + "name": "root", + "dev": "vda", + "format": "qcow2" + } + ], + "metadata": { + "ovirt-role": "host", + "ovirt-scripts": [ + "deploy-scripts/add_local_repo.sh", + "deploy-scripts/setup_host.sh", + "deploy-scripts/setup_vdsm_tests.sh", + "deploy-scripts/start_vdsm.sh", + "deploy-scripts/bz_1195882_libvirt_workaround.sh" + ] + } + }, + "host-fc21": { + "nics": [ + { + "net": "lago" + } + ], + "disks": [ + { + "template_name": "fedora21_host", + "type": "template", + "name": "root", + "dev": "vda", + "format": "qcow2" + } + ], + "metadata": { + "ovirt-role": "host", + "ovirt-scripts": [ + "deploy-scripts/add_local_repo.sh", + "deploy-scripts/setup_host.sh", + "deploy-scripts/setup_vdsm_tests.sh", + "deploy-scripts/start_vdsm.sh", + "deploy-scripts/bz_1195882_libvirt_workaround.sh" + ] + } + }, + "host-fc22": { + "nics": [ + { + "net": "lago" + } + ], + "disks": [ + { + "template_name": "fedora22_host", + "type": "template", + "name": "root", + "dev": "vda", + "format": "qcow2" + } + ], + "metadata": { + "ovirt-role": "host", + "ovirt-scripts": [ + "deploy-scripts/add_local_repo.sh", + "deploy-scripts/setup_host.sh", + "deploy-scripts/setup_vdsm_tests.sh", + "deploy-scripts/start_vdsm.sh", + "deploy-scripts/bz_1195882_libvirt_workaround.sh" + ] + } + } + + }, + "nets": { + "lago": { + "type": "nat", + "dhcp": { + "start": 100, + "end": 254 + }, + "management": true + } + } +} diff --git a/automation/lago_control.sh b/automation/lago_control.sh new file mode 100644 index 0000000..0236c92 --- /dev/null +++ b/automation/lago_control.sh @@ -0,0 +1,18 @@ +PREFIX=vdsm_functional + +lagocli init $PREFIX lago-env.json --template-repo-path template-repo.json + +lagocli ovirt-reposetup --reposync-yum-config reposync-config.repo \ + --vdsm-dir=/exported-artifacts +lagocli start +lagocli ovirt deploy + + +for HOST in host-el7 host-fc21 host-fc22 +do + lagocli shell $HOST -c "pushd /usr/share/vdsm/tests && \ + ./run_tests.sh --with-xunit --xunit-file=/tmp/nosetests-${HOST}.xml -s functional/*Tests.py && \ + popd" > ../$HOST + lagocli copy-from-vm $HOST /tmp/nosetests-${HOST}.xml ../nosetests-${HOST}.xml +done + diff --git a/automation/reposync-config.repo b/automation/reposync-config.repo new file mode 100644 index 0000000..91ad529 --- /dev/null +++ b/automation/reposync-config.repo @@ -0,0 +1,114 @@ +[main] +reposdir=/etc/reposync.repos.d + +[ovirt-master-snapshot-el6] +name=oVirt Master Nightly Test Releases +baseurl=http://resources.ovirt.org/pub/ovirt-master-snapshot/rpm/el6/ +exclude=ovirt-node-* *-debuginfo ovirt-engine-appliance +enabled=1 +gpgcheck=0 + +[ovirt-master-snapshot-el7] +name=oVirt Master Nightly Test Releases +baseurl=http://resources.ovirt.org/pub/ovirt-master-snapshot/rpm/el7/ +exclude=ovirt-node-* *-debuginfo ovirt-engine-appliance +enabled=1 +gpgcheck=0 + +[ovirt-master-snapshot-fc21] +name=oVirt Master Nightly Test Releases +baseurl=http://resources.ovirt.org/pub/ovirt-master-snapshot/rpm/fc21/ +exclude=ovirt-node-* *-debuginfo ovirt-engine-appliance +enabled=1 +gpgcheck=0 + +[ovirt-master-snapshot-fc22] +name=oVirt Master Nightly Test Releases +baseurl=http://resources.ovirt.org/pub/ovirt-master-snapshot/rpm/fc22/ +exclude=ovirt-node-* *-debuginfo ovirt-engine-appliance +enabled=1 +gpgcheck=0 + +[ovirt-master-snapshot-static-el6] +name=oVirt Master Nightly Statics +baseurl=http://resources.ovirt.org/pub/ovirt-master-snapshot-static/rpm/el6/ +exclude=jasperreports-server ovirt-guest-tools-iso ovirt-engine-jboss-as +enabled=1 +gpgcheck=0 + +[ovirt-master-snapshot-static-el7] +name=oVirt Master Nightly Statics +baseurl=http://resources.ovirt.org/pub/ovirt-master-snapshot-static/rpm/el7/ +exclude=jasperreports-server ovirt-guest-tools-iso ovirt-engine-jboss-as +enabled=1 +gpgcheck=0 + +[ovirt-master-snapshot-static-fc21] +name=oVirt Master Nightly Statics +baseurl=http://resources.ovirt.org/pub/ovirt-master-snapshot-static/rpm/fc21/ +exclude=jasperreports-server ovirt-guest-tools-iso ovirt-engine-jboss-as +enabled=1 +gpgcheck=0 + +[ovirt-master-snapshot-static-fc22] +name=oVirt Master Nightly Statics +baseurl=http://resources.ovirt.org/pub/ovirt-master-snapshot-static/rpm/fc22/ +exclude=jasperreports-server ovirt-guest-tools-iso ovirt-engine-jboss-as +enabled=1 +gpgcheck=0 + +[ovirt-master-dependencies-el6] +name=oVirt dependencies +baseurl=http://copr-be.cloud.fedoraproject.org/results/patternfly/patternfly1/epel-6... +enabled=1 +gpgcheck=0 + +[ovirt-master-dependencies-el7] +name=oVirt dependencies +baseurl=http://copr-be.cloud.fedoraproject.org/results/patternfly/patternfly1/epel-7... +enabled=1 +gpgcheck=0 + +[ovirt-master-dependencies-fc21] +name=oVirt dependencies +baseurl=http://copr-be.cloud.fedoraproject.org/results/patternfly/patternfly1/fedora... +enabled=1 +gpgcheck=0 + +[ovirt-master-dependencies-fc22] +name=oVirt dependencies +baseurl=http://copr-be.cloud.fedoraproject.org/results/patternfly/patternfly1/fedora... +enabled=1 +gpgcheck=0 + +[epel-el6] +name=EPEL repo +baseurl=https://dl.fedoraproject.org/pub/epel/6/x86_64/ +enabled=1 +gpgcheck=0 +includepkgs=ioprocess python-ioprocess + +[epel-el7] +name=EPEL repo +baseurl=https://dl.fedoraproject.org/pub/epel/7/x86_64/ +enabled=1 +gpgcheck=0 +includepkgs=ioprocess python-ioprocess userspace-rcu safelease + +[glusterfs-el7] +name=GlusterFS repo +baseurl=http://download.gluster.org/pub/gluster/glusterfs/nightly/glusterfs/epel-7-x... +enabled=1 +gpgcheck=0 + +[glusterfs-fc21] +name=GlusterFS repo +baseurl=http://download.gluster.org/pub/gluster/glusterfs/nightly/glusterfs/fedora-2... +enabled=1 +gpgcheck=0 + +[glusterfs-fc22] +name=GlusterFS repo +baseurl=http://download.gluster.org/pub/gluster/glusterfs/nightly/glusterfs/fedora-2... +enabled=1 +gpgcheck=0 diff --git a/automation/template-repo.json b/automation/template-repo.json new file mode 100644 index 0000000..5baeb1a --- /dev/null +++ b/automation/template-repo.json @@ -0,0 +1,181 @@ +{ + "templates": { + "centos6_engine": { + "versions": { + "v1": { + "source": "in-office-minidell", + "handle": "centos6/engine/v1.qcow2", + "timestamp": 1428328144 + }, + "v2": { + "source": "in-office-minidell", + "handle": "centos6/engine/v2.qcow2", + "timestamp": 1432217222 + } + } + }, + "centos6_host": { + "versions": { + "v1": { + "source": "in-office-minidell", + "handle": "centos6/host/v1.qcow2", + "timestamp": 1428328144 + }, + "v2": { + "source": "in-office-minidell", + "handle": "centos6/host/v2.qcow2", + "timestamp": 1432217222 + } + } + }, + "centos7_engine": { + "versions": { + "v1": { + "source": "in-office-minidell", + "handle": "centos7/engine/v1.qcow2", + "timestamp": 1428328144 + }, + "v2": { + "source": "in-office-minidell", + "handle": "centos7/engine/v2.qcow2", + "timestamp": 1432217222 + }, + "v3": { + "source": "in-office-minidell", + "handle": "centos7/engine/v3.qcow2", + "timestamp": 1434299492 + }, + "v4": { + "source": "in-office-minidell", + "handle": "centos7/engine/v4.qcow2", + "timestamp": 1438152752 + }, + "v5": { + "source": "in-office-minidell", + "handle": "centos7/engine/v5.qcow2", + "timestamp": 1439117576 + } + } + }, + "centos7_host": { + "versions": { + "v1": { + "source": "in-office-minidell", + "handle": "centos7/host/v1.qcow2", + "timestamp": 1428328144 + }, + "v2": { + "source": "in-office-minidell", + "handle": "centos7/host/v2.qcow2", + "timestamp": 1432217222 + }, + "v3": { + "source": "in-office-minidell", + "handle": "centos7/host/v3.qcow2", + "timestamp": 1434299492 + }, + "v4": { + "source": "in-office-minidell", + "handle": "centos7/host/v4.qcow2", + "timestamp": 1438152752 + }, + "v5": { + "source": "in-office-minidell", + "handle": "centos7/host/v5.qcow2", + "timestamp": 1438699227 + } + } + }, + "centos7_docker_host": { + "versions": { + "v1": { + "source": "in-office-minidell", + "handle": "centos7/host/centos7-container-tpl.qcow2", + "timestamp": 1428328144 + } + } + }, + "rhel7_engine": { + "versions": { + "v1": { + "source": "in-office-minidell", + "handle": "rhel7/engine/v1.qcow2", + "timestamp": 1428328144 + } + } + }, + "rhel7_host": { + "versions": { + "v1": { + "source": "in-office-minidell", + "handle": "rhel7/host/v1.qcow2", + "timestamp": 1428328144 + } + } + }, + "fedora21_host": { + "versions": { + "v1": { + "source": "in-office-minidell", + "handle": "fedora21/host/v1.qcow2", + "timestamp": 1438263858 + }, + "v2": { + "source": "in-office-minidell", + "handle": "fedora21/host/v2.qcow2", + "timestamp": 1438699227 + } + } + }, + "fedora22_host": { + "versions": { + "v1": { + "source": "in-office-minidell", + "handle": "fedora22/host/v1.qcow2", + "timestamp": 1438263325 + }, + "v2": { + "source": "in-office-minidell", + "handle": "fedora22/host/v2.qcow2", + "timestamp": 1438699227 + } + } + }, + "storage-iscsi": { + "versions": { + "v1": { + "source": "in-office-minidell", + "handle": "fedora20/storage-iscsi/v1.qcow2", + "timestamp": 1428328144 + } + } + }, + "storage-nfs": { + "versions": { + "v1": { + "source": "in-office-minidell", + "handle": "fedora20/storage-nfs/v1.qcow2", + "timestamp": 1428328144 + } + } + }, + "storage-nfs-export": { + "versions": { + "v1": { + "source": "in-office-minidell", + "handle": "fedora20/storage-nfs-export/v1.qcow2", + "timestamp": 1428328144 + } + } + } + }, + "sources": { + "in-office-minidell": { + "args": { + "baseurl": "http://10.35.18.63/repo/" + }, + "type": "http" + } + }, + "name": "in_office_repo" +}
automation@ovirt.org has posted comments on this change.
Change subject: Adding to vdsm automation lago env setup for functional tests ......................................................................
Patch Set 1:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: Adding to vdsm automation lago env setup for functional tests ......................................................................
Patch Set 2:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: Adding to vdsm automation lago env setup for functional tests ......................................................................
Patch Set 3:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: Adding to vdsm automation lago env setup for functional tests ......................................................................
Patch Set 4:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: Adding to vdsm automation lago env setup for functional tests ......................................................................
Patch Set 5:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: Adding to vdsm automation lago env setup for functional tests ......................................................................
Patch Set 6:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: Adding to vdsm automation lago env setup for functional tests ......................................................................
Patch Set 7:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: Adding to vdsm automation lago env setup for functional tests ......................................................................
Patch Set 8:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: Adding to vdsm automation lago env setup for functional tests ......................................................................
Patch Set 9:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
David Caro has posted comments on this change.
Change subject: Adding to vdsm automation lago env setup for functional tests ......................................................................
Patch Set 9:
(2 comments)
https://gerrit.ovirt.org/#/c/48268/9/automation/lago-control.sh File automation/lago-control.sh:
Line 1: #!/bin/sh Line 2: set -e For debugging right now, you can also add -x Line 3: export LIBGUESTFS_BACKEND=direct Line 4: Line 5: PREFIX=$PWD/vdsm_functional Line 6: TEMPLATES_REPO=/usr/share/ovirtlago/config/stores/office.json
Line 3: export LIBGUESTFS_BACKEND=direct Line 4: Line 5: PREFIX=$PWD/vdsm_functional Line 6: TEMPLATES_REPO=/usr/share/ovirtlago/config/stores/office.json Line 7: You should add here a rm -rf "$PREFIX", as lago fails if it already exists (that's what is happening I think) Line 8: lagocli init \ Line 9: "$PREFIX" \ Line 10: automation/lago-env.json \ Line 11: --template-repo-path "$TEMPLATES_REPO"
automation@ovirt.org has posted comments on this change.
Change subject: Adding to vdsm automation lago env setup for functional tests ......................................................................
Patch Set 10:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: Adding to vdsm automation lago env setup for functional tests ......................................................................
Patch Set 11:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
automation@ovirt.org has posted comments on this change.
Change subject: Adding to vdsm automation lago env setup for functional tests ......................................................................
Patch Set 12:
* Update tracker: IGNORE, no Bug-Url found * Check Bug-Url::WARN, no bug url found, make sure header matches 'Bug-Url: ' and is a valid url. * Check merged to previous::IGNORE, Not in stable branch (['ovirt-3.5', 'ovirt-3.4', 'ovirt-3.3'])
vdsm-patches@lists.fedorahosted.org