Add ceph-s3 test non-voting job

This patch added new non-voting gate job to check the s3api compatibility
via swiftstack/s3compat tool that shows the ratio of compatible S3 APIs
in the gate result for each patch. This is very useful to check the possibility
if the new incoming patch breaks S3 API compatibility unexpectedly.

Originally swift3 has this kind of the gate job but we missed the staff
while migrating from swift3 into swift upstream repo so this is the porting of that.

Note that currently the job is against to only tempauth because we don't have
custom gate jobs using keystone environment other than dsvm.

Change-Id: I6f30f74678ad35479da237361bee48c46c0ecc49
This commit is contained in:
Kota Tsuyuzaki 2018-04-27 16:49:08 +09:00
parent 504dc4756a
commit 80001aa096
7 changed files with 118 additions and 1 deletions

View File

@ -173,6 +173,22 @@
HOST_IPV6: '[::1]'
SERVICE_HOST: '[::1]'
- job:
name: swift-tox-func-s3api-ceph-s3tests-tempauth
parent: unittests
voting: false
nodeset: centos-7
description: |
Setup a SAIO dev environment and run ceph-s3tests
pre-run:
- tools/playbooks/saio_single_node_setup/install_dependencies.yaml
- tools/playbooks/saio_single_node_setup/setup_saio.yaml
- tools/playbooks/saio_single_node_setup/make_rings.yaml
run: tools/playbooks/ceph-s3tests/run.yaml
post-run:
- tools/playbooks/probetests/post.yaml
- tools/playbooks/ceph-s3tests/post.yaml
- job:
name: swift-probetests-centos-7
parent: unittests
@ -233,6 +249,11 @@
- ^(api-ref|doc|releasenotes)/.*$
- ^test/probe/.*$
- ^(.gitreview|.mailmap|AUTHORS|CHANGELOG)$
- swift-tox-func-s3api-ceph-s3tests-tempauth:
irrelevant-files:
- ^(api-ref|releasenotes)/.*$
- ^test/probe/.*$
- ^(.gitreview|.mailmap|AUTHORS|CHANGELOG)$
- swift-probetests-centos-7:
irrelevant-files:
- ^(api-ref|releasenotes)/.*$

View File

@ -39,6 +39,13 @@ use = egg:swift#slo
use = egg:swift#container_sync
current = //saio/saio_endpoint
[filter:s3api]
use = egg:swift#s3api
# Add this filter to your pipeline if you want to test with the S3 protocol.
s3_acl = yes
dns_compliant_bucket_names = no
check_bucket_owner = yes
[filter:tempurl]
use = egg:swift#tempurl

View File

@ -0,0 +1,18 @@
[DEFAULT]
host = localhost
port = 8080
is_secure = no
[s3 main]
user_id = test:tester
display_name = test:tester
email = test:tester
access_key = test:tester
secret_key = testing
[s3 alt]
user_id = test:tester3
display_name = test:tester3
email = test:tester3
access_key = test:tester3
secret_key = testing3

View File

@ -0,0 +1,10 @@
- hosts: all
become: true
tasks:
- name: Copy s3-tests outputs from worker nodes to executor node
synchronize:
src: '{{ ansible_env.HOME }}/s3compat/output'
dest: '{{ zuul.executor.log_root }}'
mode: pull
copy_links: true
verify_host: true

View File

@ -0,0 +1,60 @@
# Copyright (c) 2018 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- hosts: all
tasks:
# TODO: remove this task when s3api is in the pipeline by default
- name: Add s3api in proxy-server.conf
replace:
path: "/etc/swift/proxy-server.conf"
regexp: "container_sync tempauth"
replace: "container_sync s3api tempauth"
become: true
- name: Starts main swift servers
shell: "swift-init main start"
become: true
- name: Clone s3compat repository
git:
repo: "https://github.com/swiftstack/s3compat.git"
dest: "{{ ansible_env.HOME }}/s3compat"
- name: Install s3compat requirements
pip:
requirements: "{{ ansible_env.HOME }}/s3compat/requirements.txt"
virtualenv: "{{ ansible_env.HOME }}/venv"
become: true
- name: Run s3compat tests
shell: '{{ ansible_env.HOME }}/venv/bin/python {{ ansible_env.HOME }}/s3compat/bin/run_ceph_tests.py "$@" || true'
environment:
S3TEST_CONF: "{{ ansible_env.HOME }}/{{ zuul.project.src_dir }}/tools/playbooks/ceph-s3tests/ceph-s3.conf"
S3ACL: "true"
DNS_BUCKET_NAMES: "false"
CHECK_BUCKET_OWNER: "true"
args:
chdir: '{{ ansible_env.HOME }}/s3compat'
- name: Show report
shell: |
set -o pipefail
"{{ ansible_env.HOME }}/venv/bin/python" ./bin/get_ceph_test_attributes.py
"{{ ansible_env.HOME }}/venv/bin/python" ./bin/report.py --detailed "{{ ansible_env.HOME }}/s3compat/output/ceph-s3.out.yaml" \
--known-failures "{{ ansible_env.HOME}}/{{ zuul.project.src_dir }}/doc/s3api/conf/ceph-known-failures-tempauth.yaml" \
--detailedformat console "{{ ansible_env.HOME }}/s3compat/output/ceph-s3.out.xml" | \
tee "{{ ansible_env.HOME }}/s3compat/output/ceph-s3-summary.log"
args:
chdir:
"{{ ansible_env.HOME }}/s3compat"

View File

@ -22,3 +22,4 @@
- python-pyeclib
- python-nose
- python-swiftclient
become: true

View File

@ -19,7 +19,7 @@
file: path=/srv state=directory
- name: create loopback device
command: truncate -s 1GB /srv/swift-disk creates=/srv/swift-disk
command: truncate -s 10GB /srv/swift-disk creates=/srv/swift-disk
- name: create filesystem /srv/swift-disk
become: true