657 Commits

Author SHA1 Message Date
Bill Huber
530102ae07 Update EC Support on how to build an EC ring with replicas count
This doc is being updated to specify the replicas count parameter
to build an EC ring that enforces both data and parity placements
for each partition.

Change-Id: I770ad268e4017e610be3357e89b89f0b7d3c18af
Closes-Bug: 1487203
2015-09-15 09:40:39 +01:00
Jenkins
63ab40db9a Merge "Improving statistics sent to Graphite." 2015-09-09 07:12:01 +00:00
Emett Speer
e4542455c8 [Labs] Update links to Cloud Admin Guide
Update links to the Cloud Admin Guide after the
RST conversion of that book altered URLs.

Change-Id: I899f8938498b744e62887968a65e58c00ef27f1b
2015-09-02 17:42:31 -07:00
Brian Cline
615c7a204b Adds useful dispersion info from changelog
Change-Id: I1a45088fc32620b02ff9a754b02ec1eb75a59d6e
2015-09-01 10:51:20 -05:00
Jenkins
e354f897c3 Merge "Add container sync probe test to SAIO default set" 2015-08-25 20:25:01 +00:00
Jenkins
e8b0461a34 Merge "New troubleshooting case in documentation." 2015-08-25 08:10:55 +00:00
Jenkins
2d41ff7b45 Merge "Enable Object Replicator's failure count in recon" 2015-08-24 07:32:08 +00:00
Eran Rom
69e7424d3c Add container sync probe test to SAIO default set
SAIO Configuration and documentation changes enabling to run the
container sync probe test by default

Change-Id: Iccf59533d0d4fe72549d318339ab125d04dde006
Related-Bug: #1476623
2015-08-22 22:50:50 +03:00
Carlos Cavanna
a1ceab5a92 New troubleshooting case in documentation.
Added a new troubleshooting case for the "First Contribution to Swift"
documentation page.

Change-Id: I182ba702b49b28409fe56becae93326e5f63dcd0
2015-08-21 14:14:31 -04:00
Carlos Cavanna
4765189ef3 Improving statistics sent to Graphite.
Currently, statistics are organized by command. However, it would also be
useful to display statistics organized by policy. Different policies may be
based on different storage properties (ie, faster disks).
With this change, all the statistics for object timers will be sent per policy
as well.
Policy statistics reporting will use policy index and the name in Graphite will
show as proxy-server.object.policy.<policy-index>.<verb>, etc.
Updated unit tests for per-policy stat reporting and added new unit tests for
invalid cases.
Updated documentation in the Administrator's Guide to reflect this new
aggregation.

Change-Id: Id70491e4833791a3fb8ff385953d69018514cd9c
2015-08-21 13:45:00 -04:00
Hamdi Roumani
1a81cda8b7 Doc instructions for post rebase steps
Improve the 'first_contribution_swift' by adding instructions for how to
rebuild swift following a rebase.

Change-Id: If5c91dc4e1e8d1712bbd8b326c675967fb4b8c15
2015-08-18 00:03:10 -04:00
Hisashi Osanai
79ba4a8598 Enable Object Replicator's failure count in recon
This patch makes the count of object replication failure in recon.
And "failure_nodes" is added to Account Replicator and
Container Replicator.

Recon shows the count of object repliction failure as follows:
$ curl http://<ip>:<port>/recon/replication/object
{
    "replication_last": 1416334368.60865,
    "replication_stats": {
        "attempted": 13346,
        "failure": 870,
	"failure_nodes": {
            "192.168.0.1": {"sdb1": 3},
            "192.168.0.2": {"sdb1": 851,
                            "sdc1": 1,
                            "sdd1": 8},
            "192.168.0.3": {"sdb1": 3,
                            "sdc1": 4}
	},
        "hashmatch": 0,
        "remove": 0,
        "rsync": 0,
        "start": 1416354240.9761429,
        "success": 1908
    },
    "replication_time": 2316.5563162644703,
    "object_replication_last": 1416334368.60865,
    "object_replication_time": 2316.5563162644703
}

Note that 'object_replication_last' and 'object_replication_time' are
considered to be transitional and will be removed in the subsequent
releases. Use 'replication_last' and 'replication_time' instead.

Additionaly this patch adds the count in swift-recon and it will be
showed as follows:
$ swift-recon object -r
========================================================================
=======
--> Starting reconnaissance on 4 hosts
========================================================================
=======
[2014-11-27 16:14:09] Checking on replication
[replication_failure] low: 0, high: 0, avg: 0.0, total: 0, Failed: 0.0%,
no_result: 0, reported: 4
[replication_success] low: 3, high: 3, avg: 3.0, total: 12,
Failed: 0.0%, no_result: 0, reported: 4
[replication_time] low: 0, high: 0, avg: 0.0, total: 0, Failed: 0.0%,
no_result: 0, reported: 4
[replication_attempted] low: 1, high: 1, avg: 1.0, total: 4,
Failed: 0.0%, no_result: 0, reported: 4
Oldest completion was 2014-11-27 16:09:45 (4 minutes ago) by
192.168.0.4:6002.
Most recent completion was 2014-11-27 16:14:19 (-10 seconds ago) by
192.168.0.1:6002.
========================================================================
=======

In case there is a cluster which has servers, a server runs with this
patch and the other servers run without this patch. If swift-recon
executes on the server which runs with this patch, there are unnecessary
information on the output such as [failure], [success] and [attempted].
Because other servers which run without this patch are not able to
send a response with information that this patch needs.
Therefore once you apply this patch, you also apply this patch to other
servers before you execute swift-recon.

DocImpact
Change-Id: Iecd33655ae2568482833131f422679996c374d78
Co-Authored-By: Kenichiro Matsuda <matsuda_kenichi@jp.fujitsu.com>
Co-Authored-By: Brian Cline <bcline@softlayer.com>
Implements: blueprint enable-object-replication-failure-in-recon
2015-08-18 11:40:02 +09:00
Jenkins
617c6b0107 Merge "Time synchronization check in recon." 2015-08-18 01:21:22 +00:00
Jenkins
57791b6cd2 Merge "+Document method to avoid rsync filling root drive" 2015-08-11 08:27:17 +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
Jenkins
757bf13b0a Merge "Having said H, I, J, we ought to say K" 2015-08-06 05:56:40 +00:00
Jenkins
4e92d5e7b7 Merge "do container listing updates in another (green)thread" 2015-08-06 00:27:09 +00:00
Pete Zaitcev
652f0f9da4 Having said H, I, J, we ought to say K
In the long run, we might want to stop these updates. But this
decision is above my pay grade.

Change-Id: I335558e1da8052be1b215fbad51244b47af3d81b
2015-08-05 15:33:29 -06:00
Ben Martin
89f5906286 +Document method to avoid rsync filling root drive
When rsync pushes to a remote node with an unmounted drive and if
certain steps are not taken, rsync may attempt to write files to
the local drive at the location where the drive was mounted.

There are two suggested solutions for this issue:
  1) Set the permissions for all mount points in /srv/node/
       to root:root 755
  2) Mount the drives elsewhere and symlink the drives to /srv/.../

The first method ensures that only root and not the swift user
can write in the /srv/.../ directories.

The second method will prompt a broken link issue if rsync
attempts to write to an unmounted drive.

Change-Id: I60ce4ed9ef8401768d5f78b6806cbb2e2a65303e
Closes-Bug: #1470576
2015-08-05 09:29:07 -05: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
Carlos Cavanna
5a7383313b Swift documentation for first-time contributors.
In this change, there are proposed improvement to Swift documentation aimed at
first-time contributors. They include a simplification of the Getting
Started page and a new page with some basic instructions/commands that the
first-time contributor should know. In addition, it shows some common errors
that the first-time contributor may find when executing git rebase and
information on how to track your changes.

Change-Id: I704202955093736b2f3b4102a649690a0392c6b0
2015-07-29 21:40:28 -07:00
Jenkins
f244caf794 Merge "Updated tox setup instructions on Development Guidelines" 2015-07-28 10:28:08 +00: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
Atsushi SAKAI
964869accc Fix six typos on swift documentation
mechanisim => mechanism
    http://docs.openstack.org/developer/swift/cors.html
overridde => override
   http://docs.openstack.org/developer/swift/deployment_guide.html
extentsions => extensions
  http://docs.openstack.org/developer/swift/development_ondisk_backends.html
reuqest => request
  http://docs.openstack.org/developer/swift/logs.html
suport => support
  http://docs.openstack.org/developer/swift/overview_architecture.html
mininum => minimum
  http://docs.openstack.org/developer/swift/overview_erasure_code.html

$ git diff | diffstat
 cors.rst | 2 +-
 deployment_guide.rst | 2 +-
 development_ondisk_backends.rst | 2 +-
 logs.rst | 2 +-
 overview_architecture.rst | 2 +-
 overview_erasure_code.rst | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

Change-Id: I8e095f4c216b2cfae48dff1e17d387048349f73c
Closes-Bug: #1477877
2015-07-24 17:11:49 +09:00
Ondrej Novy
dd2f1be3b1 Time synchronization check in recon.
This change add call time to recon middleware and param --time to
recon CLI. This is usefull for checking if time in cluster is
synchronized.

Change-Id: I62373e681f64d0bd71f4aeb287953dd3b2ea5662
2015-07-23 11:35:02 +02:00
Hamdi Roumani
f563a423bf Updated tox setup instructions on Development Guidelines
The instructions suggest updating the ownership of the swift.egg-info
directory may be required and provide a cmd to do so.  Said cmd assumes user
'swift' exists, but tox will require the current user to have access to the
directory to perform updates, moreover user swift may not exist at all.

Change-Id: I63951970553c086ff4f1ac65a81559ba69166494
2015-07-22 15:27:26 -04: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
Clay Gerrard
2d6c5fe2af Fix Associated Projects link on Getting Started
Change-Id: I50be656bc5868242489f97c96a1feaef171933e0
2015-07-21 09:57:54 -07:00
Azhagu Selvan SP
317fa1af49 Minor change in development saio setup doc
Make the test-requirements install command uniform with the rest of the
setup commands in the page by using the $HOME, instead of hardcoding
the folder path.

Change-Id: I8da7a191a301601e27f894f8268238d77b150ede
2015-07-18 15:19:43 +05:30
Jenkins
2107fe89c7 Merge "Select policy when running functional test" 2015-07-17 00:26:44 +00:00
Jenkins
2f9053b628 Merge "Fix Container Sync example" 2015-07-11 02:16:52 +00:00
Jenkins
668d543c86 Merge "Add ring-builder analyzer." 2015-07-10 20:12:34 +00: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
Jenkins
90b139db19 Merge "fix api overview document" 2015-07-08 19:16:59 +00:00
Jenkins
74455ad74c Merge "Correcting minor grammatical errors" 2015-07-06 18:48:04 +00:00
Samuel Merritt
ccf0758ef1 Add ring-builder analyzer.
This is a tool to help developers quantify changes to the ring
builder. It takes a scenario (JSON file) describing the builder's
basic parameters (part_power, replicas, etc.) and a number of
"rounds", where each round is a set of operations to perform on the
builder. For each round, the operations are applied, and then the
builder is rebalanced until it reaches a steady state.

The idea is that a developer observes the ring builder behaving
suboptimally, writes a scenario to reproduce the behavior, modifies
the ring builder to fix it, and references the scenario with the
commit so that others can see that things have improved.

I decided to write this after writing my fourth or fifth hacky one-off
script to reproduce some bad behavior in the ring builder.

Change-Id: I114242748368f142304aab90a6d99c1337bced4c
2015-07-02 08:16:03 -07:00
asettle
0a6f2ab870 Correcting minor grammatical errors
1. Removing unnecessary semi colon
2. Removing unnecessary content

Change-Id: Ie95403a4d96db2b8465e75495061fc059098c922
2015-07-02 10:31:48 +10:00
ZhiQiang Fan
a88bd6e6b9 fix api overview document
The content about Object Storage HTTP requests constraints seems to
be a table but broken, this patch fixes it into correct rst table format.

Change-Id: I1b4c62da3e6d91add3ee0218707c1628c8f04b33
2015-06-28 22:08:35 -07:00
Jenkins
20a582a6e5 Merge "Fixed Errors in Swift-Form Post middleware section rst." 2015-06-26 18:40:16 +00:00
Jenkins
f5d6f8c23a Merge "Add policy support to dispersion tools" 2015-06-25 09:42:00 +00:00
Jenkins
383a3e4823 Merge "Add note about updatedb to the docs" 2015-06-24 22:19:13 +00:00
Jenkins
2d33edde6f Merge "Fixed Formatting Error in Swift -Form Post middleware section." 2015-06-24 22:10:35 +00:00
janonymous
c2c1366b07 Fixed Errors in Swift-Form Post middleware section rst.
Inline markup cannot be nested in RST.
Fixing markups by using a single option for the whole line and making
some minor error corrections.

Change-Id: I42bfd7dfe5c93a69436ecc5d154f2e61ca83fa82
2015-06-24 23:58:50 +05:30
janonymous
514daea631 Fixed Formatting Error in Swift -Form Post middleware section.
Fixed Formatting error in ``action=”SWIFT_URL``” => action=”``SWIFT_URL``”

Change-Id: Id461129ef7f5b6412f94d36920c942a4181c0eb7
Closes-Bug: #1464740
2015-06-24 19:07:44 +05:30
paul luse
e6165a7879 Add policy support to dispersion tools
Doesn't work for anything other than policy 0. updated to allow user
to specify policy name on cmd line (as with object-info) which
then makes populate/report work with 3x, 2x, or EC style policies

Change-Id: Ib7c298f0f6d666b1ecca25315b88539f45cf9f95
Closes-Bug: 1458688
2015-06-23 02:14:02 -07:00
Christian Schwede
4a5b851207 Add note about updatedb to the docs
Change-Id: Ia1aa0bb1f93ee487e2f7ddf76a7a08efa8f3ba41
2015-06-22 14:49:59 +02:00
Darrell Bishop
df134df901 Allow 1+ object-servers-per-disk deployment
Enabled by a new > 0 integer config value, "servers_per_port" in the
[DEFAULT] config section for object-server and/or replication server
configs.  The setting's integer value determines how many different
object-server workers handle requests for any single unique local port
in the ring.  In this mode, the parent swift-object-server process
continues to run as the original user (i.e. root if low-port binding
is required), binds to all ports as defined in the ring, and forks off
the specified number of workers per listen socket.  The child, per-port
servers drop privileges and behave pretty much how object-server workers
always have, except that because the ring has unique ports per disk, the
object-servers will only be handling requests for a single disk.  The
parent process detects dead servers and restarts them (with the correct
listen socket), starts missing servers when an updated ring file is
found with a device on the server with a new port, and kills extraneous
servers when their port is found to no longer be in the ring.  The ring
files are stat'ed at most every "ring_check_interval" seconds, as
configured in the object-server config (same default of 15s).

Immediately stopping all swift-object-worker processes still works by
sending the parent a SIGTERM.  Likewise, a SIGHUP to the parent process
still causes the parent process to close all listen sockets and exit,
allowing existing children to finish serving their existing requests.
The drop_privileges helper function now has an optional param to
suppress the setsid() call, which otherwise screws up the child workers'
process management.

The class method RingData.load() can be told to only load the ring
metadata (i.e. everything except replica2part2dev_id) with the optional
kwarg, header_only=True.  This is used to keep the parent and all
forked off workers from unnecessarily having full copies of all storage
policy rings in memory.

A new helper class, swift.common.storage_policy.BindPortsCache,
provides a method to return a set of all device ports in all rings for
the server on which it is instantiated (identified by its set of IP
addresses).  The BindPortsCache instance will track mtimes of ring
files, so they are not opened more frequently than necessary.

This patch includes enhancements to the probe tests and
object-replicator/object-reconstructor config plumbing to allow the
probe tests to work correctly both in the "normal" config (same IP but
unique ports for each SAIO "server") and a server-per-port setup where
each SAIO "server" must have a unique IP address and unique port per
disk within each "server".  The main probe tests only work with 4
servers and 4 disks, but you can see the difference in the rings for the
EC probe tests where there are 2 disks per server for a total of 8
disks.  Specifically, swift.common.ring.utils.is_local_device() will
ignore the ports when the "my_port" argument is None.  Then,
object-replicator and object-reconstructor both set self.bind_port to
None if server_per_port is enabled.  Bonus improvement for IPv6
addresses in is_local_device().

This PR for vagrant-swift-all-in-one will aid in testing this patch:
https://github.com/swiftstack/vagrant-swift-all-in-one/pull/16/

Also allow SAIO to answer is_local_device() better; common SAIO setups
have multiple "servers" all on the same host with different ports for
the different "servers" (which happen to match the IPs specified in the
rings for the devices on each of those "servers").

However, you can configure the SAIO to have different localhost IP
addresses (e.g. 127.0.0.1, 127.0.0.2, etc.) in the ring and in the
servers' config files' bind_ip setting.

This new whataremyips() implementation combined with a little plumbing
allows is_local_device() to accurately answer, even on an SAIO.

In the default case (an unspecified bind_ip defaults to '0.0.0.0') as
well as an explict "bind to everything" like '0.0.0.0' or '::',
whataremyips() behaves as it always has, returning all IP addresses for
the server.

Also updated probe tests to handle each "server" in the SAIO having a
unique IP address.

For some (noisy) benchmarks that show servers_per_port=X is at least as
good as the same number of "normal" workers:
https://gist.github.com/dbishop/c214f89ca708a6b1624a#file-summary-md

Benchmarks showing the benefits of I/O isolation with a small number of
slow disks:
https://gist.github.com/dbishop/fd0ab067babdecfb07ca#file-results-md

If you were wondering what the overhead of threads_per_disk looks like:
https://gist.github.com/dbishop/1d14755fedc86a161718#file-tabular_results-md

DocImpact

Change-Id: I2239a4000b41a7e7cc53465ce794af49d44796c6
2015-06-18 12:43:50 -07:00
janonymous
037a0c5dbe Object are sorted and concatenated by swift in cardinal order.
Modified values in example in decimal to be more precise,
added a small description on Object are sorted and concatenated
by swift in cardinal order as a small phrase would be sufficient.

Change-Id: I914ded4e5726e50bb93b05759c3bfb76edda53ab
backport: none
Closes-Bug: #1383893
2015-06-07 12:53:25 +05:30
Christian Schwede
f1f4bb30cd Fix testing issues
When functional tests are run in tox and an exception is raised when connecting
to Swift (for example: Swift not running, missing python-keystoneclient package
used by python-swiftclient) 0 tests are executed, but tox returns a success.

An exception is raised during tests, caused by a missing python-keystoneclient
in python-swiftclient. Instead of adding python-keystoneclient as a dependency
in python-swiftclient the package is added to the test-requirements.txt in Swift
itself. Note that adding python-keystoneclient to the test-requirements in
python-swiftclient is not sufficient (it's already in there).

The exception in setup_package() is catched by the openstack.nose_plugin, thus
disabling this plugin for now as well.

Also fixing two test errors seen on the gate regarding the tempurl middleware.

There was also an update to tox, environment variables were no longer passed
with versions >= 2.0 (http://tox.readthedocs.org/en/latest/changelog.html).
Swift test environment variables have been added to the passenv to re-enable the
former behavior, as well as environment variables required to pass proxy
settings.

This also led to skipped tempauth tests, and together with the missing
python-keystoneclient no tests were executed.

Related-Bug: 1461440
Related-Bug: 1455102

Co-Authored-By: Alistair Coles <alistair.coles@hp.com>

Change-Id: Ideea071017d04912c60ed0bc76532adbb446c31d
2015-06-03 14:13:14 +01:00