6668 Commits

Author SHA1 Message Date
Romain LE DISEZ
420e73fabd Allow to configure the nameservers in cname_lookup
For various reasons, an operator might want to use specifics nameservers
instead of the systems ones to resolve CNAME in cname_lookup. This patch
creates a new configuration variable nameservers which accepts a list of
nameservers separated by commas. If not specified or empty, systems
namservers are used as previously.

Co-Authored-By: Tim Burke <tim.burke@gmail.com>
Change-Id: I34219e6ab7e45678c1a80ff76a1ac0730c64ddde
2017-06-01 14:02:08 -07:00
Jenkins
6fc45361c5 Merge "README: dedent the numbered list" 2017-06-01 20:54:20 +00:00
Jenkins
a6fb2076bb Merge "Rewrite redirection in cname_lookup & domain_remap" 2017-06-01 20:49:14 +00:00
Tim Burke
61bcd75971 README: dedent the numbered list
It looks funny otherwise.

Change-Id: Ib00872e050a2885e43085f907780bc9ff0d2b381
2017-06-01 18:15:24 +00:00
Jenkins
1b24b0eb7a Merge "Make probe tests work when policy-0 is EC" 2017-06-01 17:26:14 +00:00
Jenkins
f5ded0519c Merge "Trivial fix typos" 2017-06-01 03:09:01 +00:00
Tim Burke
f64fa46f3a Make probe tests work when policy-0 is EC
test_object_metadata_replication requires a replicated policy. We even
have it subclass ReplProbeTest, but then we hardcoded the policy index!
Stop doing that.

Change-Id: I8871cc0beceb0909abaf59babe40c3cafbcd0cc9
2017-05-31 17:07:39 -07:00
Jenkins
45b17d89c7 Merge "Fix SSYNC failing to replicate unexpired object" 2017-05-31 22:49:55 +00:00
Jenkins
db45e1dd69 Merge "Add structure to storage policy configuration guide" 2017-05-31 21:36:13 +00:00
Tim Burke
c34ac98c90 Stop having Sphinx treat warnings as errors
Warnings-as-errors breaks our docs gate currently, as the gate is using
an old liberasurecode. Stop treating warnings as errors until the gate
can be updated with a more-recent version.

Related-Change: I3985d027f0ac2119ceaeb4daba5964f937de6cea
Change-Id: I4869ec370f08e338be78d2c0f930106081f21a0a
2017-05-31 09:47:40 -07:00
Alistair Coles
37ba21face Add structure to storage policy configuration guide
The description of storage policy config options was
unstructured and repetitive. This patch attempts to
improve the doc by gathering the notes for each option
into a structured list.

Change-Id: I57090b35a70f365e82fb0e29ab42e533d6359a7b
2017-05-31 11:11:32 +01:00
Jenkins
b9322a2f08 Merge "Add link from policies overview to per-policy proxy-server conf" 2017-05-30 19:13:56 +00:00
Vu Cong Tuan
cf3c970a77 Trivial fix typos
Change-Id: I7e1e3b2f92183b2a249299659f0778fe838212e2
2017-05-30 14:26:23 +07:00
Alistair Coles
227cef9933 Add link from policies overview to per-policy proxy-server conf
- add proxy server per policy config as an optional
  step in the configuration of a policy, with link to
  the deployment guide

- add reverse link from deployment guide per-policy
  config doc section to storage policies docs

Drive-by fix an incorrect test comment

Change-Id: Ib95310193270a63c9d1e321c6e7de240e00b387f
Related-Change: I3f718f425f525baa80045ba067950c752bcaaefc
2017-05-26 10:41:35 +01:00
Tim Burke
d487bf7fb1 Remove tempauth docs from deployment guide
Instead, link to the middleware list and auth overview, as well as
referring readers to proxy-server.conf-sample

TempAuth-related content that was previously in the deployment guide has
been moved to TempAuth's own docs, which have been cleaned up a bit.

Change-Id: I00070bb09294362c069f7ee9426ac570bc1b3ddb
2017-05-25 12:35:46 -07:00
Jenkins
96de9ad126 Merge "Clean up how PatchPolicies works" 2017-05-25 09:20:52 +00:00
Jenkins
263dc8a3f3 Merge "Enable per policy proxy config options" 2017-05-25 06:34:48 +00:00
Jenkins
24e8789689 Merge "Small minor fixes for composite ring functionality" 2017-05-24 22:57:30 +00:00
Jenkins
6f7b1f9ee2 Merge "Use setUpModule instead of setup for module level unit test setup" 2017-05-24 21:29:09 +00:00
Alistair Coles
45884c1102 Enable per policy proxy config options
This is an alternative approach to that proposed in [1]

Adds support for optional per-policy config sections
to be added in proxy-server.conf. This is highly desirable
to allow per-policy affinity options to be set for use with
duplicated EC policies [2] and composite rings [3].

Certain options found in per-policy conf sections will
override their equivalents that may be set in the
[app:proxy-server] section. Currently the options
handled that way are:

  sorting_method
  read_affinity
  write_affinity
  write_affinity_node_count

For example:

  [proxy-server:policy:0]
  sorting_method = affinity
  read_affinity = r1=100
  write_affinity = r1
  write_affinity_node_count = 1 * replicas

The corresponding attributes of the proxy-server Application
are now available from instances of an OverrideConf object
that is obtained from Application.get_policy_options(policy).

[1] Related-Change: I9104fc789ba85ab3ab5ccd34096125b482821389
[2] Related-Change: Idd155401982a2c48110c30b480966a863f6bd305
[3] Related-Change: I0d8928b55020592f8e75321d1f7678688301d797

Co-Authored-By: Kota Tsuyuzaki <tsuyuzaki.kota@lab.ntt.co.jp>
Change-Id: I3f718f425f525baa80045ba067950c752bcaaefc
2017-05-23 20:22:30 +01:00
Tim Burke
1b991803e8 Clean up how PatchPolicies works
We've got these lovely __enter__ and __exit__ methods; let's use them!

Note that this also changes how we patch classes' setUp methods so we
don't set self._orig_POLICIES when the class is already patched.  I
hope this may fix some sporadic failures that include tracebacks
that look like

  proxy ERROR: ERROR 500 Traceback (most recent call last):
    File ".../swift/obj/server.py", line 1105, in __call__
      res = getattr(self, req.method)(req)
    File ".../swift/common/utils.py", line 1626, in _timing_stats
      resp = func(ctrl, *args, **kwargs)
    File ".../swift/obj/server.py", line 880, in GET
      policy=policy, frag_prefs=frag_prefs)
    File ".../swift/obj/server.py", line 211, in get_diskfile
      return self._diskfile_router[policy].get_diskfile(
    File ".../swift/obj/diskfile.py", line 555, in __getitem__
      return self.policy_to_manager[policy]
  KeyError: ECStoragePolicy(...)

... and try to unpatch more gracefully with TestCase.addCleanup

Change-Id: Iaa3d42ec21758b0707155878a645e665aa36696c
2017-05-19 17:59:36 -07:00
Jenkins
a2e020c52b Merge "Add read and write affinity options to deployment guide" 2017-05-19 19:05:33 +00:00
Alistair Coles
f02ec4de81 Add read and write affinity options to deployment guide
Add entries for these options in the deployment guide and
make the text in proxy-server.conf-sample and man page
consistent.

Change-Id: I5854ddb3e5864ddbeaf9ac2c930bfafdb47517c3
2017-05-18 10:42:44 -07:00
Jenkins
9089e44c0b Merge "Add Composite Ring Functionality" 2017-05-18 10:18:31 +00:00
Kota Tsuyuzaki
4dc985a1fa Small minor fixes for composite ring functionality
This is a follow up for https://review.openstack.org/#/c/441921
all of this patch is for minor fixes, I found in my self-review.

Change-Id: Ib3a1dc983c3da69dea592114e25a5047ec91a2b9
2017-05-18 01:48:14 -07:00
Tim Burke
582af7cd9d name_check: better test maximum_length
Previously, we were testing that a 254 (!?) character name would be valid
when the maximum configured is 500. Now we'll test that 500 character
names are valid.

While we're at it, stop patching self.test_check. It was unnecessary,
and we were doing it badly.

Change-Id: Ia604fa7b809a97fbce176c82606af73cdb92828c
2017-05-16 17:59:52 -07:00
Kota Tsuyuzaki
d40031b46f Add Composite Ring Functionality
* Adds a composite_builder module which provides the functionality to
  build a composite ring from a number of component ring builders.

* Add id to RingBuilder to differentiate rings in composite.
  A RingBuilder now gets a UUID when it is saved to file if
  it does not already have one. A RingBuilder loaded from
  file does NOT get a UUID assigned unless it was previously persisted in
  the file. This forces users to explicitly assign an id to
  existing ring builders by saving the state back to file.

  The UUID is included in first line of the output from:

    swift-ring-builder <builder-file>

Background:

This is another implementation for Composite Ring [1]
to enable better dispersion for global erasure coded cluster.

The most significant difference from the related-change [1] is that this
solution attempts to solve the problem as an offline tool rather than
dynamic compositing on the running servers. Due to the change, we gain
advantages such as:

- Less code and being simple
- No complex state validation on the running server
- Easy deployments with an offline tool

This patch does not provide a command line utility for managing
composite rings. The interface for such a tool is still under
discussion; this patch provides the enabling functionality first.

Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
Co-Authored-By: Alistair Coles <alistairncoles@gmail.com>

[1] Related-Change: I80ef36d3ac4d4b7c97a1d034b7fc8e0dc2214d16
Change-Id: I0d8928b55020592f8e75321d1f7678688301d797
2017-05-15 16:42:00 -07:00
Jenkins
6e893e2288 Merge "Drop unnecessary dereferencing" 2017-05-12 21:26:58 +00:00
Jenkins
4a19917827 Merge "Open-code eventlet.listen()" 2017-05-12 16:46:28 +00:00
Jenkins
145cfc3174 Merge "Fix domain_remap when obj starts/ends with slash" 2017-05-12 15:47:20 +00:00
Pete Zaitcev
cd2d359b02 Drop unnecessary dereferencing
The patch that introduced this (with my own help, no less),
also pasted these in tests, but someone else has already
cleaned that up.

Change-Id: I87c0a110831b5b5f75cb6fde1badec338f2150a9
2017-05-11 18:11:55 -06:00
Jenkins
1d09a02481 Merge "Remove links for EOLed releases" 2017-05-11 14:16:49 +00:00
Jenkins
7fd41f3db4 Merge "Update multi-node install links" 2017-05-11 14:01:20 +00:00
Tim Burke
3981e1ee8a Remove links for EOLed releases
Change-Id: If7e8526edf18b02474ba272451b9b4212558e03c
2017-05-11 13:57:10 +00:00
Romain LE DISEZ
107ba79770 Rewrite redirection in cname_lookup & domain_remap
cname_lookup and domain_remap are currently not catching redirections
(eg: staticweb). This behavior makes the domain to change when a call
through cname_lookup and domain_remap end up being redirected. Example:
commit fixes it.
 - original request: http://mysite.com/subdir
 - redirected:  http://cont.acct.storage.domain.com/v1/AUTH_acct/cont/subdir/
 - expected: http://mysite.com/subdir/

This patch is fixing this.

Closes-Bug: #1190625
Co-Authored-By: Tim Burke <tim.burke@gmail.com>
Change-Id: I67f642b8b070bc21e7760477d0a1e3b902ba7896
2017-05-11 09:46:29 -04:00
Clay Gerrard
37f6f25283 Update multi-node install links
... as is useful to do from time to time

Change-Id: I165899445080fa3a8e6dc624ab5a13680b819a73
2017-05-11 09:13:02 -04:00
Romain LE DISEZ
6db12b87ff Fix domain_remap when obj starts/ends with slash
domain_remap strip all starting/ending slashes. This behavior does not
allow to access objects starting or ending with slash. It is also
impacting staticweb middleware as staticweb tries to redirect
pseudo-directory to an URL with an ending slash, but as domain_remap
strip it, it goes to an infinite loop.

With this commit, the path of the request is passed as-is when
reconstructing the new request path. Example
http://www.example.com//obj/ was previously rewritten to
http://storage.example.com/v1/AUTH_abc/container/obj. It is now
rewritten to http://storage.example.com/v1/AUTH_abc/container//obj/

Closes-Bug: #1682293
Co-Authored-By: Christian Schwede <cschwede@redhat.com>
Change-Id: I1ef6b8752183d27103a3b0e720edcb4ce06fb837
2017-05-11 08:47:23 -04:00
Pete Zaitcev
5dfc3a75fb Open-code eventlet.listen()
Recently out gate started blowing up intermittently with a strange
case of ports mixed up. Sometimes a functional tests tries to
authorize on a port that's clearly an object server port, and
the like. As it turns out, eventlet developers added an unavoidable
SO_REUSEPORT into listen(), which makes listen(("localhost",0)
to reuse ports.

There's an issue about it:
 https://github.com/eventlet/eventlet/issues/411

This patch is working around the problem while eventlet people
consider the issue.

Change-Id: I67522909f96495a6a30e1acdb79835dce2189549
2017-05-11 01:39:14 -06:00
Jenkins
cd712cd144 Merge "Trivial fix typo and PEP 8 coding style violation" 2017-05-10 20:10:05 +00:00
Jenkins
1f36582efb Merge "Fix unit tests on i386 and other archs" 2017-05-10 19:58:45 +00:00
Jenkins
2abffb99b9 Merge "Fix sporadic failure in TestObjectController.test_container_update_async" 2017-05-10 14:51:35 +00:00
Ngo Quoc Cuong
cd50160191 Trivial fix typo and PEP 8 coding style violation
telemtry -> telemetry
PEP 8: line too long (81 > 79 characters)

Change-Id: I2f70f64a3a2cbf35e4a5250e1099f176670cb31f
2017-05-09 08:17:56 +07:00
Jenkins
7ebb2cdef7 Merge "Trivial fix typo while reading doc" 2017-05-06 10:17:18 +00:00
Jenkins
30898435b1 Merge "Stop including Connection header in EC GET responses" 2017-05-05 22:12:05 +00:00
Jenkins
7bbb80884d Merge "Add message to account-creation assertion" 2017-05-05 21:01:43 +00:00
Ngo Quoc Cuong
e23f8d3160 Trivial fix typo while reading doc
Change-Id: I9d96dd4464a086e508fbf18057b4f3e90c82c916
2017-05-05 23:06:14 +07:00
Tim Burke
50357de575 Fix sporadic failure in TestObjectController.test_container_update_async
Change-Id: Ie4d58626ebe97049703802a43c669cc78cf60f8b
Related-Change: I15f36e191cfe3ee6c82b4be56e8618ec0230e328
Closes-Bug: #1589994
2017-05-05 00:11:39 +00:00
Jenkins
4915a3a3f6 Merge "Remove the unused import code" 2017-05-04 20:33:28 +00:00
Tim Burke
4c8239503a Add message to account-creation assertion
We've seen some failures in the gate like

    ==============================
    Failed 1 tests - output below:
    ==============================

    setUpModule (test.functional.test_account)
    ------------------------------------------

    Captured traceback:
    ~~~~~~~~~~~~~~~~~~~
        Traceback (most recent call last):
          File "test/functional/test_account.py", line 33, in setUpModule
            tf.setup_package()
          File "test/functional/__init__.py", line 716, in setup_package
            mem_object_server if in_mem_obj else object_server))
          File "test/functional/__init__.py", line 621, in in_process_setup
            create_account(AUTH_test)
          File "test/functional/__init__.py", line 619, in create_account
            assert(resp.status == 201)
        AssertionError

...which aren't terribly useful in figuring out what went wrong.

Change-Id: I3cd31bb480dc8508828fe21416bfae33bc0985b7
2017-05-04 17:48:26 +00:00
Jenkins
dad1951ea8 Merge "Trivial fix for decrypter docstrings" 2017-05-04 13:45:03 +00:00