3749 Commits

Author SHA1 Message Date
Jenkins
6174ea470d Merge "Fix error log of proxy-server when cache middleware is disabled" 2014-04-25 10:43:28 +00:00
Jenkins
8110172f54 Merge "Fix redundant add operation of set in ring" 2014-04-24 18:21:57 +00:00
Jenkins
7a24c4ba3a Merge "setting request_node_count doesn't work" 2014-04-23 19:02:26 +00:00
Jenkins
068dfb464f Merge "Load constraints from cluster info dictionary" 2014-04-23 05:42:57 +00:00
Jenkins
fc7f6dd924 Merge "Check swift.conf MD5 with recon" 2014-04-23 03:23:47 +00:00
YummyBian
aa6bd2c0ab Fix redundant add operation of set in ring
You don't need to add dev_id into seen_ids again when it has already existed in seen_ids.

Fixes Bug #1311190

Change-Id: If0766de8dc5e2a59a648cae39c789c91131805d2
2014-04-22 23:52:28 +08:00
David Goetz
20e46bc147 setting request_node_count doesn't work
Change-Id: Ia161b872cf5ffa43c10334b42cc36d679c3adf56
2014-04-21 15:20:12 -07:00
Takashi Kajinami
07841b4282 Fix error log of proxy-server when cache middleware is disabled
Change-Id: I0b67721cbb692fb8d2a5dd8b2c4f5383512b7b45
Closes-Bug: #1306591
2014-04-18 11:43:44 +09:00
Jenkins
c20a8377c6 Merge "Bring Object Auditor Coverage To 99%" 2014-04-18 02:06:12 +00:00
Paul Luse
968ec9806f Bring Object Auditor Coverage To 99%
Previously at 87% with 20 missing 11 partial, this additional
test code brings it to 99% 0 missing and 3 partial.  Noticed
some easy places to add coverage while working on the
Storage Policy branch.

Change-Id: I49b5b4db3341416fce1ef42811732c16d3265522
2014-04-17 09:57:51 -07:00
Christian Schwede
51f6035f3b Fix test-requirements.txt
mock >= 1.0 changed the behavior for iterable sideeffects. Any
exceptions in an iterable side_effect will now be raised instead of
returned.

With mock < 1.0 tests are failing, because test for the
internal client (TestSimpleClient.test_get_with_retries) use an
iterable sideeffect that raise an URLError on the first request
and pass on the second request.

Change-Id: I568b68c33ff599d7a4f590e2a0eb8caeee4b4d4e
2014-04-17 16:55:14 +00:00
Paul Luse
856c15539a Fix testcase test_print_db_info_metadata()
Test compares cluster info to hardcoded expected data and wasn't
sorting the two sets of things being compared leading to some
sporadic unit test failures.

Change-Id: I3ef98260a62c15d06ba8cc196196d4e90abca3f0
2014-04-14 16:14:30 -07:00
Peter Portante
4dd2670fb0 Load constraints from cluster info dictionary
Use constrainst from the new "swift-constraints" section of test.conf,
fall back to those found in the response to the /info API call,
ultimately falling back to the constraints module's effective
constraints.

Change-Id: Iea01c9c4b5148faa10004a240df411cbe7336a6a
2014-04-14 19:05:25 -04:00
Jenkins
e0108af54f Merge "Print 'Container Count' in data base info" 2014-04-14 16:59:40 +00:00
Jenkins
77b8d42dc8 Merge "Support If-[Un]Modified-Since for object HEAD" 2014-04-14 10:55:15 +00:00
Madhuri Kumari
67fff5b297 Print 'Container Count' in data base info
Currently, 'Container Count' was missing in data base info.
So this patch will help printing 'Container Count' also.

Change-Id: I1ca80ee79e71b086b30fd2d1ab024ea1cfb324f5
2014-04-12 09:20:06 +05:30
Jenkins
3c859deb29 Merge "Add includes of referenced SAIO bin scripts" 2014-04-11 03:10:13 +00:00
Jenkins
e2ab5301aa Merge "Fix logging issue when services stop on py26" 2014-04-11 00:50:31 +00:00
Jenkins
3525a03a41 Merge "Use eventlet instead of threading for timeout" 2014-04-11 00:50:29 +00:00
Samuel Merritt
31dac18625 Check swift.conf MD5 with recon
I've seen several folks recently have problems with their Swift
clusters because they had different hash prefixes on different
nodes. Let's help them out by having recon check that.

Note that MD5-equality is stronger than what we need (which is
ConfigParser-equality for a particular set of keys), but this way we
don't expose the secret hash prefix and suffix across the internal
network, just the MD5 checksum of the file containing them.

Change-Id: I3af984ee45947345891b3c596a88e3464f178cc7
2014-04-10 14:08:27 -07:00
Peter Portante
deb0dfd090 Add includes of referenced SAIO bin scripts
Change-Id: I6810e69a757336a3aed0a38146c27f270fe2dde1
2014-04-10 12:27:25 -07:00
Chuck Thier
2c2ede2233 Fix logging issue when services stop on py26
On older versions of python 2.6, exceptions would be spewed to the error
log whenever a service would stop.  This gets magnified by the
container-updater which seems to do it with every pass.  This catches
and squelches the error.

Change-Id: I128c09c240e768e8195af1f6fe79b10d4e432471
Closes-Bug: #1306027
2014-04-10 19:03:29 +00:00
Jenkins
4721deeb40 Merge "Set permissions on generated ring files" 2014-04-09 20:55:04 +00:00
Peter Portante
5ff6a4d5d6 Use eventlet instead of threading for timeout
The only explicit use of Python threading is found in the
testFileSizeLimit test. Using eventlet seems a bit easier to follow,
accomplishing the same goal, and does not constrain us to a
multi-threaded environment.

The chunks() and timeout() module level functions are only used by one
test each, so we just move them to those tests to indicate they are not
used globally.

Change-Id: I50b9fb798fbfd1d552b3c3f90309f6b86da34853
2014-04-09 13:25:17 -04:00
Jenkins
2f00ce731d Merge "Add tests and comments re constraints in /info" 2014-04-09 16:54:02 +00:00
Jenkins
a94f910b75 Merge "Support for content-length in the upload object method for internal client." 2014-04-09 12:34:54 +00:00
anc
58fe2f256f Add tests and comments re constraints in /info
Add test to check that only the expected keys are
reported by proxy in /info, and add comments to
raise awareness that default constraints will be
automatically published by proxy in response to /info
requests.

Change-Id: Ia5f6339b06cdc2e1dc960d1f75562a2505530202
2014-04-09 11:59:24 +01:00
Jenkins
daecec651c Merge "Add missing constraints to /info" 2014-04-09 10:32:34 +00:00
Jenkins
8d4a2e94ec Merge "Attempt to ensure connect always timesout" 2014-04-09 00:11:18 +00:00
Jenkins
62087ab051 Merge "Update callback with proper bytes transferred" 2014-04-09 00:11:15 +00:00
Jenkins
2998e96b9d Merge "update setup.py with pbr version" 2014-04-09 00:11:12 +00:00
Samuel Merritt
c2744caac4 Fix deprecation warning
Accessing BaseException.message spews a warning; we can get the same
information with str(err), which does not spew.

Change-Id: I67648d53d25522be074a78c44b3ce97dc27d1f07
2014-04-08 11:44:58 -07:00
Jenkins
7060355988 Merge "Unify backend logging" 2014-04-08 17:56:58 +00:00
John Dickinson
d47a582e74 update setup.py with pbr version
This file is normally updated in the standard "update from
global requirements" patch, but since those contain other
changes we don't want, the setup.py file never gets updated.

This patch updates setup.py to bring it in line with the
standard global requirements way of doing things without also
updating [test-]requirements.txt

Change-Id: Id0e4f8e17dd4c714b4d2dd75985431a9e12e6a4f
2014-04-08 10:26:40 -07:00
Jenkins
9e258ed9b5 Merge "Handle getting info on wrong database type" 2014-04-08 02:18:50 +00:00
anc
677ee3c931 Add missing constraints to /info
Two of the default constraints, max_header_size and
max_meta_overall_size, don't get registered for the
/info response by the proxy server.

Rather than adding them individually to the proxy's
register_swift_info call, this patch proposes to
register all the constraints for /info at once
using the constraints.EFFECTIVE_CONSTRAINTS dict.
Any future additions to default constraints will
then be automatically included in /info.

Change-Id: I5c10d4c8eda90ba94745b6f89df85aafbb50f8ef
2014-04-07 20:27:40 +01:00
Greg Lange
d32dc8d49c Unify backend logging
Make account, object, and container servers construct log lines using the
same utility function so they will produce identically formatted lines.

This change reorders the fields logged for the account server.

This change also adds the "additional info" field to the two servers that
didn't log that field.  This makes the log lines identical across all 3
servers.  If people don't like that, I can take that out.  I think it makes
the documentation, parsing of the log lines, and the code a tad cleaner.

DocImpact

Change-Id: I268dc0df9dd07afa5382592a28ea37b96c6c2f44
Closes-Bug: 1280955
2014-04-07 18:38:04 +00:00
Gil Vernik
b67a4b9938 Support for content-length in the upload object method for
internal client.

Internal client uses 'chunked' transfer encoding in it's
upload_object method. If content-length is known in advance,
internal_client should allowed to use content length in the
upload_object method and not the chunked method.

Change-Id: I68d2ebde78e01fa16b7187a2f045ea20f4310722
2014-04-07 09:56:03 +03:00
James Page
b9b5fef89a Set permissions on generated ring files
The use of NamedTemporaryFile creates rings with permissions 0600;
however most installs probably generate the rings as root but the
swift-proxy runs as user swift.

Set the permissions on the generated ring to 0644 prior to rename so
that the swift user can read the rings.

Change-Id: Ia511931f471c5c9840012c3a75b89c1f35b1b245
Closes-Bug: #1302700
2014-04-05 16:54:11 +01:00
Peter Portante
9d0067a0f5 Attempt to ensure connect always timesout
It seems that the test_connect_put_timeout() test does not always fail
when it is expected. Sometimes, not very often, the attempt to connect
succeeds, resulting in a failed test.

This might be because the fake-connection infrastructure uses a
sleep(0.1) and the test uses a connect timeout of 0.1. There might be a
case where the two values result in the exact time where the entries
happen to be added in the wrong order such that the sleep() completes
first before the connect timeout fires, where the connect completes
successfully.

Closes bug 1302781

Change-Id: Ie23e40cf294170eccdf0713e313f9a31a92f9071
2014-04-04 15:26:32 -04:00
Peter Portante
0e366aa922 Move module level setup under setup_package method
Perform all the package level test setup under the setup_package
method so that we only read the configuration file on disk when
functional tests are run. This let's us "play nice" with other tests.

Change-Id: I699d664bcef6754aac4ec6877830e745b764342f
2014-04-04 07:25:22 -04:00
Jenkins
48a2848785 Merge "Read the configuration once for all func tests" 2014-04-04 08:28:53 +00:00
gholt
bf292ae0cb Fixed error in container sync exc handling
If container sync got a non-ClientException and then a ClientException
during a get/put operation, it previously would break in the error
handling.

Change-Id: Ib2fa70270f3ec870bf60d5bbb3e8f514aeeb0927
2014-04-03 23:06:13 +00:00
Jenkins
bc67415b93 Merge "Only change collation for functional tests" 2014-04-03 20:53:06 +00:00
Jenkins
a1a9a2fa87 Merge "Rework use of constraints to ease testing" 2014-04-03 20:48:33 +00:00
Peter Portante
de020f0189 Handle getting info on wrong database type
Change-Id: I32f66f6a7683180a18a2807143d0910c75bf16f0
2014-04-03 15:56:25 -04:00
Jenkins
bd65514ed0 Merge "Clean up swift-{account, container}-info" 2014-04-03 19:54:52 +00:00
John Dickinson
eaf6815465 updates for 1.13.1 release
Change-Id: I9a84c476e8d370c3a5dbc24db77a7258d521013f
2014-04-03 09:11:47 -07:00
Yuan Zhou
39f5eab890 Clean up swift-{account, container}-info
Reuse common code; add unit tests; ensured coverage was at 100%.

Change-Id: Id6fcc7cb07fd178e00d43968e3e2cc03226fdc05
2014-04-03 09:54:58 -04:00
Peter Portante
44b39417ba Read the configuration once for all func tests
Merge the swift_testing module into the functional test module itself,
so that we can read the configuration once for all unit tests, sharing
the same constraints.

Change-Id: I9fbbfdade9adca329cd79f7d4291ba009327c842
2014-04-02 23:48:01 -04:00