Skip to contentSkip to conversation

Have OpenStack tested on top of xen's master and libvirt's master.

PATCH Superseded Anthony PERARD 3 participants 20 messages Jul 16, 2015 – Jul 20, 2015

v1 of 14 Superseded Latest is v14 →

lore
Share & tools
lore
#0 lore raw

cover Have OpenStack tested on top of xen's master and libvirt's master.

Hi,

I have looked into getting OpenStack been tested on the latest Xen via osstest. There is an adjustement in common code to accomodate OpenStack, this is an extra Linux config option. Otherwise anything else should be done only if a Toolstack named "openstack" is to be used for testing.

I've introduce an extra Osstest::Toolstack which help to install extra package, and use ballonning for Dom0, 500MB for Dom0 is definetly not enough.

The ts-devstack script does prepare a bit more the host, clone devstack, then run ./stack.sh, which is a bit like raisin. Once the machine ready, the integration test suite from OpenStack, Tempest, is started. Do you think those two step should be in separate test, one for devstack, and one for Tempest? I have not done it, but we could have some smoke test before Tempest where osstest tryied to start a guest.

For the last patch, I've tried to have ./standalone make-flight have only the necessary jobs to run test-amd64-amd64-devstack, but there is still build-xsm in the list.

Then later, there will be the question of which tree to track, devstack? nova? Or don't track any and just test with the master branch from time to time.

Thanks,

Anthony PERARD (4):
ts-kernel-build: Enable CONFIG_NETFILTER_XT_TARGET_CHECKSUM
Toolstack: Add OpenStack as a toolstack.
ts-devstack: Deploy OpenStack then test it with Tempest Create a flight to test OpenStack with xen-unstable and libvirt.

 Osstest/Toolstack/openstack.pm |  81 +++++++++++
 ap-common                      |   4 +
 ap-fetch-version               |   4 +
 ap-fetch-version-old           |   5 +
 ap-print-url                   |   3 +
 cri-common                     |   1 +
 make-flight                    |  17 +++
 mfi-common                     |   7 +
 sg-run-job                     |   5 +
 ts-devstack                    | 305 +++++++++++++++++++++++++++++++++++++++++
 ts-kernel-build                |   5 +
 ts-xen-install                 |   1 +
 12 files changed, 438 insertions(+)
 create mode 100644 Osstest/Toolstack/openstack.pm
 create mode 100755 ts-devstack
Signature · 1 line
Anthony PERARD
#1 lore raw

PATCH 1/4 ts-kernel-build: Enable CONFIG_NETFILTER_XT_TARGET_CHECKSUM

This iptables target CHECKSUM is used by OpenStack.

---
 ts-kernel-build | 5 +++++
 1 file changed, 5 insertions(+)
ts-kernel-build +5 -0
index 28bead4..d5defaa 100755
@@ -248,6 +248,11 @@ setopt CONFIG_SYSVIPC y
 setopt CONFIG_BLK_DEV_LOOP y
 
 setopt CONFIG_PACKET y
+
+# needed for OpenStack
+# because: https://bugzilla.redhat.com/show_bug.cgi?id=910619#c6
+setopt CONFIG_NETFILTER_ADVANCED y
+setopt CONFIG_NETFILTER_XT_TARGET_CHECKSUM m
 END
 sub stash_config_edscript ($) {
     my ($settings) = @_;
Signature · 1 line
Anthony PERARD
Acked-by on v1 1/4
#2 lore raw

Re: [PATCH OSSTEST 1/4] ts-kernel-build: Enable CONFIG_NETFILTER_XT_TARGET_CHECKSUM

Quoted 3 lines · Anthony PERARD

This iptables target CHECKSUM is used by OpenStack.

Quoted 9 lines
---
 ts-kernel-build | 5 +++++
 1 file changed, 5 insertions(+)
ts-kernel-build +0 -0
index 28bead4..d5defaa 100755

ts-kernel-build setopt CONFIG_SYSVIPC y · line 253

Quoted 6 lines
ts-kernel-build +3 -0
@@ -248,6 +248,11 @@ setopt CONFIG_SYSVIPC y
 setopt CONFIG_BLK_DEV_LOOP y
 
 setopt CONFIG_PACKET y
+
+# needed for OpenStack
+# because: https://bugzilla.redhat.com/show_bug.cgi?id=910619#c6

How exciting!

Quoted 5 lines
ts-kernel-build +2 -0
+setopt CONFIG_NETFILTER_ADVANCED y
+setopt CONFIG_NETFILTER_XT_TARGET_CHECKSUM m
 END
 sub stash_config_edscript ($) {
     my ($settings) = @_;
#3 lore raw

PATCH 2/4 Toolstack: Add OpenStack as a toolstack.

In reply to Anthony PERARD

Having a separate toolstack help to configure the host specificly for OpenStack, and also helps to have a separate flight.

---
 Osstest/Toolstack/openstack.pm | 81 ++++++++++++++++++++++++++++++++++++++++++
 ts-xen-install                 |  1 +
 2 files changed, 82 insertions(+)
 create mode 100644 Osstest/Toolstack/openstack.pm
Osstest/Toolstack/openstack.pm new file +81 -0
new file mode 100644
index 0000000..4529845
@@ -0,0 +1,81 @@
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2015 Citrix Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+package Osstest::Toolstack::openstack;
+
+use strict;
+use warnings;
+
+use Osstest::TestSupport;
+
+sub new {
+    my ($class, $ho, $methname,$asset) = @_;
+    my @extra_packages = qw(git pwgen sudo);
+    # package from libvirt
+    push(@extra_packages, qw(libavahi-client3));
+    my $nl_lib = "libnl-3-200";
+    $nl_lib = "libnl1" if ($ho->{Suite} =~ m/wheezy/);
+    push(@extra_packages, $nl_lib);
+    return bless { Name => "openstack",
+		   Host => $ho,
+                   NewDaemons => [qw(libvirtd)],
+		   Dom0MemFixed => 0,
+                   ExtraPackages => \@extra_packages,
+    }, $class;
+}
+
+sub destroy ($$) {
+    my ($self,$gho) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+sub create ($$) {
+    my ($self,$gho) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+sub consolecmd ($$) {
+    my ($self,$gho) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+sub shutdown_wait ($$$) {
+    my ($self,$gho,$timeout) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+sub migrate_check ($) {
+    my ($self) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+sub migrate ($) {
+    my ($self,$gho,$dst,$timeout) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+sub save ($$$$) {
+    my ($self,$gho,$f,$timeout) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+sub restore ($$$$) {
+    my ($self,$gho,$f,$timeout) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+1;
ts-xen-install +1 -0
index 0f53382..e7e823d 100755
@@ -72,6 +72,7 @@ sub packages () {
 sub extract () {
     my @parts = ('', 'kern', 'xen');
     push @parts, 'libvirt' if $r{toolstack} eq "libvirt";
+    push @parts, 'libvirt' if $r{toolstack} eq "openstack";
 
     foreach my $part (@parts) {
         target_extract_jobdistpath($ho, $part, "path_${part}dist",
Signature · 1 line
Anthony PERARD
#4 lore raw

Re: [PATCH OSSTEST 2/4] Toolstack: Add OpenStack as a toolstack.

Quoted 1 line · Anthony PERARD

Having a separate toolstack help to configure the host specificly for

"specifically"

Quoted 1 line

OpenStack, and also helps to have a separate flight.

Will any of the die()s here ever become real commands? I think not because that's not how OpenStack works? i.e. how it is driven doesn't fit into Osstest::Toolstack's model of the world at all.

Given that and given that you introduce your own recipe to sg-run-job which doesn't/can't/won't try to do any of the usual stuff, I can't see any reason not to simply go with toolstack=libvirt for these test cases. That it is the most accurate reflection of what we want and if some openstack test case did want to talk to the underlying toolstack for some reason libvirt would be it.

That would also save duplicating the functionality of libvirt.pm's new function, which would normally call for a subclass of some sort (e.g. how xend is a subclass of xl). Please don't do this though ;-)

Quoted 107 lines
---
 Osstest/Toolstack/openstack.pm | 81 ++++++++++++++++++++++++++++++++++++++++++
 ts-xen-install                 |  1 +
 2 files changed, 82 insertions(+)
 create mode 100644 Osstest/Toolstack/openstack.pm
Osstest/Toolstack/openstack.pm new file +81 -0
new file mode 100644
index 0000000..4529845
@@ -0,0 +1,81 @@
+# This is part of "osstest", an automated testing framework for Xen.
+# Copyright (C) 2015 Citrix Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+
+package Osstest::Toolstack::openstack;
+
+use strict;
+use warnings;
+
+use Osstest::TestSupport;
+
+sub new {
+    my ($class, $ho, $methname,$asset) = @_;
+    my @extra_packages = qw(git pwgen sudo);
+    # package from libvirt
+    push(@extra_packages, qw(libavahi-client3));
+    my $nl_lib = "libnl-3-200";
+    $nl_lib = "libnl1" if ($ho->{Suite} =~ m/wheezy/);
+    push(@extra_packages, $nl_lib);
+    return bless { Name => "openstack",
+		   Host => $ho,
+                   NewDaemons => [qw(libvirtd)],
+		   Dom0MemFixed => 0,
+                   ExtraPackages => \@extra_packages,
+    }, $class;
+}
+
+sub destroy ($$) {
+    my ($self,$gho) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+sub create ($$) {
+    my ($self,$gho) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+sub consolecmd ($$) {
+    my ($self,$gho) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+sub shutdown_wait ($$$) {
+    my ($self,$gho,$timeout) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+sub migrate_check ($) {
+    my ($self) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+sub migrate ($) {
+    my ($self,$gho,$dst,$timeout) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+sub save ($$$$) {
+    my ($self,$gho,$f,$timeout) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+sub restore ($$$$) {
+    my ($self,$gho,$f,$timeout) = @_;
+    die "Guest control not yet supported via OpenStack";
+}
+
+1;
ts-xen-install +1 -0
index 0f53382..e7e823d 100755
@@ -72,6 +72,7 @@ sub packages () {
 sub extract () {
     my @parts = ('', 'kern', 'xen');
     push @parts, 'libvirt' if $r{toolstack} eq "libvirt";
+    push @parts, 'libvirt' if $r{toolstack} eq "openstack";
 
     foreach my $part (@parts) {
         target_extract_jobdistpath($ho, $part, "path_${part}dist",
#5 lore raw

Re: [PATCH OSSTEST 2/4] Toolstack: Add OpenStack as a toolstack.

Quoted 10 lines · Ian Campbell
Quoted 1 line · Anthony PERARD

Having a separate toolstack help to configure the host specificly for

"specifically"

Quoted 1 line

OpenStack, and also helps to have a separate flight.

Will any of the die()s here ever become real commands? I think not because that's not how OpenStack works? i.e. how it is driven doesn't fit into Osstest::Toolstack's model of the world at all.

The main issue would be create an instance from a config file. The Toolstack.create() would need to parse the cfg, extract the image that we want to boot, upload it to Glance, extract other parameter, update the image in Glance, prepare a flavor (disk size, ram, ..) and boot that image with that flavor via Nova.

I think that would be possible since everything can be done from the command line but it would not be as easy as with libvirt.

Or not...
I've look at the doc to create a new image and it's basicly use libvirt to install an OS, install cloud-init in it, and upload the result to Glance.

So, it's look like you're right, Osstest::Toolstack does not fit well with OpenStack.

Quoted 6 lines

Given that and given that you introduce your own recipe to sg-run-job which doesn't/can't/won't try to do any of the usual stuff, I can't see any reason not to simply go with toolstack=libvirt for these test cases. That it is the most accurate reflection of what we want and if some openstack test case did want to talk to the underlying toolstack for some reason libvirt would be it.

Ok, I'll just have to find another way to get more RAM into dom0.

Quoted 3 lines

That would also save duplicating the functionality of libvirt.pm's new function, which would normally call for a subclass of some sort (e.g. how xend is a subclass of xl). Please don't do this though ;-)

Signature · 1 line
Anthony PERARD
#6 lore raw

Re: [PATCH OSSTEST 2/4] Toolstack: Add OpenStack as a toolstack.

Quoted 8 lines · Anthony PERARD
Quoted 6 lines

Given that and given that you introduce your own recipe to sg-run-job which doesn't/can't/won't try to do any of the usual stuff, I can't see any reason not to simply go with toolstack=libvirt for these test cases. That it is the most accurate reflection of what we want and if some openstack test case did want to talk to the underlying toolstack for some reason libvirt would be it.

Ok, I'll just have to find another way to get more RAM into dom0.

In ts-xen-install I think:

    if (toolstack($ho)->{Dom0MemFixed}) {
        $xenhopt .= " dom0_mem=512M,max:512M";
    }
should become sthg like:
    if (toolstack($ho)->{Dom0MemFixed}) {
	my $mem = $r{'dom0_mem'} // 512;
        $xenhopt .= " dom0_mem=${mem}M,max:${mem}M";
    }

and make-flight should set this new runvar only for the openstack job.

Ian.

#7 lore raw

PATCH 3/4 ts-devstack: Deploy OpenStack then test it with Tempest

In reply to Anthony PERARD

This test configure configure a host via the ./stack.sh from devstack, it then test it with Tempest.

---
 sg-run-job  |   5 +
 ts-devstack | 305 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 310 insertions(+)
 create mode 100755 ts-devstack
sg-run-job +5 -0
index e44f79c..109f5ad 100755
@@ -340,6 +340,11 @@ proc run-job/test-rumpuserxen {} {
                  ts-guest-destroy-hard            host   $g   +
 }
 
+proc need-hosts/test-devstack {} { return host }
+proc run-job/test-devstack {} {
+  run-ts . = ts-devstack
+}
+
 #---------- builds ----------
 
 proc need-hosts/build {} { return BUILD }
ts-devstack new file +305 -0

305 lines not on this page · raw message

Signature · 1 line
Anthony PERARD
#8 lore raw

Re: [PATCH OSSTEST 3/4] ts-devstack: Deploy OpenStack then test it with Tempest

Quoted 12 lines · Anthony PERARD
ts-devstack new file +12 -0
+    cd $builddir/devstack
+    >local.conf
+    echo >>local.conf '[[local|localrc]]'
+    echo >>local.conf ADMIN_PASSWORD=`pwgen 20 1`
+    echo >>local.conf DATABASE_PASSWORD=`pwgen 20 1`
+    echo >>local.conf RABBIT_PASSWORD=`pwgen 20 1`
+    echo >>local.conf SERVICE_PASSWORD=`pwgen 20 1`
+    echo >>local.conf SERVICE_TOKEN=`pwgen 20 1`
+    echo >>local.conf \\\# make it small because there is no way to not
+    echo >>local.conf \\\# have this lvm volume created
+    echo >>local.conf VOLUME_BACKING_FILE_SIZE=500M
+    echo >>local.conf DEST=/opt/stack

ts-devstack line 57

Quoted 10 lines
ts-devstack new file +10 -0
+    echo >>local.conf LOGFILE=\\\$DEST/logs/stack.sh.log
+    echo >>local.conf LOG_COLOR=False
+    echo >>local.conf LIBVIRT_TYPE=xen
+    echo >>local.conf GIT_BASE="$openstack_git_base"
+    echo >>local.conf disable_service horizon
+    echo >>local.conf disable_service n-novnc
+    echo >>local.conf enable_service n-obj
+    echo >>local.conf '[[post-config|\$CINDER_CONF]]'
+    echo >>local.conf '[lvmdriver-1]'
+    echo >>local.conf volume_group = $vg

target_putfilecontents_root_stash with a Perl here doc would be better I think?

ts-devstack line 79

Quoted 6 lines

+[...]+

ts-devstack new file +5 -0
+  # OpenStack needs access to libvirt from a user.
+  target_cmd_root($ho, <<END
+    echo >>/etc/libvirt/libvirtd.conf 'unix_sock_group = "libvirt"'
+    echo >>/etc/libvirt/libvirtd.conf 'unix_sock_ro_perms = "0777"'
+    echo >>/etc/libvirt/libvirtd.conf 'unix_sock_rw_perms = "0770"'

This one should be a bash heredoc, I think (can't be a Perl one because this is an append?).

ts-devstack line 111

Quoted 2 lines
ts-devstack new file +2 -0
+sub cleanup() {
+  # Try to have less leaked stuff.

Leaked as in "discovered by ts-leak-check" or just a general tidy up?

If the latter I wouldn't bother.

If the former then won't this hide real issues?

Ian.

#9 lore raw

Re: [PATCH OSSTEST 3/4] ts-devstack: Deploy OpenStack then test it with Tempest

Quoted 24 lines · Ian Campbell
Quoted 12 lines · Anthony PERARD
ts-devstack new file +12 -0
+    cd $builddir/devstack
+    >local.conf
+    echo >>local.conf '[[local|localrc]]'
+    echo >>local.conf ADMIN_PASSWORD=`pwgen 20 1`
+    echo >>local.conf DATABASE_PASSWORD=`pwgen 20 1`
+    echo >>local.conf RABBIT_PASSWORD=`pwgen 20 1`
+    echo >>local.conf SERVICE_PASSWORD=`pwgen 20 1`
+    echo >>local.conf SERVICE_TOKEN=`pwgen 20 1`
+    echo >>local.conf \\\# make it small because there is no way to not
+    echo >>local.conf \\\# have this lvm volume created
+    echo >>local.conf VOLUME_BACKING_FILE_SIZE=500M
+    echo >>local.conf DEST=/opt/stack

ts-devstack line 57

Quoted 10 lines
ts-devstack new file +10 -0
+    echo >>local.conf LOGFILE=\\\$DEST/logs/stack.sh.log
+    echo >>local.conf LOG_COLOR=False
+    echo >>local.conf LIBVIRT_TYPE=xen
+    echo >>local.conf GIT_BASE="$openstack_git_base"
+    echo >>local.conf disable_service horizon
+    echo >>local.conf disable_service n-novnc
+    echo >>local.conf enable_service n-obj
+    echo >>local.conf '[[post-config|\$CINDER_CONF]]'
+    echo >>local.conf '[lvmdriver-1]'
+    echo >>local.conf volume_group = $vg
Quoted 2 lines

target_putfilecontents_root_stash with a Perl here doc would be better I think?

Will use the function. I guest I just need to replace pwgen by something in perl. I think services are accessible from the network, which is why I'm using pwgen.

Quoted 9 lines

ts-devstack line 79

Quoted 6 lines

+[...]+

ts-devstack new file +5 -0
+  # OpenStack needs access to libvirt from a user.
+  target_cmd_root($ho, <<END
+    echo >>/etc/libvirt/libvirtd.conf 'unix_sock_group = "libvirt"'
+    echo >>/etc/libvirt/libvirtd.conf 'unix_sock_ro_perms = "0777"'
+    echo >>/etc/libvirt/libvirtd.conf 'unix_sock_rw_perms = "0770"'

This one should be a bash heredoc, I think (can't be a Perl one because this is an append?).

This is append to the existing libvirtd.conf, yes. I'll use bash heredoc. Or is target_editfile_root() can be used to add lines at the end?

Quoted 8 lines

ts-devstack line 111

Quoted 2 lines
ts-devstack new file +2 -0
+sub cleanup() {
+  # Try to have less leaked stuff.

Leaked as in "discovered by ts-leak-check" or just a general tidy up?

If the latter I wouldn't bother.

If the former then won't this hide real issues?

I've added this when I've seen many "leaked" process from OpenStack by ts-leak-check. I can try to teach the ts- script to not considered as leaked, process and other files from openstack.

Signature · 1 line
Anthony PERARD
#10 lore raw

Re: [PATCH OSSTEST 3/4] ts-devstack: Deploy OpenStack then test it with Tempest

Quoted 25 lines · Anthony PERARD
Quoted 24 lines · Ian Campbell
Quoted 22 lines · Anthony PERARD
ts-devstack new file +22 -0
+    cd $builddir/devstack
+    >local.conf
+    echo >>local.conf '[[local|localrc]]'
+    echo >>local.conf ADMIN_PASSWORD=`pwgen 20 1`
+    echo >>local.conf DATABASE_PASSWORD=`pwgen 20 1`
+    echo >>local.conf RABBIT_PASSWORD=`pwgen 20 1`
+    echo >>local.conf SERVICE_PASSWORD=`pwgen 20 1`
+    echo >>local.conf SERVICE_TOKEN=`pwgen 20 1`
+    echo >>local.conf \\\# make it small because there is no way to not
+    echo >>local.conf \\\# have this lvm volume created
+    echo >>local.conf VOLUME_BACKING_FILE_SIZE=500M
+    echo >>local.conf DEST=/opt/stack
+    echo >>local.conf LOGFILE=\\\$DEST/logs/stack.sh.log
+    echo >>local.conf LOG_COLOR=False
+    echo >>local.conf LIBVIRT_TYPE=xen
+    echo >>local.conf GIT_BASE="$openstack_git_base"
+    echo >>local.conf disable_service horizon
+    echo >>local.conf disable_service n-novnc
+    echo >>local.conf enable_service n-obj
+    echo >>local.conf '[[post-config|\$CINDER_CONF]]'
+    echo >>local.conf '[lvmdriver-1]'
+    echo >>local.conf volume_group = $vg
Quoted 6 lines
Quoted 2 lines

target_putfilecontents_root_stash with a Perl here doc would be better I think?

Will use the function. I guest I just need to replace pwgen by something in perl. I think services are accessible from the network, which is why I'm using pwgen.

Only internally within the test COLO. Given that all the hosts have the same root password I wouldn't worry too much :-)

Quoted 8 lines
Quoted 8 lines
Quoted 7 lines

+[...]+

ts-devstack new file +5 -0
+  # OpenStack needs access to libvirt from a user.
+  target_cmd_root($ho, <<END
+    echo >>/etc/libvirt/libvirtd.conf 'unix_sock_group = "libvirt"'
+    echo >>/etc/libvirt/libvirtd.conf 'unix_sock_ro_perms = "0777"'
+    echo >>/etc/libvirt/libvirtd.conf 'unix_sock_rw_perms = "0770"'
Quoted 5 lines
Quoted 2 lines

This one should be a bash heredoc, I think (can't be a Perl one because this is an append?).

This is append to the existing libvirtd.conf, yes. I'll use bash heredoc. Or is target_editfile_root() can be used to add lines at the end?

I'd expect so, but it'll probably involve more Perl-fu than I can summon. I think a HEREDOC is the right answer anyway.

Quoted 6 lines
Quoted 6 lines

ts-devstack line 111

Quoted 3 lines
ts-devstack new file +2 -0
+sub cleanup() {
+  # Try to have less leaked stuff.

Leaked as in "discovered by ts-leak-check" or just a general tidy up?

Quoted 7 lines
Quoted 3 lines

If the latter I wouldn't bother.

If the former then won't this hide real issues?

I've added this when I've seen many "leaked" process from OpenStack by ts-leak-check. I can try to teach the ts- script to not considered as leaked, process and other files from openstack.

Be sure to distinguish between "expected" leaks (like a daemon which should be running after the test) and unexpected rubbish. You'll probably want to justify anything in the former category in the commit log, and not to include the latter of course.

Ian.

#11 lore raw

Re: [PATCH OSSTEST 3/4] ts-devstack: Deploy OpenStack then test it with Tempest

In reply to Anthony PERARD

ts-devstack line 97

Quoted 3 lines · Anthony PERARD
ts-devstack new file +3 -0
+sub deploy() {
+  # This clone many repos and may take sometime until the GitProxyCache is
+  # filled

Can we find those repos and therefore record the version actual in use via store_vcs_revision?

Even without the ability to control which things get used I think this would be useful data to have when looking into errors etc...

#12 lore raw

Re: [PATCH OSSTEST 3/4] ts-devstack: Deploy OpenStack then test it with Tempest

Quoted 8 lines · Ian Campbell

ts-devstack line 97

Quoted 3 lines · Anthony PERARD
ts-devstack new file +3 -0
+sub deploy() {
+  # This clone many repos and may take sometime until the GitProxyCache is
+  # filled

Can we find those repos and therefore record the version actual in use via store_vcs_revision?

Yes, that can be done. I'll look into using store_vcs_revision.

Quoted 2 lines

Even without the ability to control which things get used I think this would be useful data to have when looking into errors etc...

Signature · 1 line
Anthony PERARD
#13 lore raw

PATCH 4/4 Create a flight to test OpenStack with xen-unstable and libvirt.

In reply to Anthony PERARD
---
 ap-common            |  4 ++++
 ap-fetch-version     |  4 ++++
 ap-fetch-version-old |  5 +++++
 ap-print-url         |  3 +++
 cri-common           |  1 +
 make-flight          | 17 +++++++++++++++++
 mfi-common           |  7 +++++++
 7 files changed, 41 insertions(+)
ap-common +4 -0
index dfeab9e..cb2e91a 100644
@@ -57,6 +57,9 @@
 : ${PUSH_TREE_OVMF:=$XENBITS:/home/xen/git/osstest/ovmf.git}
 : ${BASE_TREE_OVMF:=git://xenbits.xen.org/osstest/ovmf.git}
 
+: ${TREE_DEVSTACK:=git://git.openstack.org/openstack-dev/devstack.git}
+#: ${BASE_TREE_DEVSTACK:=git://xenbits.xen.org/openstack-dev/devstack.git}
+
 : ${TREE_LINUXFIRMWARE:=git://xenbits.xen.org/osstest/linux-firmware.git}
 : ${PUSH_TREE_LINUXFIRMWARE:=$XENBITS:/home/osstest/ext/linux-firmware.git}
 : ${UPSTREAM_TREE_LINUXFIRMWARE:=$GIT_KERNEL_ORG/pub/scm/linux/kernel/git/firmware/linux-firmware.git}
@@ -84,6 +87,7 @@ fi
 : ${LOCALREV_RUMPUSERXEN:=daily-cron.$branch}
 : ${LOCALREV_SEABIOS:=daily-cron.$branch}
 : ${LOCALREV_OVMF:=daily-cron.$branch}
+: ${LOCALREV_DEVSTACK:=daily-cron.$branch}
 
 : ${TREEBASE_LINUX_XCP:=http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27}
 
ap-fetch-version +4 -0
index 8b41acf..9aba511 100755
@@ -89,6 +89,10 @@ ovmf)
 	repo_tree_rev_fetch_git ovmf \
 		$TREE_OVMF_UPSTREAM master $LOCALREV_OVMF
 	;;
+openstack)
+	repo_tree_rev_fetch_git devstack \
+		$TREE_DEVSTACK master $LOCALREV_DEVSTACK
+	;;
 osstest)
         if [ "x$OSSTEST_USE_HEAD" = "xy" ] ; then
 	    git update-ref -m "Arranging to test HEAD" \
ap-fetch-version-old +5 -0
index 0b4739b..d12c753 100755
@@ -31,6 +31,7 @@ select_xenbranch
 : ${BASE_LOCALREV_RUMPUSERXEN:=daily-cron.$branch.old}
 : ${BASE_LOCALREV_SEABIOS:=daily-cron.$branch.old}
 : ${BASE_LOCALREV_OVMF:=daily-cron.$branch.old}
+: ${BASE_LOCALREV_DEVSTACK:=daily-cron.$branch.old}
 
 : ${BASE_TREE_QEMU_UPSTREAM:=${TREE_QEMU_UPSTREAM/\/staging\//\/}}
 
@@ -97,6 +98,10 @@ ovmf)
 	repo_tree_rev_fetch_git ovmf \
 		$BASE_TREE_OVMF xen-tested-master $BASE_LOCALREV_OVMF
 	;;
+openstack)
+	repo_tree_rev_fetch_git devstack \
+		$TREE_DEVSTACK master $BASE_LOCALREV_DEVSTACK
+	;;
 osstest)
 	if [ "x$OSSTEST_USE_HEAD" != "xy" ] ; then
 	    git fetch -f $HOME/testing.git production:ap-fetch
ap-print-url +3 -0
index 3db2375..72a09c5 100755
@@ -64,6 +64,9 @@ ovmf)
 osstest)
 	echo none:;
 	;;
+openstack)
+	echo $TREE_DEVSTACK
+	;;
 *)
 	echo >&2 "branch $branch ?"
 	exit 1
cri-common +1 -0
index ad44546..3e817b6 100644
@@ -73,6 +73,7 @@ select_xenbranch () {
 	seabios)		tree=seabios;	xenbranch=xen-unstable ;;
 	ovmf)			tree=ovmf;	xenbranch=xen-unstable ;;
 	osstest)		tree=osstest;	xenbranch=xen-unstable ;;
+	openstack)		tree=devstack;	xenbranch=xen-unstable ;;
 	esac
 	if [ "x$tree" = xlinux ]; then
 		linuxbranch=$branch
make-flight +17 -0
index 3b31939..a99dfe5 100755
@@ -97,6 +97,17 @@ job_create_test_filter_callback () {
         *) return 1;;
       esac
       ;;
+    openstack)
+      if [ x$toolstack != xopenstack ] ; then return 1; fi
+      case $xenarch in
+          amd64) ;;
+          *) return 1;;
+      esac
+      case $dom0arch in
+          amd64) ;;
+          *) return 1;;
+      esac
+      ;;
     *)
       case "$job" in
         *-qemuu-*)
@@ -473,6 +484,12 @@ test_matrix_do_one () {
 
   fi
   #do_passthrough_tests
+
+  job_create_test test-$xenarch$kern-$dom0arch-devstack \
+    test-devstack openstack $xenarch $dom0arch \
+    tree_devstack=$TREE_DEVSTACK \
+    revision_devstack=master \
+    all_hostflags=$most_hostflags
 }
 
 test_matrix_iterate
mfi-common +7 -0
index a9e966f..1438b66 100644
@@ -50,6 +50,7 @@ xenbranch_xsm_variants () {
     xen-4.3-testing) echo "false";;
     xen-4.4-testing) echo "false";;
     xen-4.5-testing) echo "false";;
+    openstack)       echo "false";;
     *) echo "false true";
     esac
 }
@@ -84,6 +85,7 @@ create_build_jobs () {
       rumpuserxen) continue;;
       seabios) continue;;
       ovmf) continue;;
+      openstack) continue;;
       esac
       case "$xenbranch" in
       xen-3.*-testing) continue;;
@@ -109,6 +111,9 @@ create_build_jobs () {
       "
       ;;
     esac
+    if [ "$arch" = i386 ] && [ "$branch" = openstack ]; then
+      continue
+    fi
 
     case "$arch" in
     *)     suite=$defsuite;;
@@ -291,6 +296,8 @@ job_create_test () {
     xen-4.1-testing:*) ;;
     *:libvirt) tsbuildjob="libvirtbuildjob=${bfi}build-$dom0arch-libvirt"
             ;;
+    *:openstack) tsbuildjob="libvirtbuildjob=${bfi}build-$dom0arch-libvirt"
+            ;;
     xen-4.2-testing:*) ;;
     xen-4.3-testing:*) ;;
     *:xend) xenbuildjob="$xenbuildjob-xend"
Signature · 1 line
Anthony PERARD
#14 lore raw

Re: [PATCH OSSTEST 4/4] Create a flight to test OpenStack with xen-unstable and libvirt.

Quoted 6 lines · Anthony PERARD
---
 ap-common            |  4 ++++
 ap-fetch-version     |  4 ++++
 ap-fetch-version-old |  5 +++++
 ap-print-url         |  3 +++

This all looks correct, but since you hardcode master in make-flight and haven't patches cr-daily-branch I don't think they are used? They probably should, I suspect this is related to the queries in the cover letter which I left until I'd read the series? Which I should now go digest...

Ian.

#15 lore raw
In reply to Anthony PERARD
Quoted 3 lines · Anthony PERARD

For the last patch, I've tried to have ./standalone make-flight have only the necessary jobs to run test-amd64-amd64-devstack, but there is still build-xsm in the list.

In my Debian distro series there is patch to add "mfi-common: Allow make-*flight to filter the set of build jobs to include" which will be useful for this. Ian wanted it for something too.

Last posting was <[email protected]>

Ian.

#16 lore raw
In reply to Anthony PERARD
Quoted 2 lines · Anthony PERARD

I've introduce an extra Osstest::Toolstack which help to install extra package,

I've commented on this.

Quoted 2 lines

and use ballonning for Dom0, 500MB for Dom0 is definetly not enough.

This is for overriding Dom0MemFixed I think?

I think going to ballooning is a bit too far, I think instead the actual size of dom0 ought to be something which can be overridden via a runvar, so that the openstack tests can ask for a bigger one.

Quoted 5 lines

The ts-devstack script does prepare a bit more the host, clone devstack, then run ./stack.sh, which is a bit like raisin. Once the machine ready, the integration test suite from OpenStack, Tempest, is started. Do you think those two step should be in separate test, one for devstack, and one for Tempest?

I don't really understand the difference between them well enough, but I would say if they are separate things then different steps would be good -- since if nothing else it gives a clearer indication in the test report what had failed.

Quoted 2 lines

I have not done it, but we could have some smoke test before
Tempest where osstest tryied to start a guest.

A test can have a dependency on a build job, but I'm not sure about another test, but that would seem generally useful and would allow your new test to depend on test-ARCH-ARCH-libvirt.

However I think we don't actually want to do that:

For the openstack branch we will be using known good versions of all the other branches, so that test-ARCH-ARCH-libvirt will have happened already (when the libvirt branch got pushed).

For the other branches then we already have loads of tests which might all fail for the same reason which you could serialise to prevent this, but it would make the whole flight take much longer and it isn't really needed.

Quoted 3 lines

Then later, there will be the question of which tree to track, devstack? nova? Or don't track any and just test with the master branch from time to time.

This is a complicated one, especially for things which don't fit into the "one tree one branch" model of things...

In terms of gating (which matters to us for regression tracking even if we don't care about the output of the gate) is it the case that if you clone $rootthing (whatever that is) and select a given revision of that you will always get the same thing?

Or is it like raisin where you clone $rootthing and select a revision of that and it will clone the latest version of everything at that time?

I'm expecting the second one?

I think the important thing is we would want to be testing stuff which has already gone through openstack testing?

Maybe we want to track particular OStack releases?

Ian.

#17 lore raw
Quoted 11 lines · Ian Campbell
Quoted 2 lines · Anthony PERARD

I've introduce an extra Osstest::Toolstack which help to install extra package,

I've commented on this.

Quoted 2 lines

and use ballonning for Dom0, 500MB for Dom0 is definetly not enough.

This is for overriding Dom0MemFixed I think?

Yes.

Quoted 3 lines

I think going to ballooning is a bit too far, I think instead the actual size of dom0 ought to be something which can be overridden via a runvar, so that the openstack tests can ask for a bigger one.

I will look into that.

Quoted 10 lines
Quoted 5 lines

The ts-devstack script does prepare a bit more the host, clone devstack, then run ./stack.sh, which is a bit like raisin. Once the machine ready, the integration test suite from OpenStack, Tempest, is started. Do you think those two step should be in separate test, one for devstack, and one for Tempest?

I don't really understand the difference between them well enough, but I would say if they are separate things then different steps would be good -- since if nothing else it gives a clearer indication in the test report what had failed.

I'll seperated them in different step.

Quoted 6 lines
Quoted 2 lines

I have not done it, but we could have some smoke test before
Tempest where osstest tryied to start a guest.

A test can have a dependency on a build job, but I'm not sure about another test, but that would seem generally useful and would allow your new test to depend on test-ARCH-ARCH-libvirt.

I was thinking of an extra steps within the test which would just start a guest via OpenStack/Nova before running the full test suite from Tempest.

Quoted 23 lines

However I think we don't actually want to do that:

For the openstack branch we will be using known good versions of all the other branches, so that test-ARCH-ARCH-libvirt will have happened already (when the libvirt branch got pushed).

For the other branches then we already have loads of tests which might all fail for the same reason which you could serialise to prevent this, but it would make the whole flight take much longer and it isn't really needed.

Quoted 3 lines

Then later, there will be the question of which tree to track, devstack? nova? Or don't track any and just test with the master branch from time to time.

This is a complicated one, especially for things which don't fit into the "one tree one branch" model of things...

In terms of gating (which matters to us for regression tracking even if we don't care about the output of the gate) is it the case that if you clone $rootthing (whatever that is) and select a given revision of that you will always get the same thing?

Quoted 4 lines

Or is it like raisin where you clone $rootthing and select a revision of that and it will clone the latest version of everything at that time?

I'm expecting the second one?

Yes, I think your description of raisin would match the description of devstack, the $rootthing.
So, devstack will clone master of every other tree by default. But we can select a specific revision for everything that is going to be cloned.

Also, if one clone a stable/* branch of devstack, then we'll get the same stable branch of every other trees.

Quoted 2 lines

I think the important thing is we would want to be testing stuff which has already gone through openstack testing?

Yes. Everything in OpenStack trees have been tested and have gone through the gate anyway.

Quoted 1 line

Maybe we want to track particular OStack releases?

I think tracking master at first would be fine.

Signature · 1 line
Anthony PERARD
#18 lore raw

Anthony PERARD writes ("Re: [PATCH OSSTEST 0/4] Have OpenStack tested on top of xen's master and libvirt's master."):

Quoted 4 lines

Yes, I think your description of raisin would match the description of devstack, the $rootthing.
So, devstack will clone master of every other tree by default. But we can select a specific revision for everything that is going to be cloned.

Are we trying to make a push gate out of this ?

In any case at the very least I think we need to be able to have osstest's runvars control the versions of the subtrees. That way the bisector can work properly.

Ian.

#19 lore raw
In reply to Anthony PERARD
Quoted 9 lines · Anthony PERARD
Quoted 6 lines
Quoted 2 lines

I have not done it, but we could have some smoke test before
Tempest where osstest tryied to start a guest.

A test can have a dependency on a build job, but I'm not sure about another test, but that would seem generally useful and would allow your new test to depend on test-ARCH-ARCH-libvirt.

I was thinking of an extra steps within the test which would just start a guest via OpenStack/Nova before running the full test suite from Tempest.

ISWYM.

That might be nice, if it were very little osstest-development effort to make it happen, but I think it isn't going to be a small effort and running tempest and seeing what happens seems like it would be good enough anyway.

Quoted 17 lines
Quoted 12 lines
Quoted 3 lines

Then later, there will be the question of which tree to track, devstack? nova? Or don't track any and just test with the master branch from time to time.

This is a complicated one, especially for things which don't fit into the "one tree one branch" model of things...

In terms of gating (which matters to us for regression tracking even if we don't care about the output of the gate) is it the case that if you clone $rootthing (whatever that is) and select a given revision of that you will always get the same thing?

Quoted 4 lines

Or is it like raisin where you clone $rootthing and select a revision of that and it will clone the latest version of everything at that time?

I'm expecting the second one?

Quoted 7 lines

Yes, I think your description of raisin would match the description of devstack, the $rootthing.
So, devstack will clone master of every other tree by default. But we can select a specific revision for everything that is going to be cloned.

Also, if one clone a stable/* branch of devstack, then we'll get the same stable branch of every other trees.

But in the presence of stable backports we may not get the exact same set of commits from one day to the next, despite cloning the exact same devstack revision, I think?

Quoted 9 lines
Quoted 2 lines

I think the important thing is we would want to be testing stuff which has already gone through openstack testing?

Yes. Everything in OpenStack trees have been tested and have gone through the gate anyway.

Quoted 1 line

Maybe we want to track particular OStack releases?

I think tracking master at first would be fine.

Right.