923 Commits

Author SHA1 Message Date
Mahati Chamarthy
69f7be99a6 Move documented reclaim_age option to correct location
The reclaim_age is a DiskFile option, it doesn't make sense for two
different object services or nodes to use different values.

I also driveby cleanup the reclaim_age plumbing from get_hashes to
cleanup_ondisk_files since it's a method on the Manager and has access
to the configured reclaim_age.  This fixes a bug where finalize_put
wouldn't use the [DEFAULT]/object-server configured reclaim_age - which
is normally benign but leads to weird behavior on DELETE requests with
really small reclaim_age.

There's a couple of places in the replicator and reconstructor that
reach into their manager to borrow the reclaim_age when emptying out
the aborted PUTs that failed to cleanup their files in tmp - but that
timeout doesn't really need to be coupled with reclaim_age and that
method could have just as reasonably been implemented on the Manager.

UpgradeImpact: Previously the reclaim_age was documented to be
configurable in various object-* services config sections, but that did
not work correctly unless you also configured the option for the
object-server because of REPLICATE request rehash cleanup.  All object
services must use the same reclaim_age.  If you require a non-default
reclaim age it should be set in the [DEFAULT] section.  If there are
different non-default values, the greater should be used for all object
services and configured only in the [DEFAULT] section.

If you specify a reclaim_age value in any object related config you
should move it to *only* the [DEFAULT] section before you upgrade.  If
you configure a reclaim_age less that your consistency window you are
likely to be eaten by a Grue.

Closes-Bug: #1626296

Change-Id: I2b9189941ac29f6e3be69f76ff1c416315270916
Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
2017-01-13 03:10:47 +00:00
Mahati Chamarthy
fd6edf7bc5 Confirm receipt of SLO PUT with etag
With a multipart-manifest PUT request, if client sends the md5 of the
segments' etags, a 422 Unprocessable Entity response is returned. This
patch fixes that and confirms the etag

Change-Id: I4598a2a3f16ca8727bb07bbb6d8efcfcae777796
Closes-Bug: #1213200
Co-Authored-By: Tim Burke <tim@swiftstack.com>
2016-12-23 01:40:54 +05:30
Jenkins
c0640f8710 Merge "SLO: Make etag and size_bytes fully optional" 2016-12-13 23:02:27 +00:00
Jenkins
54d1e1bae8 Merge "tempurls with a prefix-based scope" 2016-12-13 01:58:16 +00:00
Tim Burke
7fb102dc5d SLO: Make etag and size_bytes fully optional
Previously, we still required that clients send "etag" and "size_bytes"
keys in their segment definitions. This was done as a way to guard
against typos leading to an accidental lack of verification.

However, typos should already be caught when we check for extra keys. As
a result, the only truly required key is "path".

Change-Id: Ie1d8691115f8c68b5a3f3b59317cdab59f9a3fca
2016-12-12 23:14:32 +00:00
Christopher Bartz
8333c4b36a tempurls with a prefix-based scope
The middleware now allows the usage of signatures with a prefix-based
scope. A prefix-based signature grants access to all objects which share
the same prefix. This avoids the creation of a large amount of signatures,
when a whole container or pseudofolder is shared.

Please see spec: https://review.openstack.org/#/c/199607/

Change-Id: I03b68eb74dae6196b5e63e711ef642ff7d2cfdc9
2016-12-12 12:17:12 +01:00
Alistair Coles
726eac9dfa line wrap overview_expiring_objects.rst
...and make it easier to read.

Change-Id: I54fee09e019d657e8040b9f5b4d69c6c814abd56
2016-12-08 16:55:41 +00:00
Jenkins
f0b3280e2b Merge "Add pip and virtualenv upgrade to development guidelines" 2016-12-05 07:44:21 +00:00
Jenkins
8ed8077a04 Merge "Add missing expirer recon metric to admin_guide" 2016-12-01 17:52:27 +00:00
Alistair Coles
463e22a314 Add missing expirer recon metric to admin_guide
Add expirer/object to recon metrics, which reports such as:

$ curl -s http://localhost:6010/recon/expirer/object
{"object_expiration_pass": 0.19765901565551758, "expired_last_pass": 1}

Change-Id: Ia9a171c09efebe5ad56c9de2952a8f29188c4970
2016-12-01 10:32:19 +00:00
Jenkins
b4fd962cad Merge "Add missing recon metrics to admin_guide" 2016-12-01 10:04:44 +00:00
Jenkins
f5143f5f2c Merge "Multi Swift - Multiple Swift clusters on same h/w" 2016-12-01 01:38:32 +00:00
Alistair Coles
fc24a2322d Add pip and virtualenv upgrade to development guidelines
Change [1] requires pip >= 7.0.1. In general, test
environments will need to have pip and virtualenv in line
with global requirements. Add a reference to the global
requirements rather than specifying versions that will
inevitably become stale.

Also adds inline literal markup to all occurences of "tox"
for consistency.

[1] Related-Change: I7c60be623b4340ee34ae1aa520f17b303348811d

Change-Id: I7730f22c594a3521973cb9ff264a7d50f2b86a1a
Depends-On: I45eee626713438af5fc676f2b5f636d7ec23f7be
2016-11-24 11:38:10 +00:00
donagh-mccabe
ba66871e28 Add note that tempauth is not intended for production
Change-Id: I77862c9f4a71e438ba4f3988b2a9803c674c3e03
2016-11-23 12:00:19 +00:00
Jenkins
0873b7c03e Merge "Document access control lists (ACLs)" 2016-11-23 01:43:13 +00:00
Tim Burke
e8a5448b07 Add X-Openstack-Request-Id to Access-Control-Expose-Headers
Change-Id: Ib95a693042f0b3cf204033eb5957660cb3573dcf
Related-Change: I56cd4738808b99c0a08463f83c100be51a62db05
2016-11-16 12:39:12 -08:00
Donagh McCabe
c0fdc53b49 Document access control lists (ACLs)
Documents the syntax and meaning of container ACLs. Account ACLs
were already pretty well documented. However the account
ACL text was moved as part of this change.

TempAuth and keystoneauth have diffent ACLs. However, I decided
to describe both in one section/table because there are many
"examples" of ACLs in other documents, and it's better that
someone coming here from those sources become aware that the
specific ACL might not apply to them. In addition, the
referrer and .rlistings is common to both.

Some changes were also made to the api-ref document. The doc
and api-ref documents are published as seperate documents, so
the cross references from the api-ref section will not work
until this patch merges and the documents are rebuilt.

Change-Id: Icd2d6c278050c263b833ae76545c041f54fae68d
2016-11-08 14:17:24 +00:00
Nandini Tata
f584bb6c15 Multi Swift - Multiple Swift clusters on same h/w
Bash scripts to spin up multiple Swift clusters sharing the same
hardware and OS. Please refer to the  README of the repo for more
context

Change-Id: I4473088baf3c72baa03d6905a1ca6a65a740a4f4
2016-11-04 14:17:32 +00:00
karen chan
d0fe922904 Mirror X-Trans-Id to X-Openstack-Request-Id
Many other OpenStack services use a `[X-]OpenStack-Request-Id` header
to return a unique identifier for the request.  Swift will now return
`X-Trans-Id` as well as `X-Openstack-Request-Id`.

Change-Id: I56cd4738808b99c0a08463f83c100be51a62db05
Closes-Bug: #1572786
2016-10-30 20:02:39 -07:00
Jenkins
ae24c802a9 Merge "Set owner of drive-audit recon cache to swift user" 2016-10-27 13:26:25 +00:00
Jenkins
27ca0fb2a8 Merge "Add links for more detailed overview in overview_architecture" 2016-10-25 09:34:23 +00:00
Hanxi Liu
c3bc9f31ca Add links for more detailed overview in overview_architecture
Change-Id: Ie1f171d0945e3f1f4daa61bc66786c01e68e9a0a
2016-10-23 12:13:57 +00:00
Ondřej Nový
9847796f01 Set owner of drive-audit recon cache to swift user
Fixies this problem:
* swift-drive-audit needs to be run by root, because only root have
  "umount" permission
* swift-object servers typically runs as user swift
* if swift-drive-audit is run by root, /var/cache/swift/drive.recon is
  owned by root, with 0o600
* recon middleware (inside swift-object-server) can't read this cache
  file: swift-object: Error reading recon cache file

This patch adds "user" option to drive-audit config file. Recon cache
is chowned to this user.

Change-Id: Ibf20543ee690b7c5a37fabd1540fd5c0c7b638c9
2016-10-19 17:16:42 +00:00
Nandini Tata
c3bc83013f SAIO install bash scripts for a novice install
Added SAIO bash scripts as an option under developer tools. They are
well commented and simple to understand for a novice developer.

Change-Id: Id1b2babe420f4d10e564256fac5a54b60659c5e5
Co-Authored-By: Paul Dardeau <paul.dardeau@intel.com>
2016-10-13 18:09:30 +00:00
Alistair Coles
b13b49a27c EC - eliminate .durable files
Instead of using a separate .durable file to indicate
the durable status of a .data file, rename the .data
to include a durable marker in the filename. This saves
one inode for every EC fragment archive.

An EC policy PUT will, as before, first rename a temp
file to:

   <timestamp>#<frag_index>.data

but now, when the object is committed, that file will be
renamed:

   <timestamp>#<frag_index>#d.data

with the '#d' suffix marking the data file as durable.

Diskfile suffix hashing returns the same result when the
new durable-data filename or the legacy durable file is
found in an object directory. A fragment archive that has
been created on an upgraded object server will therefore
appear to be in the same state, as far as the consistency
engine is concerned, as the same fragment archive created
on an older object server.

Since legacy .durable files will still exist in deployed
clusters, many of the unit tests scenarios have been
duplicated for both new durable-data filenames and legacy
durable files.

Change-Id: I6f1f62d47be0b0ac7919888c77480a636f11f607
2016-10-10 18:11:02 +01:00
Jenkins
6daa382c34 Merge "Revises 'url' to 'URL' and 'json' to 'JSON'" 2016-10-06 00:23:41 +00:00
Luong Anh Tuan
53aebba903 Fix a typo in documentation
remove redundant 'this'

Change-Id: I8860190d882b255a3d416de685f930d2b2c0ad17
2016-10-04 10:07:10 +07:00
Jenkins
85ac109012 Merge "fix word spelling mistake" 2016-09-30 15:05:46 +00:00
Yushiro FURUKAWA
9b98c89983 Revises 'url' to 'URL' and 'json' to 'JSON'
Change-Id: I44743fbb9bcbce3a50ed6770264ba0f4b17803d7
2016-09-30 22:21:03 +09:00
zheng yin
05642d2958 fix word spelling mistake
Change-Id: Ia7b03e52b8d6a334fc2b67c94912effe0e659941
2016-09-30 16:43:54 +08:00
Jenkins
7c8b549ab9 Merge "Py3: Fixes eventlet ImportError: No module named urllib2" 2016-09-30 05:39:48 +00:00
Jenkins
23c2d69ee1 Merge "Add more comment to authtoken sample options" 2016-09-30 04:21:18 +00:00
Ha Van Tu
31c92ac6db Update link reference in Swift document
The reference link for REST API [1] is out of date. We should change
it to the new one [2].

[1]:http://developer.openstack.org/api-ref-objectstorage-v1.html
[2]:http://developer.openstack.org/api-ref/object-storage/

Change-Id: Ib3e5a78ec2df0591f862671272f51ace5ac65ca7
2016-09-27 11:52:41 +07:00
Tim Burke
60a2fe0ba8 Use separate headers for versioned_writes' stack and history modes
Now, instead of saying

   X-Versions-Location: <container>
   X-Versions-Mode: history

clients should just say

   X-History-Location: <container>

Since we've never had a release featuring a user-settable
X-Versions-Mode header, support may be dropped and that is now ignored.

Change-Id: Icfd0f481d4e40dd5375c737190aea7ee8dbc3bf9
2016-09-21 16:42:27 -07:00
Alistair Coles
18bb99971f Add more comment to authtoken sample options
Prior to the Mitaka release the install guides showed
services (including Swift) being in a default Keystone
domain which existed by default and has id=default. This
domain id is reflected in the proxy-server.conf-sample
authtoken options and also shown in man page and auth docs.

The Mitaka install guide shows a domain with *name* default
being created, and having a random UUID assigned, in which
services are created. This has caused confusion (see
discussion on linked bug report).

This patch does not change the sample options but does
add to the comments in order to emphasize that a user
may need to alter the options to match their Keystone
configuration.

Change-Id: I17bfcdbd983402eeb561bb704b8b1f1e27547c7d
Partial-Bug: #1604674
2016-09-21 15:48:11 +01:00
Jenkins
5126cc844a Merge "Enable object server to return non-durable data" 2016-09-16 22:11:36 +00:00
Alistair Coles
44a861787a Enable object server to return non-durable data
This patch improves EC GET response handling:

- The proxy no longer requires all object servers to have a
  durable file for the fragment archive that they return in
  response to a GET. The proxy will now be satisfied if just
  one object server has a durable file at the same timestamp
  as fragments from other object servers.

  This means that the proxy can now successfully GET an
  object that had missing durable files when it was PUT.

- The proxy will now ensure that it has a quorum of *unique*
  fragment indexes from object servers before considering a
  GET to be successful.

- The proxy is now able to fetch multiple fragment archives
  having different indexes from the same node. This enables
  the proxy to successfully GET an object that has some
  fragments that have landed on the same node, for example
  after a rebalance.

This new behavior is facilitated by an exchange of new
headers on a GET request and response between the proxy and
object servers.

An object server now includes with a GET (or HEAD) response:

- X-Backend-Fragments: the value of this describes all
  fragment archive indexes that the server has for the
  object by encoding a map of the form: timestamp -> <list
  of fragment indexes>

- X-Backend-Durable-Timestamp: the value of this is the
  internal form of the timestamp of the newest durable file
  that was found, if any.

- X-Backend-Data-Timestamp: the value of this is the
  internal form of the timestamp of the data file that was
  used to construct the diskfile.

A proxy server now includes with a GET request:

- X-Backend-Fragment-Preferences: the value of this
  describes the proxy's current preference with respect to
  those fragments that it would have object servers
  return. It encodes a list of timestamp, and for each
  timestamp a list of fragment indexes that the proxy does
  NOT require (because it already has them).

  The presence of a X-Backend-Fragment-Preferences header
  (even one with an empty list as its value) will cause the
  object server to search for the most appropriate fragment
  to return, disregarding the existence or not of any
  durable file. The object server assumes that the proxy
  knows best.

Closes-Bug: 1469094
Closes-Bug: 1484598

Change-Id: I2310981fd1c4622ff5d1a739cbcc59637ffe3fc3
Co-Authored-By: Paul Luse <paul.e.luse@intel.com>
Co-Authored-By: Clay Gerrard <clay.gerrard@gmail.com>
2016-09-16 11:40:14 +01:00
Ha Van Tu
acb8971c76 Update link reference
This patch update the outdated link reference inside the doc.

Change-Id: I9c5aabe869226489f361ff637e9dec731bbc3d7d
2016-09-15 14:33:32 +07:00
Jenkins
4b4ef8d15d Merge "Make container sync copy SLO manifests" 2016-09-14 20:33:28 +00:00
Alistair Coles
f679ed0cc8 Make container sync copy SLO manifests
Currently the container sync daemon fails to copy
an SLO manifest, and the error will stall progress
of the sync process on that container. There are
several reasons why the sync of an SLO manifest
may fail:

1. The GET of the manifest from the source
   container returns an X-Static-Large-Object header
   that is not allowed to be included with a PUT
   to the destination container.

2. The format of the manifest object that is read
   from the source is not in the syntax required
   for a SLO manifest PUT.

3. Assuming 2 were fixed, the PUT of the manifest
   includes an ETag header which will not match the
   md5 of the manifest generated by the receiving
   proxy's SLO middleware.

4. If the manifest is being synced to a different
   account and/or cluster, then the SLO segments may
   not have been synced and so the validation of the
   PUT manifest will fail.

This patch addresses all of these obstacles by
enabling the destination container-sync middleware to
cause the SLO middleware to be bypassed by setting a
swift.slo_override flag in the request environ. This
flag is only set for request that have been validated
as originating from a container sync peer.

This is justifed by noting that a SLO manifest PUT from
a container sync peer can be assumed to have valid syntax
because it was already been validated when written to
the source container.

Furthermore, we must allow SLO manifests to be synced
without requiring the semantic of their content to be
re-validated because we have no way to enforce or check
that segments have been synced prior to the manifest, nor
to check that the semantic of the manifest is still valid
at the source.

This does mean that GETs to synced SLO manifests may fail
if segments have not been synced. This is however
consistent with the expectation for synced DLO manifests
and indeed for the source SLO manifest if segments have
been deleted since it was written.

Co-Authored-By: Oshrit Feder <oshritf@il.ibm.com>
Change-Id: I8d503419b7996721a671ed6b2795224775a7d8c6
Closes-Bug: #1605597
2016-09-14 13:32:00 +01:00
Jenkins
d5e484e692 Merge "Add troubleshooting tips to keystoneauth docs" 2016-09-12 03:15:47 +00:00
Jenkins
7b9e2d27ea Merge "Allow DLO manifest to be updated when using post-as-copy" 2016-09-08 15:09:27 +00:00
Alistair Coles
ee11955d3e Add troubleshooting tips to keystoneauth docs
Documents two common mistakes that are made when
deploying Swift with Keystone auth.

Change-Id: Id81af09d1d21b5c8a3871bf0e20fe6c1448d0ad9
2016-09-07 17:54:36 +01:00
Lokesh S
eea574a78a Py3: Fixes eventlet ImportError: No module named urllib2
Python3:
from eventlet.green.urllib import request
Python2:
from eventlet.green import urllib2

Change-Id: Ib38865e0b6a8f076b8a54de4fae221d49f315c91
2016-09-07 09:04:30 +00:00
Christian Schwede
c9488027cb Make versioned_writes docstring more precise
Add a note to the docstring that it is required to add a config section
to the proxy-server.conf and an entry to the pipeline to support history
mode.

Closes-Bug: 1619261
Change-Id: I888485ab4ece6f47db081a4d58c1aab24ce72a8a
2016-09-01 12:02:21 +00:00
Jenkins
9d08d17b4f Merge "Add "history" mode to versioned_writes middleware" 2016-08-26 08:33:45 +00:00
Jenkins
714384a716 Merge "Add Pros/Cons docs for global cluster consideration" 2016-08-25 00:38:47 +00:00
Janie Richling
06ff865d19 Allow DLO manifest to be updated when using post-as-copy
Currently when using fast-post, the manifest is updated with the given
'x-object-manifest' header on a POST.  If no such header is supplied,
then the manifest will change to a regular object.
This is not currently true when using post-as-copy.

This patch changes the DLO POST using post-as-copy behavior to match
that of using fast-post.  It was also documented that
'x-object-manifest' must be provided on a POST to a manifest file.

Change-Id: Ie1143ab1a2c8f8c21e258a36badbff5d947769d4
Closes-bug: 1612991
2016-08-21 00:09:09 -05:00
Jenkins
5e0178d75b Merge "Documantation enhancements of nice/ionice feature" 2016-08-19 08:36:40 +00:00
Peter Lisák
8bf2233b40 Documantation enhancements of nice/ionice feature
Based on comments from patch #238799.

Change-Id: I9455cf6dc7fd12fee62439ff3c5f3255287ab1be
2016-08-19 07:39:49 +02:00