Merge lp:~yolanda.robla/swift/havana into lp:~openstack-ubuntu-testing/swift/havana

Proposed by Yolanda Robla
Status: Merged
Approved by: Chuck Short
Approved revision: 144
Merged at revision: 144
Proposed branch: lp:~yolanda.robla/swift/havana
Merge into: lp:~openstack-ubuntu-testing/swift/havana
Diff against target: 552 lines (+500/-2)
7 files modified
debian/changelog (+5/-1)
debian/control (+1/-1)
debian/tests/control (+3/-0)
debian/tests/proxy-server.conf (+437/-0)
debian/tests/python-swift (+14/-0)
debian/tests/swift-daemons (+36/-0)
debian/tests/test_import_swift.py (+4/-0)
To merge this branch: bzr merge lp:~yolanda.robla/swift/havana
Reviewer Review Type Date Requested Status
Openstack Ubuntu Testers Pending
Review via email: mp+168922@code.launchpad.net

Description of the change

Added autopkg tests

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2013-05-03 13:29:35 +0000
3+++ debian/changelog 2013-06-12 11:41:34 +0000
4@@ -1,10 +1,14 @@
5 swift (1.8.1-0ubuntu1) UNRELEASED; urgency=low
6
7+ [ Chuck Short ]
8 * New upstream release.
9 * debian/swift.install: Add swift-config.
10 * debian/control: Nump standards version to 3.9.4
11
12- -- Chuck Short <zulcss@ubuntu.com> Fri, 03 May 2013 08:03:53 -0500
13+ [ Yolanda Robla ]
14+ * debian/tests: added autopkg tests
15+
16+ -- Yolanda Robla <yolanda.robla@canonical.com> Wed, 12 Jun 2013 13:34:53 +0200
17
18 swift (1.8.0-0ubuntu1) raring; urgency=low
19
20
21=== modified file 'debian/control'
22--- debian/control 2013-05-03 13:29:35 +0000
23+++ debian/control 2013-06-12 11:41:34 +0000
24@@ -27,7 +27,7 @@
25 Homepage: http://launchpad.net/swift
26 Vcs-Browser: http://bazaar.launchpad.net/~ubuntu-server-dev/swift/essex
27 Vcs-Bzr: http://bazaar.launchpad.net/~ubuntu-server-dev/swift/essex
28-
29+XS-Testsuite: autopkgtest
30
31 Package: python-swift
32 Architecture: all
33
34=== added directory 'debian/tests'
35=== added file 'debian/tests/control'
36--- debian/tests/control 1970-01-01 00:00:00 +0000
37+++ debian/tests/control 2013-06-12 11:41:34 +0000
38@@ -0,0 +1,3 @@
39+Tests: python-swift swift-daemons
40+Depends: python-swift, swift, swift-proxy, swift-object, swift-container, swift-account
41+Restrictions: needs-root
42
43=== added file 'debian/tests/proxy-server.conf'
44--- debian/tests/proxy-server.conf 1970-01-01 00:00:00 +0000
45+++ debian/tests/proxy-server.conf 2013-06-12 11:41:34 +0000
46@@ -0,0 +1,437 @@
47+[DEFAULT]
48+# bind_ip = 0.0.0.0
49+# bind_port = 80
50+# bind_timeout = 30
51+# backlog = 4096
52+# swift_dir = /etc/swift
53+# workers = 1
54+# user = swift
55+#
56+# Set the following two lines to enable SSL. This is for testing only.
57+# cert_file = /etc/swift/proxy.crt
58+# key_file = /etc/swift/proxy.key
59+#
60+# expiring_objects_container_divisor = 86400
61+#
62+# You can specify default log routing here if you want:
63+# log_name = swift
64+# log_facility = LOG_LOCAL0
65+# log_level = INFO
66+# log_headers = False
67+# log_address = /dev/log
68+#
69+# This optional suffix (default is empty) that would be appended to the swift transaction
70+# id allows one to easily figure out from which cluster that X-Trans-Id belongs to.
71+# This is very useful when one is managing more than one swift cluster.
72+# trans_id_suffix =
73+#
74+# comma separated list of functions to call to setup custom log handlers.
75+# functions get passed: conf, name, log_to_console, log_route, fmt, logger,
76+# adapted_logger
77+# log_custom_handlers =
78+#
79+# If set, log_udp_host will override log_address
80+# log_udp_host =
81+# log_udp_port = 514
82+#
83+# You can enable StatsD logging here:
84+# log_statsd_host = localhost
85+# log_statsd_port = 8125
86+# log_statsd_default_sample_rate = 1.0
87+# log_statsd_sample_rate_factor = 1.0
88+# log_statsd_metric_prefix =
89+#
90+# Use a comma separated list of full url (http://foo.bar:1234,https://foo.bar)
91+# cors_allow_origin =
92+#
93+# client_timeout = 60
94+# eventlet_debug = false
95+# max_clients = 1024
96+
97+[pipeline:main]
98+pipeline = catch_errors healthcheck proxy-logging cache slo ratelimit tempauth container-quotas account-quotas proxy-logging proxy-server
99+
100+[app:proxy-server]
101+use = egg:swift#proxy
102+# You can override the default log routing for this app here:
103+# set log_name = proxy-server
104+# set log_facility = LOG_LOCAL0
105+# set log_level = INFO
106+# set log_address = /dev/log
107+#
108+# log_handoffs = True
109+# recheck_account_existence = 60
110+# recheck_container_existence = 60
111+# object_chunk_size = 8192
112+# client_chunk_size = 8192
113+# node_timeout = 10
114+# conn_timeout = 0.5
115+#
116+# How long without an error before a node's error count is reset. This will
117+# also be how long before a node is reenabled after suppression is triggered.
118+# error_suppression_interval = 60
119+#
120+# How many errors can accumulate before a node is temporarily ignored.
121+# error_suppression_limit = 10
122+#
123+# If set to 'true' any authorized user may create and delete accounts; if
124+# 'false' no one, even authorized, can.
125+# allow_account_management = false
126+#
127+# Set object_post_as_copy = false to turn on fast posts where only the metadata
128+# changes are stored anew and the original data file is kept in place. This
129+# makes for quicker posts; but since the container metadata isn't updated in
130+# this mode, features like container sync won't be able to sync posts.
131+# object_post_as_copy = true
132+#
133+# If set to 'true' authorized accounts that do not yet exist within the Swift
134+# cluster will be automatically created.
135+# account_autocreate = false
136+#
137+# If set to a positive value, trying to create a container when the account
138+# already has at least this maximum containers will result in a 403 Forbidden.
139+# Note: This is a soft limit, meaning a user might exceed the cap for
140+# recheck_account_existence before the 403s kick in.
141+# max_containers_per_account = 0
142+#
143+# This is a comma separated list of account hashes that ignore the
144+# max_containers_per_account cap.
145+# max_containers_whitelist =
146+#
147+# Comma separated list of Host headers to which the proxy will deny requests.
148+# deny_host_headers =
149+#
150+# Prefix used when automatically creating accounts.
151+# auto_create_account_prefix = .
152+#
153+# Depth of the proxy put queue.
154+# put_queue_depth = 10
155+#
156+# Start rate-limiting object segment serving after the Nth segment of a
157+# segmented object.
158+# rate_limit_after_segment = 10
159+#
160+# Once segment rate-limiting kicks in for an object, limit segments served
161+# to N per second.
162+# rate_limit_segments_per_sec = 1
163+#
164+# Storage nodes can be chosen at random (shuffle), by using timing
165+# measurements (timing), or by using an explicit match (affinity).
166+# Using timing measurements may allow for lower overall latency, while
167+# using affinity allows for finer control. In both the timing and
168+# affinity cases, equally-sorting nodes are still randomly chosen to
169+# spread load.
170+# The valid values for sorting_method are "affinity", "shuffle", and "timing".
171+# sorting_method = shuffle
172+#
173+# If the "timing" sorting_method is used, the timings will only be valid for
174+# the number of seconds configured by timing_expiry.
175+# timing_expiry = 300
176+#
177+# If set to false will treat objects with X-Static-Large-Object header set
178+# as a regular object on GETs, i.e. will return that object's contents. Should
179+# be set to false if slo is not used in pipeline.
180+# allow_static_large_object = true
181+#
182+# Set to the number of nodes to contact for a normal request. You can use
183+# '* replicas' at the end to have it use the number given times the number of
184+# replicas for the ring being used for the request.
185+# request_node_count = 2 * replicas
186+#
187+# Which backend servers to prefer on reads. Format is r<N> for region
188+# N or r<N>z<M> for region N, zone M. The value after the equals is
189+# the priority; lower numbers are higher priority.
190+#
191+# Example: first read from region 1 zone 1, then region 1 zone 2, then
192+# anything in region 2, then everything else:
193+# read_affinity = r1z1=100, r1z2=200, r2=300
194+# Default is empty, meaning no preference.
195+# read_affinity =
196+
197+[filter:tempauth]
198+use = egg:swift#tempauth
199+# You can override the default log routing for this filter here:
200+# set log_name = tempauth
201+# set log_facility = LOG_LOCAL0
202+# set log_level = INFO
203+# set log_headers = False
204+# set log_address = /dev/log
205+#
206+# The reseller prefix will verify a token begins with this prefix before even
207+# attempting to validate it. Also, with authorization, only Swift storage
208+# accounts with this prefix will be authorized by this middleware. Useful if
209+# multiple auth systems are in use for one Swift cluster.
210+# reseller_prefix = AUTH
211+#
212+# The auth prefix will cause requests beginning with this prefix to be routed
213+# to the auth subsystem, for granting tokens, etc.
214+# auth_prefix = /auth/
215+# token_life = 86400
216+#
217+# This allows middleware higher in the WSGI pipeline to override auth
218+# processing, useful for middleware such as tempurl and formpost. If you know
219+# you're not going to use such middleware and you want a bit of extra security,
220+# you can set this to false.
221+# allow_overrides = true
222+#
223+# This specifies what scheme to return with storage urls:
224+# http, https, or default (chooses based on what the server is running as)
225+# This can be useful with an SSL load balancer in front of a non-SSL server.
226+# storage_url_scheme = default
227+#
228+# Lastly, you need to list all the accounts/users you want here. The format is:
229+# user_<account>_<user> = <key> [group] [group] [...] [storage_url]
230+# or if you want underscores in <account> or <user>, you can base64 encode them
231+# (with no equal signs) and use this format:
232+# user64_<account_b64>_<user_b64> = <key> [group] [group] [...] [storage_url]
233+# There are special groups of:
234+# .reseller_admin = can do anything to any account for this auth
235+# .admin = can do anything within the account
236+# If neither of these groups are specified, the user can only access containers
237+# that have been explicitly allowed for them by a .admin or .reseller_admin.
238+# The trailing optional storage_url allows you to specify an alternate url to
239+# hand back to the user upon authentication. If not specified, this defaults to
240+# $HOST/v1/<reseller_prefix>_<account> where $HOST will do its best to resolve
241+# to what the requester would need to use to reach this host.
242+# Here are example entries, required for running the tests:
243+user_admin_admin = admin .admin .reseller_admin
244+user_test_tester = testing .admin
245+user_test2_tester2 = testing2 .admin
246+user_test_tester3 = testing3
247+
248+# To enable Keystone authentication you need to have the auth token
249+# middleware first to be configured. Here is an example below, please
250+# refer to the keystone's documentation for details about the
251+# different settings.
252+#
253+# You'll need to have as well the keystoneauth middleware enabled
254+# and have it in your main pipeline so instead of having tempauth in
255+# there you can change it to: authtoken keystoneauth
256+#
257+# [filter:authtoken]
258+# paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
259+# auth_host = keystonehost
260+# auth_port = 35357
261+# auth_protocol = http
262+# auth_uri = http://keystonehost:5000/
263+# admin_tenant_name = service
264+# admin_user = swift
265+# admin_password = password
266+# delay_auth_decision = 1
267+# cache = swift.cache
268+#
269+# [filter:keystoneauth]
270+# use = egg:swift#keystoneauth
271+# Operator roles is the role which user would be allowed to manage a
272+# tenant and be able to create container or give ACL to others.
273+# operator_roles = admin, swiftoperator
274+
275+[filter:healthcheck]
276+use = egg:swift#healthcheck
277+# An optional filesystem path, which if present, will cause the healthcheck
278+# URL to return "503 Service Unavailable" with a body of "DISABLED BY FILE".
279+# This facility may be used to temporarily remove a Swift node from a load
280+# balancer pool during maintenance or upgrade (remove the file to allow the
281+# node back into the load balancer pool).
282+# disable_path =
283+
284+[filter:cache]
285+use = egg:swift#memcache
286+# You can override the default log routing for this filter here:
287+# set log_name = cache
288+# set log_facility = LOG_LOCAL0
289+# set log_level = INFO
290+# set log_headers = False
291+# set log_address = /dev/log
292+#
293+# If not set here, the value for memcache_servers will be read from
294+# memcache.conf (see memcache.conf-sample) or lacking that file, it will
295+# default to the value below. You can specify multiple servers separated with
296+# commas, as in: 10.1.2.3:11211,10.1.2.4:11211
297+# memcache_servers = 127.0.0.1:11211
298+#
299+# Sets how memcache values are serialized and deserialized:
300+# 0 = older, insecure pickle serialization
301+# 1 = json serialization but pickles can still be read (still insecure)
302+# 2 = json serialization only (secure and the default)
303+# If not set here, the value for memcache_serialization_support will be read
304+# from /etc/swift/memcache.conf (see memcache.conf-sample).
305+# To avoid an instant full cache flush, existing installations should
306+# upgrade with 0, then set to 1 and reload, then after some time (24 hours)
307+# set to 2 and reload.
308+# In the future, the ability to use pickle serialization will be removed.
309+# memcache_serialization_support = 2
310+
311+[filter:ratelimit]
312+use = egg:swift#ratelimit
313+# You can override the default log routing for this filter here:
314+# set log_name = ratelimit
315+# set log_facility = LOG_LOCAL0
316+# set log_level = INFO
317+# set log_headers = False
318+# set log_address = /dev/log
319+#
320+# clock_accuracy should represent how accurate the proxy servers' system clocks
321+# are with each other. 1000 means that all the proxies' clock are accurate to
322+# each other within 1 millisecond. No ratelimit should be higher than the
323+# clock accuracy.
324+# clock_accuracy = 1000
325+#
326+# max_sleep_time_seconds = 60
327+#
328+# log_sleep_time_seconds of 0 means disabled
329+# log_sleep_time_seconds = 0
330+#
331+# allows for slow rates (e.g. running up to 5 sec's behind) to catch up.
332+# rate_buffer_seconds = 5
333+#
334+# account_ratelimit of 0 means disabled
335+# account_ratelimit = 0
336+
337+# these are comma separated lists of account names
338+# account_whitelist = a,b
339+# account_blacklist = c,d
340+
341+# with container_limit_x = r
342+# for containers of size x limit requests per second to r. The container
343+# rate will be linearly interpolated from the values given. With the values
344+# below, a container of size 5 will get a rate of 75.
345+# container_ratelimit_0 = 100
346+# container_ratelimit_10 = 50
347+# container_ratelimit_50 = 20
348+
349+[filter:domain_remap]
350+use = egg:swift#domain_remap
351+# You can override the default log routing for this filter here:
352+# set log_name = domain_remap
353+# set log_facility = LOG_LOCAL0
354+# set log_level = INFO
355+# set log_headers = False
356+# set log_address = /dev/log
357+#
358+# storage_domain = example.com
359+# path_root = v1
360+# reseller_prefixes = AUTH
361+
362+[filter:catch_errors]
363+use = egg:swift#catch_errors
364+# You can override the default log routing for this filter here:
365+# set log_name = catch_errors
366+# set log_facility = LOG_LOCAL0
367+# set log_level = INFO
368+# set log_headers = False
369+# set log_address = /dev/log
370+
371+[filter:cname_lookup]
372+# Note: this middleware requires python-dnspython
373+use = egg:swift#cname_lookup
374+# You can override the default log routing for this filter here:
375+# set log_name = cname_lookup
376+# set log_facility = LOG_LOCAL0
377+# set log_level = INFO
378+# set log_headers = False
379+# set log_address = /dev/log
380+#
381+# storage_domain = example.com
382+# lookup_depth = 1
383+
384+# Note: Put staticweb just after your auth filter(s) in the pipeline
385+[filter:staticweb]
386+use = egg:swift#staticweb
387+# Seconds to cache container x-container-meta-web-* header values.
388+# cache_timeout = 300
389+
390+# Note: Put tempurl just before your auth filter(s) in the pipeline
391+[filter:tempurl]
392+use = egg:swift#tempurl
393+# The methods allowed with Temp URLs.
394+# methods = GET HEAD PUT
395+#
396+# The headers to remove from incoming requests. Simply a whitespace delimited
397+# list of header names and names can optionally end with '*' to indicate a
398+# prefix match. incoming_allow_headers is a list of exceptions to these
399+# removals.
400+# incoming_remove_headers = x-timestamp
401+#
402+# The headers allowed as exceptions to incoming_remove_headers. Simply a
403+# whitespace delimited list of header names and names can optionally end with
404+# '*' to indicate a prefix match.
405+# incoming_allow_headers =
406+#
407+# The headers to remove from outgoing responses. Simply a whitespace delimited
408+# list of header names and names can optionally end with '*' to indicate a
409+# prefix match. outgoing_allow_headers is a list of exceptions to these
410+# removals.
411+# outgoing_remove_headers = x-object-meta-*
412+#
413+# The headers allowed as exceptions to outgoing_remove_headers. Simply a
414+# whitespace delimited list of header names and names can optionally end with
415+# '*' to indicate a prefix match.
416+# outgoing_allow_headers = x-object-meta-public-*
417+
418+# Note: Put formpost just before your auth filter(s) in the pipeline
419+[filter:formpost]
420+use = egg:swift#formpost
421+
422+# Note: Just needs to be placed before the proxy-server in the pipeline.
423+[filter:name_check]
424+use = egg:swift#name_check
425+# forbidden_chars = '"`<>
426+# maximum_length = 255
427+# forbidden_regexp = /\./|/\.\./|/\.$|/\.\.$
428+
429+[filter:list-endpoints]
430+use = egg:swift#list_endpoints
431+# list_endpoints_path = /endpoints/
432+
433+[filter:proxy-logging]
434+use = egg:swift#proxy_logging
435+# If not set, logging directives from [DEFAULT] without "access_" will be used
436+# access_log_name = swift
437+# access_log_facility = LOG_LOCAL0
438+# access_log_level = INFO
439+# access_log_address = /dev/log
440+#
441+# If set, access_log_udp_host will override access_log_address
442+# access_log_udp_host =
443+# access_log_udp_port = 514
444+#
445+# You can use log_statsd_* from [DEFAULT] or override them here:
446+# access_log_statsd_host = localhost
447+# access_log_statsd_port = 8125
448+# access_log_statsd_default_sample_rate = 1.0
449+# access_log_statsd_sample_rate_factor = 1.0
450+# access_log_statsd_metric_prefix =
451+# access_log_headers = False
452+#
453+# What HTTP methods are allowed for StatsD logging (comma-sep); request methods
454+# not in this list will have "BAD_METHOD" for the <verb> portion of the metric.
455+# log_statsd_valid_http_methods = GET,HEAD,POST,PUT,DELETE,COPY,OPTIONS
456+#
457+# Note: The double proxy-logging in the pipeline is not a mistake. The
458+# left-most proxy-logging is there to log requests that were handled in
459+# middleware and never made it through to the right-most middleware (and
460+# proxy server). Double logging is prevented for normal requests. See
461+# proxy-logging docs.
462+
463+# Note: Put before both ratelimit and auth in the pipeline.
464+[filter:bulk]
465+use = egg:swift#bulk
466+# max_containers_per_extraction = 10000
467+# max_failed_extractions = 1000
468+# max_deletes_per_request = 10000
469+# yield_frequency = 60
470+
471+# Note: Put after auth in the pipeline.
472+[filter:container-quotas]
473+use = egg:swift#container_quotas
474+
475+# Note: Put before both ratelimit and auth in the pipeline.
476+[filter:slo]
477+use = egg:swift#slo
478+# max_manifest_segments = 1000
479+# max_manifest_size = 2097152
480+# min_segment_size = 1048576
481+
482+[filter:account-quotas]
483+use = egg:swift#account_quotas
484
485=== added file 'debian/tests/python-swift'
486--- debian/tests/python-swift 1970-01-01 00:00:00 +0000
487+++ debian/tests/python-swift 2013-06-12 11:41:34 +0000
488@@ -0,0 +1,14 @@
489+#!/bin/bash
490+#-------------------------
491+# Testing client utilities
492+#-------------------------
493+set -e
494+
495+result=$(python `dirname $0`/test_import_swift.py 2>&1)
496+if [ "$result" ]; then
497+ echo "ERROR: PYTHON-SWIFT MODULE CANNOT BE IMPORTED"
498+ exit 1
499+else
500+ echo "OK"
501+ exit 0
502+fi
503
504=== added file 'debian/tests/swift-daemons'
505--- debian/tests/swift-daemons 1970-01-01 00:00:00 +0000
506+++ debian/tests/swift-daemons 2013-06-12 11:41:34 +0000
507@@ -0,0 +1,36 @@
508+#!/bin/bash
509+#--------------------
510+# Testing swift-proxy
511+#--------------------
512+set -e
513+
514+# copy config files
515+mkdir -p /etc/swift 2>&1 > /dev/null
516+cp /usr/share/doc/swift/swift.conf-sample /etc/swift/swift.conf 2>&1 > /dev/null
517+cp `dirname $0`/proxy-server.conf /etc/swift/proxy-server.conf 2>&1 > /dev/null
518+
519+# create rings
520+cd /etc/swift 2>&1 > /dev/null
521+swift-ring-builder account.builder create 18 3 1 2>&1 > /dev/null
522+swift-ring-builder container.builder create 18 3 1 2>&1 > /dev/null
523+swift-ring-builder object.builder create 18 3 1 2>&1 > /dev/null
524+
525+swift-ring-builder account.builder add z1-127.0.0.1:6002/sda1 100 2>&1 > /dev/null
526+swift-ring-builder container.builder add z1-127.0.0.1:6001/sda1 100 2>&1 > /dev/null
527+swift-ring-builder object.builder add z1-127.0.0.1:6000/sda1 100 2>&1 > /dev/null
528+
529+swift-ring-builder account.builder rebalance 2>&1 > /dev/null
530+swift-ring-builder container.builder rebalance 2>&1 > /dev/null
531+swift-ring-builder object.builder rebalance 2>&1 > /dev/null
532+
533+DAEMONS=('swift-proxy' 'swift-object' 'swift-container' 'swift-account')
534+for daemon in "${DAEMONS[@]}"; do
535+ /etc/init.d/$daemon restart 2>&1 > /dev/null
536+ if pidof -x ${daemon}-server > /dev/null; then
537+ echo "OK"
538+ else
539+ echo "ERROR: ${daemon} IS NOT RUNNING"
540+ exit 1
541+ fi
542+done
543+exit 0
544
545=== added file 'debian/tests/test_import_swift.py'
546--- debian/tests/test_import_swift.py 1970-01-01 00:00:00 +0000
547+++ debian/tests/test_import_swift.py 2013-06-12 11:41:34 +0000
548@@ -0,0 +1,4 @@
549+try:
550+ import swift
551+except ImportError, e:
552+ print "ERROR IMPORTING MODULE"

Subscribers

People subscribed via source and target branches