402 Commits

Author SHA1 Message Date
Nguyen Hung Phuong
edc413b85e Fix typos in Swift files
Change-Id: I39dbf55c094c42347b57ef67520abff9e6fc24bc
2016-04-07 13:33:20 +07:00
Anh Tran
2f7d0f4a2a Removing some redundant words
This patch removes some redundant words.

Change-Id: Ia79717664b06ed9a41c3c5dcf1a25e9e49e21cf2
2016-03-25 17:20:24 +07:00
Jenkins
4be3701805 Merge "Auditor will clean up stale rsync tempfiles" 2016-03-23 22:21:51 +00:00
Clay Gerrard
1d03803a85 Auditor will clean up stale rsync tempfiles
DiskFile already fills in the _ondisk_info attribute when it tries to open
a diskfile - even if the DiskFile's fileset is not valid or deleted.
During this process the rsync tempfiles would be discovered and logged,
but no-one would attempt to clean them up - even if they were really old.

Instead of logging and ignoring unexpected files when validate a DiskFile
fileset we'll add unexpected files to the unexpected key in the
_ondisk_info attribute.

With a little bit of re-organization in the auditor's object_audit method
to get things into a single return path we can add an unconditional check
for unexpected files and remove those that are "old enough".

Since the replicator will kill any rsync processes that are running longer
than the configured rsync_timeout we know that any rsync tempfiles older
than this can be deleted.

Split unlink_older_than in common.utils into two functions to allow an
explicit list of previously discovered paths to be passed in to avoid an
extra listdir.  Since the getmtime handling already ignores OSError
there's less concern of race condition where a previous discovered
unexpected file is reaped by rsync while we're attempting to clean it up.

Update some doc on the new config option.

Closes-Bug: #1554005

Change-Id: Id67681cb77f605e3491b8afcb9c69d769e154283
2016-03-23 19:34:34 +00:00
Jenkins
32847d2f48 Merge "Docs: Container sync does not require POST-as-COPY" 2016-03-23 17:08:26 +00:00
Alistair Coles
736de613f1 Docs: Container sync does not require POST-as-COPY
Updates docs to remove warnings that container sync only
works with object_post_as_copy=True. Since commit e91de49
container sync will also sync POST updates when using
object_post_as_copy=False.

Change-Id: I5cc3cc6e8f9ba2fef6f896f2b11d2a4e06825f7f
2016-03-22 11:36:32 +00:00
Jenkins
4eb57e971d Merge "Add concurrent reads option to proxy" 2016-03-18 23:11:04 +00:00
Jenkins
7cc2c783a4 Merge "Keystone middleware deprecated option is_admin removed" 2016-03-18 10:51:46 +00:00
Kota Tsuyuzaki
ecbcc94989 Fix ssync related object-server docs
Swift now uses SSYNC verb instead of old REPLICATION verb for ssync
protocol. This patch replaces all docs written as REPLICATION into
SSYNC and fix a few words for explanation.

Change-Id: I1253210d4f49749e7d425d6252dd262b650d9548
2016-03-16 08:58:31 +00:00
Matthew Oliver
f595a7e704 Add concurrent reads option to proxy
This change adds 2 new parameters to enable and control concurrent GETs
in swift, these are 'concurrent_gets' and 'concurrency_timeout'.

'concurrent_gets' allows you to turn on or off concurrent GETs, when
on it will set the GET/HEAD concurrency to replica count. And in the
case of EC HEADs it will set it to ndata.
The proxy will then serve only the first valid source to respond.
This applies to all account, container and object GETs except
for EC. For EC only HEAD requests are effected.

It achieves this by changing the request sending mechanism to using
GreenAsyncPile and green threads with a time out between each
request.

'concurrency_timeout' is related to concurrent_gets. And is the
amount of time to wait before firing the next thread. A value of 0
will fire at the same time (fully concurrent), setting another value
will stagger the firing allowing you the ability to give a node a
shorter chance to respond before firing the next. This value is a float
and should be somewhere between 0 and node_timeout. The default is
conn_timeout. Meaning by default it will stagger the firing.

DocImpact
Implements: blueprint concurrent-reads
Change-Id: I789d39472ec48b22415ff9d9821b1eefab7da867
2016-03-16 06:00:34 +00:00
Tim Burke
f581fccf71 By default, disallow inbound X-Timestamp headers
With the X-Timestamp validation added in commit e619411, end users
could upload objects with

    X-Timestamp: 9999999999.99999_ffffffffffffffff

(the maximum value) and Swift would be unable to delete them.

Now, inbound X-Timestamp headers will be moved to
X-Backend-Inbound-X-Timestamp, effectively rendering them harmless.

The primary reason to allow X-Timestamp before was to prevent
Last-Modified changes for objects coming from either:

  * container_sync or
  * a migration from another storage system.

To enable the former use-case, the container_sync middleware will now
translate X-Backend-Inbound-X-Timestamp headers back to X-Timestamp
after verifying the request.

Additionally, a new option is added to the gatekeeper filter config:

    # shunt_inbound_x_timestamp = true

To enable the latter use-case (or any other use-case not mentioned), set
this to false.

Upgrade Consideration
=====================

If your cluster workload requires that clients be allowed to specify
objects' X-Timestamp values, disable the shunt_inbound_x_timestamp
option before upgrading.

UpgradeImpact
Change-Id: I8799d5eb2ae9d795ba358bb422f69c70ee8ebd2c
2016-03-09 09:14:46 +00:00
Jenkins
1a69b14e7a Merge "Remove Erasure Coding beta status from docs" 2016-03-05 15:42:17 +00:00
Jenkins
f57b4c94bf Merge "Update parameters about authtoken middleware in proxy-server.conf.sample" 2016-03-04 14:45:23 +00:00
Christian Schwede
043fbca6d0 Remove Erasure Coding beta status from docs
This removes notes stating support for Erasure coding as beta. Questions
regarding the stability of EC are coming up regularly, and are often referring
to the docs that state EC as still in beta.

Besides this, a note marking statsd support as beta has been removed as well.

Change-Id: If4fb6a5c4cb741d42953db3cee8cb17a1d774e15
2016-03-04 14:27:23 +00:00
Takashi Kajinami
9dda1c9526 Update parameters about authtoken middleware in proxy-server.conf.sample
This patch replaces some configration parameters about authtoken
middleware in proxy-server.conf, which will be deprecated.

The following parameters are to be deprecated.
 auth_admin_prefix, auth_host, auth_port, auth_protocol,
 identity_uri, admin_token, admin_user, admin_password,
 admin_tenant_name

Change-Id: I373734933189c87c4094203b0752dd3762689034
2016-03-01 08:03:43 +09:00
Christian Schwede
e46d6b1725 Add note on using printable chars for swift_hash_path_suffix/prefix
Using unprintable characters for swift_hash_path_prefix/suffix might lead to
hard problems when parsing of these values changes, for example due to newer
Python versions or changes in the parsers itself. Let's avoid this and add a
note that deployers should use printable strings for these values.

Change-Id: I976982b753b6af831ab91d7190f50f8f15bf73bf
2016-02-17 20:47:53 +01:00
Jenkins
02fb983dc6 Merge "Removed unused parameter in server.py" 2016-02-12 00:39:57 +00:00
Ondřej Nový
335d58611d Keystone middleware deprecated option is_admin removed
It has been deprecated from Swift 1.8.0 (Grizzly)

Change-Id: Id6bc10c3e84262c0a9e6160a76af03c0ad363e9c
2016-02-11 10:52:47 +00:00
Jenkins
ca1a509979 Merge "Remove executable flag from sample config file" 2016-02-11 02:05:26 +00:00
root
bcada66b90 Removed unused parameter in server.py
The variable max_large_object_get_time is no longer used and was
removed to reflect the change.

Change-Id: I43051181dcb38245de6d13fab63876e83f46fc39
Closes-Bug: #1538834
2016-02-10 14:26:10 -06:00
gh159m
b5311f63db Removed default value for log_statsd_host
Multiple files and documents showed that log_statsd_host had
a default value, usually localhost.  This was incorrect, instead
setting a value for log_statsd_host enables statsd logging.

Removed any reference of log_statsd_host having a default value.

Also changed descriptions to show setting a value enables logging.

Change-Id: I3ca5c0e8b8e4981de3aa6db0c476072b5a59723d
Closes-Bug: #1542227
2016-02-10 10:36:59 -06:00
Christian Berendt
b98c1c60f9 Remove executable flag from sample config file
swift.conf-sample should not be executbale

Change-Id: I960058e2af10b43efc6324a7534d9a23c810e39a
2016-02-09 12:57:24 +00:00
Jenkins
b140d7d8b8 Merge "Changed EC backend from jerasure to liberasurecode in examples and docs" 2016-02-09 08:04:21 +00:00
Clay Gerrard
f27ad34e1d Document use-case for slow option
Change-Id: Iec4087a896a2277179e3720d802cca101fa7ad54
2016-02-02 16:10:47 -08:00
Ondřej Nový
16976a0f14 Changed EC backend from jerasure to liberasurecode in examples and docs
liberasurecode_rs_vand is build-in liberasurecode, so you don't need
another depedency libjerasure2.

liberasurecode_rs_vand is supported by pyeclib from 1.0.8
version, so bumping version up.

Closes-Bug: #1534325
Change-Id: If2d96875694df8fd48c5278395859aaa165cb566
2016-02-02 23:08:11 +01:00
Christian Schwede
ccdf4a9f30 Document slow option in etc/object-server.conf
Change-Id: Ic9940b0b830a468887878f7b0d7ca42c2cbbebd5
2016-02-02 09:39:32 +01:00
Jenkins
222649de45 Merge "Allow smaller segments in static large objects" 2016-01-23 06:13:26 +00:00
Jenkins
b46209e7a0 Merge "Allow to change auditor sleep interval in config" 2016-01-18 12:19:08 +00:00
Ondřej Nový
a4c2fe95ab Allow to change auditor sleep interval in config
Change-Id: Ic451c5e0b686509f8982ed1bf65a223a2d77b9a0
2016-01-14 12:52:52 +01:00
Clay Gerrard
3347646023 fixups for ipv6 memcache_servers docs
Change-Id: I20d91c1e276014eaf210fa9eb43788bc17f4e8df
2016-01-12 21:08:58 -08:00
Jenkins
d446035ec4 Merge "Add support for storage policies to have more than one name" 2015-12-23 00:45:59 +00:00
Bill Huber
0bcd7fd50e Update Erasure Coding Overview doc to remove Beta version
The major functionality of EC has been released for Liberty and
the beta version of the code has been removed since it is now
in production.

Change-Id: If60712045fb1af803093d6753fcd60434e637772
2015-12-18 11:43:12 -06:00
Jenkins
500f7e8d34 Merge "Unification of manpages and conf-samples (default values, etc)" 2015-12-11 03:20:52 +00:00
Catherine Northcott
211758f8cb Add support for storage policies to have more than one name
This patch alters storage_policy.py to allow storage policies
to have multiple names. Now users are able to add a number of
human-readable aliases for storage policies. Policies now have
a .name (the default name), .aliases (a string of comma
seperated aliases), and .aliases_list (a list of all human
readable names). Policies will always have an .aliases value
if no aliases are set it will contain the default name.
The policy docs and tests have been updated to reflect changes
and policy.get_policy_info has been altered to display the
name and aliases

Change-Id: I02967ca8d7c790595e5ee551581196aa64552eea
2015-12-10 14:47:23 +13:00
Samuel Merritt
7f636a5572 Allow smaller segments in static large objects
The addition of range support for SLO segments (commit 25d5e68)
required the range size to be at least the SLO minimum segment size
(default 1 MiB). However, if you're doing something like assembling a
video of short clips out of a larger one, then you might not need a
full 1 MiB.

The reason for the 1 MiB restriction was to protect Swift from
resource overconsumption. It takes CPU, RAM, and internal bandwidth to
connect to an object server, so it's much cheaper to serve a 10 GiB
SLO if it has 10 MiB segments than if it has 10 B segments.

Instead of a strict limit, now we apply ratelimiting to small
segments. The threshold for "small" is configurable and defaults to 1
MiB. SLO segments may now be as small as 1 byte.

If a client makes SLOs as before, it'll still be able to download the
objects as fast as Swift can serve them. However, a SLO with a lot of
small ranges or segments will be slowed down to avoid resource
overconsumption. This is similar to how DLOs work, except that DLOs
ratelimit *every* segment, not just small ones.

UpgradeImpact

For operators: if your cluster has enabled ratelimiting for SLO, you
will want to set rate_limit_under_size to a large number prior to
upgrade. This will preserve your existing behavior of ratelimiting all
SLO segments. 5368709123 is a good value, as that's 1 greater than the
default max object size. Alternately, hold down the 9 key until you
get bored.

If your cluster has not enabled ratelimiting for SLO (the default), no
action is needed.

Change-Id: Id1ff7742308ed816038a5c44ec548afa26612b95
2015-12-09 10:09:13 -08:00
John Dickinson
5eaa5543c7 add sample proxy pipeline for keystone integration
Change-Id: I4b4fd9179d0234f001940e215c97d40a2a6204cd
2015-11-30 10:47:19 -08:00
Peter Lisák
28c4b7310f Unification of manpages and conf-samples (default values, etc)
Change-Id: I47a3127ef698b4bd1537b1562901ee9c2b5924d4
2015-11-30 10:08:16 -08:00
Ondřej Nový
001dc25318 Missing log_name option added
Change-Id: If0224f346aa7372268115284c112e8f3a60a9be4
2015-11-15 11:26:06 +01:00
Alistair Coles
1a2b54fc0a Fix missing *-replicator conf sections in deployment guide
The doc for these sections was missing because of an rst error - the
source is there in rst file but didn't make it into the html output.

Add doc for per_diff and max_diffs in account and container doc sections.

Also, fix a bunch of other sphinx build errors and most of the warnings.

Change-Id: If9ed2619b2f92c6c65a94f41d8819db8726d3893
2015-10-23 14:58:38 +01:00
Romain LE DISEZ
71f6fd025e Allows to configure the rsync modules where the replicators will send data
Currently, the rsync module where the replicators send data is static. It
forbids administrators to set rsync configuration based on their current
deployment or needs.

As an example, the rsyncd configuration example encourages to set a connections
limit for the modules account, container and object. It permits to protect
devices from excessives parallels connections, because it would impact
performances.

On a server with many devices, it is tempting to increase this number
proportionally, but nothing guarantees that the distribution of the connections
will be balanced. In the worst scenario, a single device can receive all the
connections, which is a severe impact on performances.

This commit adds a new option named 'rsync_module' to the *-replicator sections
of the *-server configuration file. This configuration variable can be
extrapolated with device attributes like ip, port, device, zone, ... by using
the format {NAME}. eg:
    rsync_module = {replication_ip}::object_{device}

With this configuration, an administrators can solve the problem of connections
distribution by creating one module per device in rsyncd configuration.

The default values are backward compatible:
    {replication_ip}::account
    {replication_ip}::container
    {replication_ip}::object

Option vm_test_mode is deprecated by this commit, but backward compatibility is
maintained. The option is only effective when rsync_module is not set. In that
case, {replication_port} is appended to the default value of rsync_module.

Change-Id: Iad91df50dadbe96c921181797799b4444323ce2e
2015-09-07 08:00:18 +02:00
Jenkins
0279411c58 Merge "versioned writes middleware" 2015-08-10 17:37:49 +00:00
Thiago da Silva
035a411660 versioned writes middleware
Rewrite object versioning as middleware to simplify the PUT method
in the object controller.

The functionality remains basically the
same with the only major difference being the ability to now
version slo manifest files. dlo manifests are still not
supported as part of this patch.

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

DocImpact
Change-Id: Ie899290b3312e201979eafefb253d1a60b65b837
Signed-off-by: Thiago da Silva <thiago@redhat.com>
Signed-off-by: Prashanth Pai <ppai@redhat.com>
2015-08-07 14:11:32 -04:00
Zhao Lei
4ac1fea5d1 Fix some spelling typo in comments
s/overide/override for object-expirer.conf and sample.
s/automaticaly/automatically for swift/proxy/controllers/obj.py

Change-Id: Ife107c7a1005a5d4959288db50a7f8f33c522dd4
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
2015-08-07 22:21:37 +08:00
Jenkins
4e92d5e7b7 Merge "do container listing updates in another (green)thread" 2015-08-06 00:27:09 +00:00
Charles Hsu
f0d51882b9 Add extra_header_count to document and config.
Change-Id: Iec86b488d71553c295afe7098822ce2046df9546
2015-08-05 22:09:40 +08:00
Jenkins
e1683fdb2e Merge "Support keystone v3 domains in swift-dispersion" 2015-07-31 06:59:01 +00:00
Charles Hsu
345785837f Remove error_suppression_interval, error_suppression_limit options.
These two options is belong to proxy-server, not account-replicator.

Change-Id: Ie030ecffd213e56db32df77c69b847479d96308f
2015-07-29 22:25:44 -07:00
Falk Reimann
363a256e58 Support keystone v3 domains in swift-dispersion
This provides the capability to specify a project_name,
project_domain_name and user_domain_name in /etc/swift/dispersion.conf.
If this values are set in dispersion.conf they get populated to the
swift-client.  With this it is possible to have a specific dispersion
project specified, which is not the keystone default domain.  Changes
were applied to swift-dispersion-populate and swift-dispersion-report.
Relevant man pages, the example dispersion.conf and the admin guide were
updated accordingly.

DocImpact
Closes-Bug: #1468374

Change-Id: I0e716f8d281b4d0f510bc568bcee4a13fc480ff7
2015-07-24 13:40:24 -05:00
John Dickinson
2289137164 do container listing updates in another (green)thread
The actual server-side changes are simple. The tests are a different
matter. Many changes were needed to the object server tests to
handle the now-async calls to the container server. In an effort to
test this properly, some drive-by changes were made to improve tests.

I tested this patch by doing zero-byte object writes to one container
as fast as possible. Then I did it again while also saturating 2 of the
container replica's disks. The results are linked below.

https://gist.github.com/notmyname/2bb85acfd8fbc7fc312a

DocImpact

Change-Id: I737bd0af3f124a4ce3e0862a155e97c1f0ac3e52
2015-07-22 01:19:58 -07:00
Oshrit Feder
6cafd0a4c0 Fix Container Sync example
Container-sync realm uses cluster_ as a prefix to specify clusters'
names. At use, the prefix should not be included. Fixing the examples
and sample conf to make it clearer that only the name of the cluster
should be passed.

Change-Id: I2e521d86faffb59e1b45d3f039987ee023c5e939
2015-07-08 16:37:31 -07:00