Skip to contentSkip to conversation

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

PATCH Superseded Anthony PERARD 2 participants 36 messages Jul 12, 2017 – Jul 20, 2017

v12 of 14 Superseded Latest is v14 →

lore
Share & tools
lore
#0 lore raw

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

Now powered with subunit-to-substep engine.

The Tempest test names reported via subunit are in the form:
tempest.scenario.test_minimum_basic.TestMinimumBasicScenario.test_minimum_basic_scenario[compute,id-bdbb5441-9204-419d-a225-b4fdbfb1a1a8,image,network,volume]

so very long. Sometime, it in the form: "setUpClass ($classname)" for skipped or failed tests preparation.

git tree:
https://xenbits.xen.org/git-http/people/aperard/osstest.git
tag: openstack-v12

(Acked, New):
A ts-openstack-deploy: Deploy OpenStack on a host with devstack
A ts-openstack-tempest: Run Tempest to check OpenStack
A ts-openstack-deploy: Set http proxy
A TestSupport: provide target_https_mitm_proxy_cert_path
A ts-openstack-deploy: set CURL_CA_BUNDLE
A ts-openstack-deploy: Keep CURL_CA_BUNDLE when sudo is called
A ts-openstack-deploy: Try to disable use of SYSTEMD
A ts-kernel-build: Enable network related modules for Neutron
A ts-openstack-deploy: Switch to Neutron for network
ts-openstack-deploy: Increase open fd limit for RabbitMQ
A ts-openstack-deploy: Apply a Tempest patch
A ts-openstack-deploy: Ignore libvirt-python version and use latest A ts-openstack-tempest: Fix tempest invocation
ts-openstack-tempest: Update list of skipped tests
A ts-openstack-deploy: Move logs to /var/log/openstack
A ts-logs-capture: Capture OpenStack logs
A ts-openstack-deploy: Increase devstack timeout
N TestSupport: Implement target_cmd_subunit a subunit stream parser into substeps N ts-openstack-tempest: Use target_cmd_subunit
Create a flight to test OpenStack with xen-unstable and libvirt
A make-flight: Increase dom0_mem for openstack flight

Changes in V12:
- new patches to introduce a subunit stream parser and have subunit tests appears as substeps.
- rework openstack flight generation, get rid of the patch that introduced 'openstack' branch which is not used, have the flight test a stable branch of openstack (release Ocata), branch name: openstack-ocata

Changes in V11:
- plenty of new patches, on top of the original 3 patches that were acked.
- and an attempt at creating a flight for a stable branch of openstack. But there is many git tree to pull the branch from.

Anthony PERARD (18):
ts-openstack-deploy: Deploy OpenStack on a host with devstack
ts-openstack-tempest: Run Tempest to check OpenStack
ts-openstack-deploy: Keep CURL_CA_BUNDLE when sudo is called
ts-openstack-deploy: Try to disable use of SYSTEMD
ts-kernel-build: Enable network related modules for Neutron
ts-openstack-deploy: Switch to Neutron for network
ts-openstack-deploy: Increase open fd limit for RabbitMQ
ts-openstack-deploy: Apply a Tempest patch
ts-openstack-deploy: Ignore libvirt-python version and use latest
ts-openstack-tempest: Fix tempest invocation
ts-openstack-tempest: Update list of skipped tests
ts-openstack-deploy: Move logs to /var/log/openstack
ts-logs-capture: Capture OpenStack logs
ts-openstack-deploy: Increase devstack timeout
TestSupport: Implement target_cmd_subunit a subunit stream parser into
substeps
ts-openstack-tempest: Use target_cmd_subunit
Create a flight to test OpenStack with xen-unstable and libvirt
make-flight: Increase dom0_mem for openstack flight

Ian Jackson (3):
ts-openstack-deploy: Set http proxy
TestSupport: provide target_https_mitm_proxy_cert_path
ts-openstack-deploy: set CURL_CA_BUNDLE

 Osstest/TestSupport.pm |  50 ++++++++++++++
 ap-common              |  19 ++++++
 ap-fetch-version       |   6 ++
 ap-fetch-version-old   |   7 ++
 ap-print-url           |   3 +
 ap-push                |   7 ++
 cr-daily-branch        |  31 +++++++++
 cr-for-branches        |   2 +-
 cri-common             |   1 +
 make-flight            |  46 ++++++++++++-
 sg-run-job             |   6 ++
 ts-kernel-build        |  17 ++++-
 ts-logs-capture        |   6 ++
 ts-openstack-deploy    | 182 +++++++++++++++++++++++++++++++++++++++++++++++++
 ts-openstack-tempest   |  63 +++++++++++++++++
 15 files changed, 442 insertions(+), 4 deletions(-)
 create mode 100755 ts-openstack-deploy
 create mode 100755 ts-openstack-tempest
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#1 lore raw

PATCH v12 1/21 ts-openstack-deploy: Deploy OpenStack on a host with devstack

This script installs any necessary packages and clones all of the OpenStack trees which are used by devstack to deploy OpenStack.

---
 sg-run-job          |   5 ++
 ts-openstack-deploy | 148 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 153 insertions(+)
 create mode 100755 ts-openstack-deploy
sg-run-job +5 -0
index b1f94f4..6092384 100755
@@ -629,6 +629,11 @@ proc run-job/test-rumprun {} {
                  ts-guest-destroy-hard        host   $g   +
 }
 
+proc need-hosts/test-devstack {} { return host }
+proc run-job/test-devstack {} {
+    run-ts . = ts-openstack-deploy + host
+}
+
 if {[file exists sg-run-job-adhoc]} {
     source sg-run-job-adhoc
 }
ts-openstack-deploy new file +148 -0

148 lines not on this page · raw message

Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#2 lore raw

PATCH v12 2/21 ts-openstack-tempest: Run Tempest to check OpenStack

In reply to Anthony PERARD

This script runs the OpenStack integration test suite, Tempest.

---
 sg-run-job           |  1 +
 ts-openstack-tempest | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+)
 create mode 100755 ts-openstack-tempest
sg-run-job +1 -0
index 6092384..5f15821 100755
@@ -632,6 +632,7 @@ proc run-job/test-rumprun {} {
 proc need-hosts/test-devstack {} { return host }
 proc run-job/test-devstack {} {
     run-ts . = ts-openstack-deploy + host
+    run-ts . = ts-openstack-tempest + host
 }
 
 if {[file exists sg-run-job-adhoc]} {
ts-openstack-tempest new file +65 -0

65 lines not on this page · raw message

Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#3 lore raw

PATCH v12 3/21 ts-openstack-deploy: Set http proxy

In reply to Anthony PERARD

From: Ian Jackson <[email protected]>

This allows ./stack.sh to access the global internet.

CC Anthony PERARD <[email protected]>
---
 ts-openstack-deploy | 3 +++
 1 file changed, 3 insertions(+)
ts-openstack-deploy +3 -0
index 6f061eb..d2971f5 100755
@@ -136,8 +136,11 @@ END
 }
 
 sub deploy() {
+    my $httpproxy = http_proxy_envsettings($ho);
+
     target_cmd($ho, <<END, 1800);
         set -e
+        $httpproxy
         cd $builddir/devstack
         ./stack.sh
 END
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#4 lore raw

PATCH v12 4/21 TestSupport: provide target_https_mitm_proxy_cert_path

In reply to Anthony PERARD

From: Ian Jackson <[email protected]>

---
 Osstest/TestSupport.pm | 7 +++++++
 1 file changed, 7 insertions(+)
Osstest/TestSupport.pm +7 -0
index 6e19b28..7215156 100644
@@ -64,6 +64,7 @@ BEGIN {
                       target_put_guest_image target_editfile
                       target_editfile_cancel target_fetchurl
                       http_proxy_envsettings
+                      target_https_mitm_proxy_cert_path
                       target_editfile_root target_file_exists
                       target_editfile_kvp_replace
                       target_run_apt
@@ -2714,4 +2715,10 @@ sub target_https_mitm_proxy_setup ($) {
     target_cmd_root($ho, 'update-ca-certificates', 300);
 }
 
+sub target_https_mitm_proxy_cert_path ($) {
+    my ($ho) = @_;
+    return undef unless length $c{HttpsProxyMITMCert};
+    return '/etc/ssl/certs/osstest.pem';
+}
+
 1;
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#5 lore raw

PATCH v12 5/21 ts-openstack-deploy: set CURL_CA_BUNDLE

In reply to Anthony PERARD

From: Ian Jackson <[email protected]>

This overrides pip's attempt to specify a specific certificate bundle, and is necessary if we have a MITM SSL proxy.

The security implications are not ideal, because the MITM proxy will allow any X.509 cert from any CA, whereas pip would only allow an expected cert. But we got pip via plain https to start with...

CC Anthony PERARD <[email protected]>
---
 ts-openstack-deploy | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
ts-openstack-deploy +4 -1
index d2971f5..6d7de1c 100755
@@ -137,7 +137,10 @@ END
 
 sub deploy() {
     my $httpproxy = http_proxy_envsettings($ho);
-
+    my $mitmcert = target_https_mitm_proxy_cert_path($ho);
+    $httpproxy .=
+        "\n        CURL_CA_BUNDLE=$mitmcert; export CURL_CA_BUNDLE"
+        if $mitmcert;
     target_cmd($ho, <<END, 1800);
         set -e
         $httpproxy
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#6 lore raw

PATCH v12 6/21 ts-openstack-deploy: Keep CURL_CA_BUNDLE when sudo is called

In reply to Anthony PERARD

This is part of commit "ts-openstack-deploy: set CURL_CA_BUNDLE" but also allow pip to work when it is called via sudo without preserving the existing environment variables.

---
 ts-openstack-deploy | 1 +
 1 file changed, 1 insertion(+)
ts-openstack-deploy +1 -0
index 6d7de1c..147071f 100755
@@ -132,6 +132,7 @@ END
     target_putfilecontents_root_stash($ho, 100,
         <<END, "/etc/sudoers.d/devstack");
 osstest ALL=(ALL) NOPASSWD:ALL
+Defaults:osstest env_keep += "CURL_CA_BUNDLE"
 END
 }
 
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#7 lore raw

PATCH v12 7/21 ts-openstack-deploy: Try to disable use of SYSTEMD

In reply to Anthony PERARD

There is USE_SYSTEMD off by default, but it is now turned on if USE_SCREEN if off. Try to keep use of systemd disabled.

---
 ts-openstack-deploy | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
ts-openstack-deploy +3 -1
index 147071f..1349009 100755
@@ -45,7 +45,6 @@ sub checkout () {
 [[local|localrc]]
 # Everything should be cloned by osstest, so devstack don't have to do it
 ERROR_ON_CLONE=True
-USE_SCREEN=False
 ADMIN_PASSWORD=secretadmin
 DATABASE_PASSWORD=secretdatabase
 RABBIT_PASSWORD=secretrabbit
@@ -71,6 +70,9 @@ disable_service q-meta
 disable_service q-agt
 disable_service q-l3
 enable_service n-net
+USE_SYSTEMD=False
+# To keep systemd off, we need to enable use of screen
+USE_SCREEN=True
 [[post-config|\$CINDER_CONF]]
 [lvmdriver-1]
 volume_group = $vg
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#8 lore raw

PATCH v12 8/21 ts-kernel-build: Enable network related modules for Neutron

In reply to Anthony PERARD

Those options/modules are needed to run OpenStack Neutron with Open vSwitch.

---
 ts-kernel-build | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
ts-kernel-build +15 -2
index 94e67a4..0bcd340 100755
@@ -252,10 +252,23 @@ setopt CONFIG_BLK_DEV_LOOP y
 
 setopt CONFIG_PACKET y
 
-# needed for OpenStack
-# because: https://bugzilla.redhat.com/show_bug.cgi?id=910619#c6
+# Used by OpenStack Neutron with Open vSwitch
+setopt CONFIG_OPENVSWITCH m
+setopt CONFIG_IP6_NF_RAW m
+setopt CONFIG_IP_NF_RAW m
+setopt CONFIG_IP_SET m
+setopt CONFIG_IP_SET_HASH_NET m
 setopt CONFIG_NETFILTER_ADVANCED y
+setopt CONFIG_NETFILTER_XT_CONNMARK m
+setopt CONFIG_NETFILTER_XT_MATCH_COMMENT m
+setopt CONFIG_NETFILTER_XT_MATCH_MAC m
+setopt CONFIG_NETFILTER_XT_MATCH_PHYSDEV m
+setopt CONFIG_NETFILTER_XT_SET m
 setopt CONFIG_NETFILTER_XT_TARGET_CHECKSUM m
+setopt CONFIG_NETFILTER_XT_TARGET_CT m
+setopt CONFIG_NETFILTER_XT_TARGET_REDIRECT m
+setopt CONFIG_NF_CONNTRACK_ZONES y
+setopt CONFIG_VETH m
 
 # Used by OpenStack Tempest to test encrypted volume
 setopt CONFIG_CRYPTO_XTS m
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#9 lore raw

PATCH v12 9/21 ts-openstack-deploy: Switch to Neutron for network

In reply to Anthony PERARD

nova-network is not supported anymore and Neutron is the default.

---
 ts-openstack-deploy | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
ts-openstack-deploy +1 -7
index 1349009..2107760 100755
@@ -35,6 +35,7 @@ sub checkout () {
     build_clone($ho, 'openstack_devstack',     $builddir, 'devstack');
     build_clone($ho, 'openstack_glance',       $builddir, 'glance');
     build_clone($ho, 'openstack_keystone',     $builddir, 'keystone');
+    build_clone($ho, 'openstack_neutron',      $builddir, 'neutron');
     build_clone($ho, 'openstack_nova',         $builddir, 'nova');
     build_clone($ho, 'openstack_requirements', $builddir, 'requirements');
     build_clone($ho, 'openstack_tempest',      $builddir, 'tempest');
@@ -63,13 +64,6 @@ LIBVIRT_TYPE=xen
 disable_service horizon
 disable_service n-novnc
 disable_service dstat
-# Disable neutron and switch back to nova-network
-disable_service q-svc
-disable_service q-dhcp
-disable_service q-meta
-disable_service q-agt
-disable_service q-l3
-enable_service n-net
 USE_SYSTEMD=False
 # To keep systemd off, we need to enable use of screen
 USE_SCREEN=True
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#10 lore raw

PATCH v12 10/21 ts-openstack-deploy: Increase open fd limit for RabbitMQ

In reply to Anthony PERARD
---
 ts-openstack-deploy | 7 +++++++
 1 file changed, 7 insertions(+)
ts-openstack-deploy +7 -0
index 2107760..f677513 100755
@@ -130,6 +130,13 @@ END
 osstest ALL=(ALL) NOPASSWD:ALL
 Defaults:osstest env_keep += "CURL_CA_BUNDLE"
 END
+
+    # Increase open fd limit of RabbitMQ server (message broker)
+    # https://bugs.launchpad.net/devstack/+bug/1703651
+    target_putfilecontents_root_stash($ho, 100,
+        <<END, "/etc/default/rabbitmq-server");
+ulimit -n 65536
+END
 }
 
 sub deploy() {
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#11 lore raw

Re: [OSSTEST PATCH v12 10/21] ts-openstack-deploy: Increase open fd limit for RabbitMQ

Anthony PERARD writes ("[OSSTEST PATCH v12 10/21] ts-openstack-deploy: Increase open fd limit for RabbitMQ"):

ts-openstack-deploy END · line 138

Quoted 3 lines
ts-openstack-deploy +3 -0
+    target_putfilecontents_root_stash($ho, 100,
+        <<END, "/etc/default/rabbitmq-server");
+ulimit -n 65536

Is the lack of this not an upstream bug of some kind ?

And, for osstest, why 65536 and not, say, "unlimited" ?

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#12 lore raw

Re: [OSSTEST PATCH v12 10/21] ts-openstack-deploy: Increase open fd limit for RabbitMQ

Quoted 6 lines · Ian Jackson

Anthony PERARD writes ("[OSSTEST PATCH v12 10/21] ts-openstack-deploy: Increase open fd limit for RabbitMQ"):

ts-openstack-deploy END · line 138

Quoted 3 lines
ts-openstack-deploy +3 -0
+    target_putfilecontents_root_stash($ho, 100,
+        <<END, "/etc/default/rabbitmq-server");
+ulimit -n 65536

Is the lack of this not an upstream bug of some kind ?

I don't know.

FIY, when rabbitmq is install on debian, we have:
cat /etc/default/rabbitmq-server
# This file is sourced by /etc/init.d/rabbitmq-server. Its primary

# reason for existing is to allow adjustment of system limits for the
# rabbitmq-server process.
#
# Maximum number of open file handles. This will need to be increased
# to handle many simultaneous connections. Refer to the system
# documentation for ulimit (in man bash) for more information.
#
#ulimit -n 1024
Quoted 1 line

And, for osstest, why 65536 and not, say, "unlimited" ?

I've just reproduce the number from the openstack ci loop. Which is the found in rabbitmq-server.service, which I think is found in ubuntu package of rabbitmq.

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#13 lore raw

Re: [OSSTEST PATCH v12 10/21] ts-openstack-deploy: Increase open fd limit for RabbitMQ

Anthony PERARD writes ("Re: [OSSTEST PATCH v12 10/21] ts-openstack-deploy: Increase open fd limit for RabbitMQ"):

Quoted 9 lines · Ian Jackson
Quoted 6 lines

Anthony PERARD writes ("[OSSTEST PATCH v12 10/21] ts-openstack-deploy: Increase open fd limit for RabbitMQ"):

ts-openstack-deploy END · line 138

Quoted 3 lines
ts-openstack-deploy +3 -0
+    target_putfilecontents_root_stash($ho, 100,
+        <<END, "/etc/default/rabbitmq-server");
+ulimit -n 65536

Is the lack of this not an upstream bug of some kind ?

I don't know.

OK, then. I think it probably is. Feel free to try to convince me otherwise...

Quoted 4 lines

FIY, when rabbitmq is install on debian, we have:
cat /etc/default/rabbitmq-server

# This file is sourced by /etc/init.d/rabbitmq-server. Its primary

Quoted 8 lines
# reason for existing is to allow adjustment of system limits for the
# rabbitmq-server process.
#
# Maximum number of open file handles. This will need to be increased
# to handle many simultaneous connections. Refer to the system
# documentation for ulimit (in man bash) for more information.
#
#ulimit -n 1024

That's rather mysterious.

Quoted 5 lines
Quoted 1 line

And, for osstest, why 65536 and not, say, "unlimited" ?

I've just reproduce the number from the openstack ci loop. Which is the found in rabbitmq-server.service, which I think is found in ubuntu package of rabbitmq.

None of this seems to explain why this isn't a configuration which should be supplied or arranged by upstream.

(I noticed when looking at my previous reviews that I made a similar point last time I saw this hunk...)

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#14 lore raw

Re: [OSSTEST PATCH v12 10/21] ts-openstack-deploy: Increase open fd limit for RabbitMQ

Quoted 35 lines · Ian Jackson

Anthony PERARD writes ("Re: [OSSTEST PATCH v12 10/21] ts-openstack-deploy: Increase open fd limit for RabbitMQ"):

Quoted 9 lines · Ian Jackson
Quoted 6 lines

Anthony PERARD writes ("[OSSTEST PATCH v12 10/21] ts-openstack-deploy: Increase open fd limit for RabbitMQ"):

ts-openstack-deploy END · line 138

Quoted 3 lines
ts-openstack-deploy +3 -0
+    target_putfilecontents_root_stash($ho, 100,
+        <<END, "/etc/default/rabbitmq-server");
+ulimit -n 65536

Is the lack of this not an upstream bug of some kind ?

I don't know.

OK, then. I think it probably is. Feel free to try to convince me otherwise...

Quoted 4 lines

FIY, when rabbitmq is install on debian, we have:
cat /etc/default/rabbitmq-server

# This file is sourced by /etc/init.d/rabbitmq-server. Its primary

Quoted 8 lines
# reason for existing is to allow adjustment of system limits for the
# rabbitmq-server process.
#
# Maximum number of open file handles. This will need to be increased
# to handle many simultaneous connections. Refer to the system
# documentation for ulimit (in man bash) for more information.
#
#ulimit -n 1024

That's rather mysterious.

Quoted 5 lines
Quoted 1 line

And, for osstest, why 65536 and not, say, "unlimited" ?

I've just reproduce the number from the openstack ci loop. Which is the found in rabbitmq-server.service, which I think is found in ubuntu package of rabbitmq.

Quoted 5 lines

None of this seems to explain why this isn't a configuration which should be supplied or arranged by upstream.

(I noticed when looking at my previous reviews that I made a similar point last time I saw this hunk...)

But the hunk is different, I've created a bug report for openstack.
https://bugs.launchpad.net/devstack/+bug/1703651

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#16 lore raw

PATCH v12 11/21 ts-openstack-deploy: Apply a Tempest patch

In reply to Anthony PERARD
---
 ts-openstack-deploy | 9 +++++++++
 1 file changed, 9 insertions(+)
ts-openstack-deploy +9 -0
index f677513..befe3d3 100755
@@ -137,6 +137,15 @@ END
         <<END, "/etc/default/rabbitmq-server");
 ulimit -n 65536
 END
+
+    # Apply https://review.openstack.org/449695/ to tempest to workaround an
+    # issue. Check comments for more information
+    target_cmd($ho, <<END, 120);
+set -e
+cd $builddir/tempest
+git fetch origin refs/changes/95/449695/1
+git cherry-pick FETCH_HEAD
+END
 }
 
 sub deploy() {
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#17 lore raw

PATCH v12 12/21 ts-openstack-deploy: Ignore libvirt-python version and use latest

In reply to Anthony PERARD

Devstack is going to try to install a specific version of libvirt-python (currently 2.5.0) but this fail with libvirt installed by osstest. Remove the requirement and use the latest available instead.

---
 ts-openstack-deploy | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
ts-openstack-deploy +15 -0
index befe3d3..00f262f 100755
@@ -93,6 +93,21 @@ END
         }
     );
 
+    target_editfile($ho,
+        "$builddir/requirements/upper-constraints.txt",
+        sub {
+            while (<EI>) {
+                # Ignore libvirt-python requirement and install latest,
+                # otherwise it's not going to work with latest libvirt
+                # installed by osstest.
+                if (m/^libvirt-python===.*$/) {
+                    next;
+                }
+                print EO or die $!;
+            }
+        }
+    );
+
     # Package python-systemd does not exist in Debian installed by osstest
     target_editfile($ho, "$builddir/devstack/files/debs/general", sub {
         while (<EI>) {
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#18 lore raw

PATCH v12 13/21 ts-openstack-tempest: Fix tempest invocation

In reply to Anthony PERARD

./run_tempest.sh is deprecated.

---
 ts-openstack-tempest | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
ts-openstack-tempest +2 -1
index 82e9a71..b95043a 100755
@@ -58,7 +58,8 @@ sub tempest() {
 
     target_cmd($ho, <<END, 7200);
 set -e
-$builddir/tempest/run_tempest.sh --virtual-env -- --concurrency=2 '$regex'
+cd $builddir/tempest
+tempest run --concurrency=2 --regex '$regex'
 END
 }
 
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#19 lore raw

PATCH v12 14/21 ts-openstack-tempest: Update list of skipped tests

In reply to Anthony PERARD
---
 ts-openstack-tempest | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)
ts-openstack-tempest +8 -11
index b95043a..ae3662f 100755
@@ -31,23 +31,20 @@ sub tempest() {
     my $scenario = 'tempest.scenario';
     my $volume_boot_pattern =
         "$scenario.test_volume_boot_pattern.TestVolumeBootPattern";
-    my $shelve_instance = "$scenario.test_shelve_instance.TestShelveInstance";
-
-    # Ignore tests which try to boot a guest with /dev/vda as boot device name.
-    push @ignored_tests,
-        "^\Q$volume_boot_pattern.test_volume_boot_pattern\E";
-    push @ignored_tests,
-        "^\Q$volume_boot_pattern.test_create_ebs_image_and_check_boot\E";
-    push @ignored_tests,
-        "^\Q$shelve_instance.test_shelve_volume_backed_instance\E";
 
     # Those tests access a volume through iSCSI. This does not work when both
     # the server and client of iSCSI are on the same Xen host (both in dom0),
     # Linux 4.0 is the first Linux to have a fix.
     push @ignored_tests,
-        "^\Q${volume_boot_pattern}V2.test_volume_boot_pattern\E";
+        "^\Q${volume_boot_pattern}.test_volume_boot_pattern\E";
+    push @ignored_tests,
+        "^\Q${volume_boot_pattern}.test_create_ebs_image_and_check_boot\E";
+
+    # See nova.git:devstack/tempest-dsvm-tempest-xen-rc
+    push @ignored_tests,
+        "^\Qtempest.api.compute.admin.test_volume_swap.TestVolumeSwap.test_volume_swap\E";
     push @ignored_tests,
-        "^\Q${volume_boot_pattern}V2.test_create_ebs_image_and_check_boot\E";
+        "^\Qtempest.api.compute.images.test_images.ImagesTestJSON.test_create_image_from_paused_server\E";
 
     # This regex below select the tests to run and exclude the ones marked as
     # slow as well as the explicit tests listed above.  It is based on the one
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#21 lore raw

PATCH v12 15/21 ts-openstack-deploy: Move logs to /var/log/openstack

In reply to Anthony PERARD
---
 ts-openstack-deploy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ts-openstack-deploy +1 -1
index 00f262f..e7c94a5 100755
@@ -58,7 +58,7 @@ DEST=$builddir
 DATA_DIR=\$DEST/data
 SERVICE_DIR=\$DEST/status
 SUBUNIT_OUTPUT=\$DEST/devstack.subunit
-LOGFILE=\$DEST/logs/stack.sh.log
+LOGDIR=/var/log/openstack
 LOG_COLOR=False
 LIBVIRT_TYPE=xen
 disable_service horizon
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#22 lore raw

PATCH v12 16/21 ts-logs-capture: Capture OpenStack logs

In reply to Anthony PERARD
---
 ts-logs-capture | 6 ++++++
 1 file changed, 6 insertions(+)
ts-logs-capture +6 -0
index 061a118..0e3d267 100755
@@ -171,6 +171,12 @@ sub fetch_logs_host () {
 
                   /var/core/*.core
 
+                  /var/log/openstack/*.log
+                  /etc/nova/*
+                  /etc/neutron/*
+                  /etc/cinder/*
+                  /home/osstest/build.*.test-*-devstack/tempest/etc/tempest.conf
+
                   )];
     if (!try_fetch_logs($ho, $logs)) {
         logm("log fetching failed, trying hard host reboot...");
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#23 lore raw

PATCH v12 17/21 ts-openstack-deploy: Increase devstack timeout

In reply to Anthony PERARD
---
 ts-openstack-deploy | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ts-openstack-deploy +1 -1
index e7c94a5..875c4a7 100755
@@ -169,7 +169,7 @@ sub deploy() {
     $httpproxy .=
         "\n        CURL_CA_BUNDLE=$mitmcert; export CURL_CA_BUNDLE"
         if $mitmcert;
-    target_cmd($ho, <<END, 1800);
+    target_cmd($ho, <<END, 3600);
         set -e
         $httpproxy
         cd $builddir/devstack
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#24 lore raw

PATCH v12 18/21 TestSupport: Implement target_cmd_subunit a subunit stream parser into substeps

In reply to Anthony PERARD

target_cmd_subunit can be used like target_cmd, but the command would needs to output a subunit v1 stream, which will be parsed and turned into osstest substeps. The command can be | subunit-2to1 in order to turn a subunit v2 stream into v1.

Currently, time is not taken into account, and all substeps will have bogus timestamp as the output of the command is parsed after it has runned.

---
 Osstest/TestSupport.pm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
Osstest/TestSupport.pm +43 -0
index 7215156..f3174d2 100644
@@ -55,6 +55,7 @@ BEGIN {
 
                       target_cmd_root_status target_cmd_output_root_status
                       target_cmd_root target_cmd target_cmd_build
+                      target_cmd_subunit
                       target_cmd_output_root target_cmd_output
                       target_cmd_inputfh_root sshuho
                       target_getfile target_getfile_root
@@ -737,6 +738,48 @@ sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); }
 # Instead, returns the wait status (ie, what came in $?)
 sub target_cmd_root_status ($$;$$) { tcmd(undef,undef,1, 'root',@_); }
 
+sub subunit_result_to_osstest_result ($) {
+    my ($ret) = @_;
+    return "pass" if $ret eq "success" or $ret eq "successful";
+    return "fail" if $ret eq "failure";
+    return "skip" if $ret eq "skip";
+    return "fail" if $ret eq "error";
+}
+sub subunit_sanitize ($) {
+    my ($testname) = @_;
+    $testname =~ s/ /_/g;
+    return $testname;
+}
+
+sub target_cmd_subunit ($$;$$) {
+    my $stdout = IO::File::new_tmpfile();
+    my $rc = tcmd(undef,$stdout,0, 'osstest', @_);
+    $stdout->seek(0,0) or die "$stdout $!";
+    my $logfilename = undef;
+    my $fh = undef;
+
+    while (<$stdout>) {
+        if (/^time: (\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)(\.\d+)?Z$/) {
+            # This is the timestamp for the next events
+        } elsif (/^test: (.+)\n/) {
+            $logfilename = subunit_sanitize($1) . '.log';
+            $fh = open_unique_stashfile(\$logfilename);
+            substep_start(subunit_sanitize($1), $logfilename);
+        } elsif (/^(success(ful)?|failure|skip|error): (.+?)( \[( multipart)?)?$/) {
+            if ($4) {
+                my $test_output = "";
+                while (<$stdout>) {
+                    last if (/^\]$/);
+                    $test_output .= $_;
+                }
+                print $fh $test_output or die $!;
+            }
+            close $fh or die $!;
+            substep_finish(subunit_sanitize($3), subunit_result_to_osstest_result($1));
+        }
+    }
+}
+
 sub tcmdout {
     my $stdout= IO::File::new_tmpfile();
     my $badstatusok = $_[1];
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#25 lore raw

Re: [OSSTEST PATCH v12 18/21] TestSupport: Implement target_cmd_subunit a subunit stream parser into substeps

Anthony PERARD writes ("[OSSTEST PATCH v12 18/21] TestSupport: Implement target_cmd_subunit a subunit stream parser into substeps"):

Quoted 4 lines

target_cmd_subunit can be used like target_cmd, but the command would needs to output a subunit v1 stream, which will be parsed and turned into osstest substeps. The command can be | subunit-2to1 in order to turn a subunit v2 stream into v1.

Thanks.

Quoted 3 lines

Currently, time is not taken into account, and all substeps will have bogus timestamp as the output of the command is parsed after it has runned.

I think this is not a critical problem, but fixing it would be nice at some point.

Osstest/TestSupport.pm sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); } · line 747

Quoted 7 lines
Osstest/TestSupport.pm +7 -0
+sub subunit_result_to_osstest_result ($) {
+    my ($ret) = @_;
+    return "pass" if $ret eq "success" or $ret eq "successful";
+    return "fail" if $ret eq "failure";
+    return "skip" if $ret eq "skip";
+    return "fail" if $ret eq "error";
+}

I think this needs to die at the end, if the input is not recognised.

Osstest/TestSupport.pm sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); } · line 752

Quoted 5 lines
Osstest/TestSupport.pm +5 -0
+sub subunit_sanitize ($) {
+    my ($testname) = @_;
+    $testname =~ s/ /_/g;
+    return $testname;
+}

This function should have a more specific name. Also it needs to be a whitelist.

Osstest/TestSupport.pm sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); } · line 756

Quoted 3 lines
Osstest/TestSupport.pm +3 -0
+sub target_cmd_subunit ($$;$$) {
+    my $stdout = IO::File::new_tmpfile();
+    my $rc = tcmd(undef,$stdout,0, 'osstest', @_);

It would be better to staxh the original subunit output. And I would prefer to avoid direct use of tcmd here. So can you introduce
target_cmd_stashed
which calls open_unique_stashfile and tcmd, and then use that in your subunit subroutine? (And yes this might duplicte output I think.)

I'm not sure target_cmd_subunit is quite the right name. Maybe target_subunit_cmd ?

Osstest/TestSupport.pm sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); } · line 768

Quoted 8 lines
Osstest/TestSupport.pm +8 -0
+    while (<$stdout>) {
+        if (/^time: (\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)(\.\d+)?Z$/) {
+            # This is the timestamp for the next events
+        } elsif (/^test: (.+)\n/) {
+            $logfilename = subunit_sanitize($1) . '.log';
+            $fh = open_unique_stashfile(\$logfilename);
+            substep_start(subunit_sanitize($1), $logfilename);
+        } elsif (/^(success(ful)?|failure|skip|error): (.+?)( \[( multipart)?)?$/) {

Please assign your $n to local variables, rather than leaving them in $3 etc. to be used much later. (And don't capture things if you don't intend to, so in that case use ?:). What does the multpart mean ? Does this code need to care ? Does the subunit protocol insist that the spaces are single spaces ? If not you need to use \s+. You may want to use the extended regexp syntax.

Osstest/TestSupport.pm sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); } · line 775

Quoted 7 lines
Osstest/TestSupport.pm +7 -0
+            if ($4) {
+                my $test_output = "";
+                while (<$stdout>) {
+                    last if (/^\]$/);
+                    $test_output .= $_;
+                }
+                print $fh $test_output or die $!;

Why do you bother accumulating this in $test_output rather than just printing it ?

Does the subunit protocol not have any escaping ? (Ie, what happens if a thing run as part of a subunit test actually generates a line of log output "]" ?) If it does havve some escaping you need to de-escape it.

Osstest/TestSupport.pm sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); } · line 779

Quoted 4 lines
Osstest/TestSupport.pm +4 -0
+            }
+            close $fh or die $!;
+            substep_finish(subunit_sanitize($3), subunit_result_to_osstest_result($1));
+        }

What are subunit v1 consumers supposed to do with 1. unknown keywords
2. syntax errors ?

I doubt that the answer to (2) is to ignore them as you do here...

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#26 lore raw

Re: [OSSTEST PATCH v12 18/21] TestSupport: Implement target_cmd_subunit a subunit stream parser into substeps

Quoted 7 lines · Ian Jackson

Anthony PERARD writes ("[OSSTEST PATCH v12 18/21] TestSupport: Implement target_cmd_subunit a subunit stream parser into substeps"):

Quoted 3 lines

Currently, time is not taken into account, and all substeps will have bogus timestamp as the output of the command is parsed after it has runned.

I think this is not a critical problem, but fixing it would be nice at some point.

The subunit stream contains the timestamps, so it just a matter of having substep_* taking it as an argument.

Quoted 9 lines

Osstest/TestSupport.pm sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); } · line 747

Quoted 7 lines
Osstest/TestSupport.pm +7 -0
+sub subunit_result_to_osstest_result ($) {
+    my ($ret) = @_;
+    return "pass" if $ret eq "success" or $ret eq "successful";
+    return "fail" if $ret eq "failure";
+    return "skip" if $ret eq "skip";
+    return "fail" if $ret eq "error";
+}

I think this needs to die at the end, if the input is not recognised.

Will do.

Quoted 8 lines

Osstest/TestSupport.pm sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); } · line 752

Quoted 5 lines
Osstest/TestSupport.pm +5 -0
+sub subunit_sanitize ($) {
+    my ($testname) = @_;
+    $testname =~ s/ /_/g;
+    return $testname;
+}

This function should have a more specific name. Also it needs to be a whitelist.

What about subunit_sanitize_testname?

What kind of whitelist? What should it includes?

Quoted 9 lines

Osstest/TestSupport.pm sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); } · line 756

Quoted 3 lines
Osstest/TestSupport.pm +3 -0
+sub target_cmd_subunit ($$;$$) {
+    my $stdout = IO::File::new_tmpfile();
+    my $rc = tcmd(undef,$stdout,0, 'osstest', @_);

It would be better to staxh the original subunit output. And I would prefer to avoid direct use of tcmd here. So can you introduce
target_cmd_stashed
which calls open_unique_stashfile and tcmd, and then use that in your subunit subroutine? (And yes this might duplicte output I think.)

Will do. And yes, this will duplicate most of the output. But it can help debug osstest, for everything that the parser ignore.

Quoted 3 lines

I'm not sure target_cmd_subunit is quite the right name. Maybe target_subunit_cmd ?

OK.

Quoted 9 lines

Osstest/TestSupport.pm sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); } · line 768

Quoted 8 lines
Osstest/TestSupport.pm +8 -0
+    while (<$stdout>) {
+        if (/^time: (\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)(\.\d+)?Z$/) {
+            # This is the timestamp for the next events
+        } elsif (/^test: (.+)\n/) {
+            $logfilename = subunit_sanitize($1) . '.log';
+            $fh = open_unique_stashfile(\$logfilename);
+            substep_start(subunit_sanitize($1), $logfilename);
+        } elsif (/^(success(ful)?|failure|skip|error): (.+?)( \[( multipart)?)?$/) {
Quoted 4 lines

Please assign your $n to local variables, rather than leaving them in $3 etc. to be used much later. (And don't capture things if you don't intend to, so in that case use ?:). What does the multpart mean ? Does this code need to care ?

multipart just describes how the following lines are formated, it would have the 'content-type:' and the size of the output. non-multipart is just followed by text, and ends with '\n]\n' (both format do).

I don't think the code needs to care about it, just that it may or may not be there.

Quoted 3 lines

Does the subunit protocol insist that
the spaces are single spaces ? If not you need to use \s+. You may want to use the extended regexp syntax.

Looking at a description of the protocol and at the subunit code, does are single spaces.

What do you mean by "extended" ? Maybe operator like /.+?/, or maybe /(?<NAME>pattern)/ ?

Quoted 10 lines

Osstest/TestSupport.pm sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); } · line 775

Quoted 7 lines
Osstest/TestSupport.pm +7 -0
+            if ($4) {
+                my $test_output = "";
+                while (<$stdout>) {
+                    last if (/^\]$/);
+                    $test_output .= $_;
+                }
+                print $fh $test_output or die $!;

Why do you bother accumulating this in $test_output rather than just printing it ?

No reason, I'll print.

Quoted 4 lines

Does the subunit protocol not have any escaping ? (Ie, what happens if a thing run as part of a subunit test actually generates a line of log output "]" ?) If it does havve some escaping you need to de-escape it.

Without "multipart", there does not seems to be any escaping. With multipart, the size of the output is in the protocol, I could extend the parser take it into account. It's just more work.

FYI, part of the protocol about the output (with the beginning of DETAILS been "\[( multipart)?" in the regex):

DETAILS ::= BRACKETED | MULTIPART
BRACKETED ::= '[' CR UTF8-lines ']' CR
MULTIPART ::= '[ multipart' CR PART* ']' CR
PART ::= PART_TYPE CR NAME CR PART_BYTES CR
PART_TYPE ::= Content-Type: type/sub-type(;parameter=value,parameter=value) PART_BYTES ::= (DIGITS CR LF BYTE{DIGITS})* '0' CR LF

Quoted 8 lines

Osstest/TestSupport.pm sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); } · line 779

Quoted 4 lines
Osstest/TestSupport.pm +4 -0
+            }
+            close $fh or die $!;
+            substep_finish(subunit_sanitize($3), subunit_result_to_osstest_result($1));
+        }

What are subunit v1 consumers supposed to do with 1. unknown keywords
2. syntax errors ?
I doubt that the answer to (2) is to ignore them as you do here...

"unexpected lines [...] should be forwarded unaltered". That's is in the readme of python-subunit project.

As for keywords that can exist, there is "tags:", but in the case of tempest, it describe which worker did a test, when there is several concurrent worker. There is also "progress:" which is not very usefull for osstest. There is maybe more keywords which are test result which I should probably find out what there are, but I've got at least the one used by Tempest.

Thanks,

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#27 lore raw

Re: [OSSTEST PATCH v12 18/21] TestSupport: Implement target_cmd_subunit a subunit stream parser into substeps

Quoted 6 lines · Anthony PERARD
Quoted 5 lines · Ian Jackson

Anthony PERARD writes ("[OSSTEST PATCH v12 18/21] TestSupport: Implement target_cmd_subunit a subunit stream parser into substeps"):

Quoted 3 lines
Osstest/TestSupport.pm +3 -0
+sub target_cmd_subunit ($$;$$) {
+    my $stdout = IO::File::new_tmpfile();
+    my $rc = tcmd(undef,$stdout,0, 'osstest', @_);
Quoted 8 lines
Quoted 5 lines

It would be better to staxh the original subunit output. And I would prefer to avoid direct use of tcmd here. So can you introduce
target_cmd_stashed
which calls open_unique_stashfile and tcmd, and then use that in your subunit subroutine? (And yes this might duplicte output I think.)

Will do. And yes, this will duplicate most of the output. But it can help debug osstest, for everything that the parser ignore.

I can't figure out what should target_cmd_stashed prototype be. Should it be like target_cmd_output (returning the output of the cmd) ? Or maybe like target_cmd but return a filename (which contain the output of the cmd) ? I thought also about returning an file descriptor but it may not be a good idee to leave the caller with an open fd.

Also, how to call the stashed file ? So far, I would go with "$job". Or maybe adding an argument to target_cmd_stashed so the caller can choose a filename.

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#28 lore raw

Re: [OSSTEST PATCH v12 18/21] TestSupport: Implement target_cmd_subunit a subunit stream parser into substeps

Anthony PERARD writes ("Re: [OSSTEST PATCH v12 18/21] TestSupport: Implement target_cmd_subunit a subunit stream parser into substeps"):

Quoted 8 lines · Anthony PERARD
Quoted 2 lines

Will do. And yes, this will duplicate most of the output. But it can help debug osstest, for everything that the parser ignore.

I can't figure out what should target_cmd_stashed prototype be. Should it be like target_cmd_output (returning the output of the cmd) ? Or maybe like target_cmd but return a filename (which contain the output of the cmd) ?

Either of these will do I think. Either return the filename and have the caller use get_filecontents, or simply return the contents.

Quoted 2 lines

I thought also about returning an file descriptor but it may not be a good idee to leave the caller with an open fd.

That's probably annoying.

Quoted 3 lines

Also, how to call the stashed file ? So far, I would go with "$job". Or maybe adding an argument to target_cmd_stashed so the caller can choose a filename.

target_cmd_stashed should use open_unique_stashfile and should therefore pass $leafref from its caller.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#29 lore raw

Re: [OSSTEST PATCH v12 18/21] TestSupport: Implement target_cmd_subunit a subunit stream parser into substeps

In reply to Anthony PERARD

Anthony PERARD writes ("Re: [OSSTEST PATCH v12 18/21] TestSupport: Implement target_cmd_subunit a subunit stream parser into substeps"):

Quoted 6 lines · Ian Jackson
Quoted 2 lines

I think this is not a critical problem, but fixing it would be nice at some point.

The subunit stream contains the timestamps, so it just a matter of having substep_* taking it as an argument.

Ah. Well, that can wait.

Quoted 10 lines
Quoted 8 lines

Osstest/TestSupport.pm sub target_cmd_root ($$;$$) { tcmd(undef,undef,0, 'root',@_); } · line 752

Quoted 5 lines
Osstest/TestSupport.pm +5 -0
+sub subunit_sanitize ($) {
+    my ($testname) = @_;
+    $testname =~ s/ /_/g;
+    return $testname;
+}

This function should have a more specific name. Also it needs to be a whitelist.

What about subunit_sanitize_testname?

SGTM.

Quoted 1 line

What kind of whitelist? What should it includes?

I mean: currently, you replace spaces with _s. But you ought to have a specific list of characters that you allow without replacing.

It doesn't help that osstest doesn't have an official character set for testids. Existing testids (other than various junk) contain all of

    [^;_.()/~0-9a-zA-Z-]

(in Perl regexp charset syntax).

I suggest permitting all of those except ; which seems to have been a mistake and has now been eliminated. You may want to permit [ ] too.

Quoted 6 lines
Quoted 3 lines

Does the subunit protocol insist that
the spaces are single spaces ? If not you need to use \s+. You may want to use the extended regexp syntax.

Looking at a description of the protocol and at the subunit code, does are single spaces.

Fair enough.

Quoted 2 lines

What do you mean by "extended" ? Maybe operator like /.+?/, or maybe /(?<NAME>pattern)/ ?

I mean //x. See "/x" in perlre(1). This is a matter of taste.

Quoted 6 lines

multipart just describes how the following lines are formated, it would have the 'content-type:' and the size of the output. non-multipart is just followed by text, and ends with '\n]\n' (both format do).

I don't think the code needs to care about it, just that it may or may not be there.

Hrm.

Quoted 8 lines
Quoted 4 lines

Does the subunit protocol not have any escaping ? (Ie, what happens if a thing run as part of a subunit test actually generates a line of log output "]" ?) If it does havve some escaping you need to de-escape it.

Without "multipart", there does not seems to be any escaping. With multipart, the size of the output is in the protocol, I could extend the parser take it into account. It's just more work.

I think you must be able to consume the "multipart" and use the size, then. Otherwise if a test case printed output containing "\n]\n", in multipart format, you would mishandle it and get desynchronised.

Quoted 9 lines

FYI, part of the protocol about the output (with the beginning of DETAILS been "\[( multipart)?" in the regex):

DETAILS ::= BRACKETED | MULTIPART
BRACKETED ::= '[' CR UTF8-lines ']' CR
MULTIPART ::= '[ multipart' CR PART* ']' CR
PART ::= PART_TYPE CR NAME CR PART_BYTES CR
PART_TYPE ::= Content-Type: type/sub-type(;parameter=value,parameter=value) PART_BYTES ::= (DIGITS CR LF BYTE{DIGITS})* '0' CR LF

Sounds like you have to parse the multipart counted parts, I'm afraid.

Quoted 6 lines
Quoted 3 lines

What are subunit v1 consumers supposed to do with 1. unknown keywords
2. syntax errors ?
I doubt that the answer to (2) is to ignore them as you do here...

"unexpected lines [...] should be forwarded unaltered". That's is in the readme of python-subunit project.

"forwarded" where I wonder ? I guess printing them to logm is fine. But you shouldn't ignore them, I think.

Quoted 6 lines

As for keywords that can exist, there is "tags:", but in the case of tempest, it describe which worker did a test, when there is several concurrent worker. There is also "progress:" which is not very usefull for osstest. There is maybe more keywords which are test result which I should probably find out what there are, but I've got at least the one used by Tempest.

Fair enough.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#30 lore raw

PATCH v12 19/21 ts-openstack-tempest: Use target_cmd_subunit

In reply to Anthony PERARD
---
 ts-openstack-tempest | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
ts-openstack-tempest +2 -2
index ae3662f..f6b655f 100755
@@ -53,10 +53,10 @@ sub tempest() {
     my $regex = "(?!.*\\[.*\\bslow\\b.*\\]|$ignored_tests)".
         "(^tempest\\.(api|scenario|thirdparty))";
 
-    target_cmd($ho, <<END, 7200);
+    target_cmd_subunit($ho, <<END, 7200);
 set -e
 cd $builddir/tempest
-tempest run --concurrency=2 --regex '$regex'
+tempest run --concurrency=2 --subunit --regex '$regex' | subunit-2to1
 END
 }
 
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v12 19/21
#31 lore raw

Re: [OSSTEST PATCH v12 19/21] ts-openstack-tempest: Use target_cmd_subunit

Anthony PERARD writes ("[OSSTEST PATCH v12 19/21] ts-openstack-tempest: Use target_cmd_subunit"):

Quoted 1 line

Subject to my comments aboout the name of the function, of course.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#32 lore raw

PATCH v12 20/21 Create a flight to test OpenStack with xen-unstable and libvirt

In reply to Anthony PERARD

This patch creates a flight "openstack-ocata", with those jobs:
build-amd64
build-amd64-libvirt
build-amd64-pvops
build-amd64-xsm
build-arm64
build-arm64-libvirt
build-arm64-pvops
build-arm64-xsm
build-armhf
build-armhf-libvirt
build-armhf-pvops
build-armhf-xsm
test-amd64-amd64-devstack test-amd64-amd64-devstack-xsm test-arm64-arm64-devstack test-arm64-arm64-devstack-xsm test-armhf-armhf-devstack test-armhf-armhf-devstack-xsm

This would be a flight to test a stable release of OpenStack against Xen.

OpenStack have many different repo which should be in sync, so we should attempd to grab the revisions of the stable branch of every OpenStack tree, for now, the runvars REVISION_* of tree other than nova is set to "origin/stable/ocata", except Tempest does not have stable branch and should be able to test any OpenStack version.

---
 ap-common            | 19 +++++++++++++++++++
 ap-fetch-version     |  6 ++++++
 ap-fetch-version-old |  7 +++++++
 ap-print-url         |  3 +++
 ap-push              |  7 +++++++
 cr-daily-branch      | 31 +++++++++++++++++++++++++++++++
 cr-for-branches      |  2 +-
 cri-common           |  1 +
 make-flight          | 46 +++++++++++++++++++++++++++++++++++++++++++++-
 9 files changed, 120 insertions(+), 2 deletions(-)
ap-common +19 -0
index cbb815c..adfdc11 100644
@@ -54,6 +54,24 @@
 : ${PUSH_TREE_OVMF:=$XENBITS:/home/xen/git/osstest/ovmf.git}
 : ${BASE_TREE_OVMF:=git://xenbits.xen.org/osstest/ovmf.git}
 
+define_openstack_trees() {
+    local openstack_trees=(cinder glance keystone neutron nova requirements
+        tempest)
+    local tree
+    local url
+
+    : ${GIT_OPENSTACK_ORG:=git://git.openstack.org}
+    : ${TREE_OPENSTACK_DEVSTACK:=$GIT_OPENSTACK_ORG/openstack-dev/devstack.git}
+    for tree in "${openstack_trees[@]}"; do
+        url=$GIT_OPENSTACK_ORG/openstack/$tree.git
+        eval ": \${TREE_OPENSTACK_${tree^^}:=$url}"
+    done
+}
+
+define_openstack_trees
+: ${PUSH_TREE_OPENSTACK_NOVA:=$XENBITS:/home/xen/git/osstest/openstack-nova.git}
+: ${BASE_TREE_OPENSTACK_NOVA:=git://xenbits.xen.org/osstest/openstack-nova.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}
@@ -82,6 +100,7 @@ fi
 : ${LOCALREV_SEABIOS:=daily-cron.$branch}
 : ${LOCALREV_OVMF:=daily-cron.$branch}
 : ${LOCALREV_XTF:=daily-cron.$branch}
+: ${LOCALREV_OPENSTACK_NOVA:=daily-cron.$branch}
 
 : ${TREEBASE_LINUX_XCP:=http://hg.uk.xensource.com/carbon/trunk/linux-2.6.27}
 
ap-fetch-version +6 -0
index a107c93..03381fd 100755
@@ -106,6 +106,12 @@ ovmf)
 	repo_tree_rev_fetch_git ovmf \
 		$TREE_OVMF_UPSTREAM master $LOCALREV_OVMF
 	;;
+openstack-ocata)
+        os_release=${branch#openstack-}
+        repo_tree_rev_fetch_git "openstack-nova" \
+                "$TREE_OPENSTACK_NOVA" "stable/$os_release" \
+                "$LOCALREV_OPENSTACK_NOVA"
+        ;;
 osstest)
         if [ "x$OSSTEST_USE_HEAD" = "xy" ] ; then
 	    git update-ref -m "Arranging to test HEAD" \
ap-fetch-version-old +7 -0
index 3cbc176..6403bda 100755
@@ -35,6 +35,7 @@ check_ap_fetch_placeholders
 : ${BASE_LOCALREV_XTF:=daily-cron.$branch.old}
 : ${BASE_LOCALREV_OVMF:=daily-cron.$branch.old}
 : ${BASE_TAG_LIBVIRT:=xen-tested-master}
+: ${BASE_LOCALREV_OPENSTACK_NOVA:=daily-cron.$branch.old}
 
 if info_linux_tree "$branch"; then
 	repo_tree_rev_fetch_git linux \
@@ -114,6 +115,12 @@ ovmf)
 	repo_tree_rev_fetch_git ovmf \
 		$BASE_TREE_OVMF xen-tested-master $BASE_LOCALREV_OVMF
 	;;
+openstack-ocata)
+        os_release="${branch##*-}"
+        repo_tree_rev_fetch_git openstack-nova \
+                "$BASE_TREE_OPENSTACK_NOVA" "xen-tested-stable-$os_release" \
+                "$BASE_LOCALREV_OPENSTACK_NOVA"
+        ;;
 osstest)
 	if [ "x$OSSTEST_USE_HEAD" != "xy" ] ; then
 	    git fetch -f $HOME/testing.git production:ap-fetch
ap-print-url +3 -0
index 93c14b3..cfba1d4 100755
@@ -67,6 +67,9 @@ ovmf)
 osstest)
 	echo none:;
 	;;
+openstack-ocata)
+	echo $TREE_OPENSTACK_NOVA
+	;;
 *)
 	echo >&2 "branch $branch ?"
 	exit 1
ap-push +7 -0
index a27ccc2..6c9bddf 100755
@@ -41,6 +41,7 @@ TREE_RUMPRUN=$PUSH_TREE_RUMPRUN
 TREE_SEABIOS=$PUSH_TREE_SEABIOS
 TREE_OVMF=$PUSH_TREE_OVMF
 TREE_XTF=$PUSH_TREE_XTF
+TREE_OPENSTACK_NOVA=$PUSH_TREE_OPENSTACK_NOVA
 
 if info_linux_tree "$branch"; then
 	cd $repos/linux
@@ -129,6 +130,12 @@ ovmf)
 	cd $repos/ovmf
 	git push $TREE_OVMF $revision:refs/heads/xen-tested-master
 	;;
+openstack-ocata)
+        cd $repos/openstack-nova
+        os_release=${branch#openstack-}
+        git push $TREE_OPENSTACK_NOVA \
+                $revision:refs/heads/xen-tested-stable-$os_release
+        ;;
 osstest)
 	git push $HOME/testing.git $revision:production
 	if [ x"$TREEBRANCH_OSSTEST_UPSTREAM" != x ] ; then
cr-daily-branch +31 -0
index 39483cd..e4613b3 100755
@@ -207,6 +207,33 @@ if [ "x$REVISION_LINUXFIRMWARE" = x ]; then
 	determine_version REVISION_LINUXFIRMWARE linuxfirmware LINUXFIRMWARE
         export REVISION_LINUXFIRMWARE
 fi
+if [ "x$REVISION_OPENSTACK_NOVA" = x ]; then
+        determine_version REVISION_OPENSTACK_NOVA openstack-ocata OPENSTACK_NOVA
+        export REVISION_OPENSTACK_NOVA
+fi
+# Set REVISION for every tree that openstack is going to use and that have a
+# stable branch (tempest does not)
+determine_openstack_version() {
+        local os_tree="$1"
+        local os_release
+        local os_branch
+
+        if ! eval [ "x\$REVISION_OPENSTACK_${os_tree^^}" = x ]; then
+                return
+        fi
+        case "$branch" in
+        openstack-ocata)
+                os_release=${branch#openstack-}
+                os_branch="origin/stable/${branch##*-}"
+                eval "REVISION_OPENSTACK_${os_tree^^}=$os_branch"
+                export "REVISION_OPENSTACK_${os_tree^^}"
+                ;;
+        esac
+}
+for os_tree in cinder devstack glance keystone neutron requirements; do
+        determine_openstack_version "$os_tree"
+done
+
 
 case "$tree" in
 xen)
@@ -255,6 +282,10 @@ ovmf)
 	realtree=ovmf
 	NEW_REVISION=$REVISION_OVMF
 	;;
+openstack-nova)
+	realtree=openstack-nova
+	NEW_REVISION=$REVISION_OPENSTACK_NOVA
+	;;
 *)
 	NEW_REVISION=''
 	wantpush=false
cr-for-branches +1 -1
index a691273..ed76d70 100755
@@ -31,7 +31,7 @@ scriptoptions="$1"; shift
 LOGFILE=tmp/cr-for-branches.log
 export LOGFILE
 
-: ${BRANCHES:=osstest xen-4.0-testing xen-4.1-testing xen-4.2-testing xen-4.3-testing xen-4.4-testing xen-4.5-testing xen-4.6-testing xen-4.7-testing xen-4.8-testing xen-4.9-testing xen-unstable qemu-mainline qemu-upstream-unstable qemu-upstream-4.2-testing qemu-upstream-4.3-testing qemu-upstream-4.4-testing qemu-upstream-4.5-testing qemu-upstream-4.6-testing qemu-upstream-4.7-testing qemu-upstream-4.8-testing qemu-upstream-4.9-testing linux-linus linux-4.9 linux-4.1 linux-3.18 linux-3.16 linux-3.14 linux-3.10 linux-3.4 linux-arm-xen seabios ovmf xtf ${EXTRA_BRANCHES}}
+: ${BRANCHES:=osstest xen-4.0-testing xen-4.1-testing xen-4.2-testing xen-4.3-testing xen-4.4-testing xen-4.5-testing xen-4.6-testing xen-4.7-testing xen-4.8-testing xen-4.9-testing xen-unstable qemu-mainline qemu-upstream-unstable qemu-upstream-4.2-testing qemu-upstream-4.3-testing qemu-upstream-4.4-testing qemu-upstream-4.5-testing qemu-upstream-4.6-testing qemu-upstream-4.7-testing qemu-upstream-4.8-testing qemu-upstream-4.9-testing linux-linus linux-4.9 linux-4.1 linux-3.18 linux-3.16 linux-3.14 linux-3.10 linux-3.4 linux-arm-xen seabios ovmf xtf openstack-ocata ${EXTRA_BRANCHES}}
 export BRANCHES
 
 fetchwlem=$wlem
cri-common +1 -0
index 903fb4e..751a362 100644
@@ -82,6 +82,7 @@ select_xenbranch () {
 	ovmf)			tree=ovmf;	xenbranch=xen-unstable ;;
 	distros-*|examine)	tree=none;	xenbranch=xen-unstable ;;
 	osstest)		tree=osstest;	xenbranch=xen-unstable ;;
+	openstack-ocata)   tree=openstack-nova;	xenbranch=xen-unstable ;;
 	esac
 	if [ "x$tree" = xlinux ]; then
 		linuxbranch=$branch
make-flight +45 -1

70 lines not on this page · raw message

Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#33 lore raw

Re: [OSSTEST PATCH v12 20/21] Create a flight to test OpenStack with xen-unstable and libvirt

Anthony PERARD writes ("[OSSTEST PATCH v12 20/21] Create a flight to test OpenStack with xen-unstable and libvirt"):

Quoted 1 line

This patch creates a flight "openstack-ocata", with those jobs:

...

I think it would help if you split apart the changes to make-flight and mfi-* from the ones to cr-daily-* and ap-*.

Quoted 5 lines

OpenStack have many different repo which should be in sync, so we should attempd to grab the revisions of the stable branch of every OpenStack tree, for now, the runvars REVISION_* of tree other than nova is set to "origin/stable/ocata", except Tempest does not have stable branch and should be able to test any OpenStack version.

Do you intend to provide a version of this patch which maintains a tested branch for all of these different trees ?

And now some details:

ap-fetch-version-old ovmf) · line 119

Quoted 2 lines
ap-fetch-version-old +2 -0
+openstack-ocata)
+        os_release="${branch##*-}"

Can you please call this variable os_release ?

I think for now we don't have the capacity to add openstack testing on ARM. Can you please arrange to suppress those, in a way that means we can add them in later ? Best would be a separate commit which we can later revert.

Quoted 1 line

+ $os_runvars \

Again, please use "openstack_..." not "os_...". "os" means "operating system" to me.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#34 lore raw

Re: [OSSTEST PATCH v12 20/21] Create a flight to test OpenStack with xen-unstable and libvirt

Quoted 4 lines · Ian Jackson

Anthony PERARD writes ("[OSSTEST PATCH v12 20/21] Create a flight to test OpenStack with xen-unstable and libvirt"):

Quoted 1 line

This patch creates a flight "openstack-ocata", with those jobs:

...

Quoted 8 lines
Quoted 5 lines

OpenStack have many different repo which should be in sync, so we should attempd to grab the revisions of the stable branch of every OpenStack tree, for now, the runvars REVISION_* of tree other than nova is set to "origin/stable/ocata", except Tempest does not have stable branch and should be able to test any OpenStack version.

Do you intend to provide a version of this patch which maintains a tested branch for all of these different trees ?

No, I don't. This would be a different patch (and maybe different patch series).

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
#35 lore raw

PATCH v12 21/21 make-flight: Increase dom0_mem for openstack flight

In reply to Anthony PERARD

With 4G for dom0_mem, a host running devstack is using about 1.5G of swap.

---
 make-flight | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
make-flight +1 -1
index 3771b16..16fe062 100755
@@ -717,7 +717,7 @@ do_openstack_tests () {
         job_create_test test-$xenarch$kern-$dom0arch-devstack \
             test-devstack libvirt $xenarch $dom0arch \
             $os_runvars \
-            dom0_mem=4000 \
+            dom0_mem=6000 \
             enable_xsm=$xsm \
             all_hostflags=$most_hostflags
     done
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel