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:
7 changed files with 118 additions and 1 deletions
18
tools/playbooks/ceph-s3tests/ceph-s3.conf
Normal file
18
tools/playbooks/ceph-s3tests/ceph-s3.conf
Normal 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
10
tools/playbooks/ceph-s3tests/post.yaml
Normal file
10
tools/playbooks/ceph-s3tests/post.yaml
Normal 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
60
tools/playbooks/ceph-s3tests/run.yaml
Normal file
60
tools/playbooks/ceph-s3tests/run.yaml
Normal 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"
@@ -22,3 +22,4 @@
- python-pyeclib
- python-nose
- python-swiftclient
become:true
@@ -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
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.