10 Commits

Author SHA1 Message Date
Andreas Jaeger
96b56519bf Update hacking for Python3
The repo is Python using both Python 2 and 3 now, so update hacking to
version 2.0 which supports Python 2 and 3. Note that latest hacking
release 3.0 only supports version 3.

Fix problems found.

Remove hacking and friends from lower-constraints, they are not needed
for installation.

Change-Id: I9bd913ee1b32ba1566c420973723296766d1812f
2020-04-03 21:21:07 +02:00
Clay Gerrard
698717d886 Allow internal clients to use reserved namespace
Reserve the namespace starting with the NULL byte for internal
use-cases.  Backend services will allow path names to include the NULL
byte in urls and validate names in the reserved namespace.  Database
services will filter all names starting with the NULL byte from
responses unless the request includes the header:

    X-Backend-Allow-Reserved-Names: true

The proxy server will not allow path names to include the NULL byte in
urls unless a middlware has set the X-Backend-Allow-Reserved-Names
header.  Middlewares can use the reserved namespace to create objects
and containers that can not be directly manipulated by clients.  Any
objects and bytes created in the reserved namespace will be aggregated
to the user's account totals.

When deploying internal proxys developers and operators may configure
the gatekeeper middleware to translate the X-Allow-Reserved-Names header
to the Backend header so they can manipulate the reserved namespace
directly through the normal API.

UpgradeImpact: it's not safe to rollback from this change

Change-Id: If912f71d8b0d03369680374e8233da85d8d38f85
2019-11-27 11:22:00 -06:00
Kota Tsuyuzaki
b7b77c7aa3 Follow up delayed reap probe test
This is a follow up patch for https://review.openstack.org/#/c/321041

This patch includes following items:

- Move test_sync to below _verify_account_reaped to be the actual tests
  as a bunch
- Change the test name fron "test_sync" to "test_reap" to clarify the
  purpose
- Fix a typo from "Object" to "Container" for an error message

Change-Id: I51bc01113056e2eb99f731d38e9f1c7a6c5c96be
2016-08-18 14:08:56 +01:00
Doron Chen
44ba3c310a Added a test for delayed reap.
The test schedules a 3-second delayed account reaping.
The test checks that no reaping after an immediate reap, and that full reaping
occurs 3 seconds later.

Change-Id: I0ab954ed3c59d808f32d84dc53fd512fd0a651be
2016-08-10 09:30:43 +03:00
Bill Huber
239e94e625 pep8 fix: assertEquals -> assertEqual
assertEquals is deprecated in py3 in the following dir:
test/probe/*

Change-Id: Ie08dd7a8a6c48e3452dfe4f2b41676330ce455d5
2015-08-06 09:28:51 -05:00
Alistair Coles
38ae7bb89c Make the reaper use same timestamp for replica deletes
The account reaper is using a unique timestamp when deleting
replicas of the same resource. This will result in unnecessary
replication traffic after reaping.

This patch makes the reaper use a single timestamp per resource.

Probe test is modified to check that delete times are equal
across replicas before replicators run.

test_direct_client.py is modified to check that it uses explicit
timestamp when passed to direct_delete_[object|container]
methods.

Drive-by bug fixes in the probe test e.g. it was not sending
X-Backend-Storage-Policy-Index when doing a direct GET to check
object state, so the 404s being verified could in fact be due
to diskfile not existing rather than diskfile being deleted.

Closes-Bug: 1442879
Change-Id: I8bab22d66308bb9d3294e1e0def017c784228423
2015-04-16 14:34:02 +01:00
Leah Klearman
ca0fce8542 more probe test refactoring
* move get_to_final_state into ProbeTest
* get rid of kill_servers
* add replicators manager and updaters manager to ProbeTest

(this is all going someplace, i promise)

Change-Id: I8393a2ebc0d04051cae48cc3c49580f70818dbf2
2015-02-13 16:55:45 -08:00
Leah Klearman
2c1b5af062 refactor probe tests
* refactor probe tests to use probe.common.ProbeTest
* move reset_environment functionality to ProbeTest.setUp()
* choose rings and policies that meet the criteria - raise SkipTest if
nothing matches
* replace all AssertionErrors in setup with SkipTest

Change-Id: Id56c497d58083f5fd55f5283cdd346840df039d3
2015-02-12 11:30:21 -08:00
Alistair Coles
22b65846aa Make probe tests tolerate deprecated policies
A deprecated policy in swift.conf causes errors in
probe tests that may attempt to use that policy.

This patch introduces a list ENABLED_POLICIES in
test/probe/common.py and changes probe tests to only
use policies contained in that list.

Change-Id: Ie65477c15d631fcfc3a4a5772fbe6d7d171b22b0
2014-09-09 13:09:37 +01:00
Paul Luse
2e1ea825aa Add Storage Policy support to the Account Reaper
Extract X-Storage-Policy-Index header from container listing request
and use it when making direct object DELETE requests.

DocImpact
Implements: blueprint storage-policies
Change-Id: Icd4b2611b4169e46f216ff9a9839af732971a2bf
2014-06-18 21:09:54 -07:00