caa01cd81e7dae6c41c1ffb8a69aed6ff70777cf
Commit Graph

2522 Commits

This Branch
This Branch
All Branches
Author SHA1 Message Date
tong li
68355d7ea5 Instruction for multi node setup misses /var/run/swift creation
Multiple Server Swift Installation (Ubuntu) instruction does not
indicate that the directory /var/run/swift needs to be created.
That directory actually needs to be created and the ownship needs
to be changed to the user/group which swift service runs under.
This patch will fix the document and gives the steps how to create
the directory and set the ownership right. It also gives instruction
on how the script can be added so that swift services can be resarted
after system reboots.
Change-Id: Id61aa67cc0d6f66d749701e6ea824b1ff3b2c478
Fixes: bug #1156631 
2013年03月18日 13:57:40 -04:00
Samuel Merritt
d42a78a3aa Basic ring builder validation.
This prevents people from creating bogus ring builder files.
Example: "swift-ring-builder object.builder create 33 0.9 -4".
Fixes bug 924577.
Change-Id: I7bfc04f7fa5f55f70a4eaae96c414f6b2872e283
2013年03月18日 09:50:45 -07:00
tong li
b530de2ad5 swift-ring-builder blows up when not supported command requested.
swift-ring-builder uses outdated unbounded class method to handle
not supported command. It worked for python 2.6 or older but not
for python 2.7 or newer. This patch fixes the problem.
Change-Id: I7dbc681ef6be44f6d79ff93189ccca13c51eab74
Fixes: bug #1154882 
2013年03月18日 09:04:50 -04:00
Samuel Merritt
d88d12b120 Small clarification to swift-recon section of admin guide.
Apparently the use of port 6030 was causing some confusion.
Fixes bug 1095474.
Change-Id: I0cc71f4733ad91694e015a9b75c3eda080aca6fb
2013年03月17日 15:58:06 -07:00
Jenkins
c2f8f00a3e Merge "Fix format device" 2013年03月16日 19:40:16 +00:00
Jenkins
94defcbc53 Merge "Add tests and doc entry for request.environ[reseller_request]" 2013年03月16日 19:29:47 +00:00
Kun Huang
45dda5e356 Change logger name to module itself instead of root
Using root logger will make public module log failed by unknow keyword.
Just change the logger name to module itself could dismiss this impact.
And disable logger.propagate could prevent double outputing.
Change-Id: I18696d124ebac9ca970d502558972e51de759097
Fixes: bug #1105133 
2013年03月17日 01:59:40 +08:00
Ilya Kharin
e56832c138 Fix format device
Change-Id: Icef35175682c11a406ef85accc6c6e1acbf89f4d
2013年03月16日 12:41:14 +04:00
Samuel Merritt
229ba53a19 Fix crash in swift-ring-builder's list_parts command.
If you run list_parts against a builder that has never been
rebalanced, you'd get a crash. Now you don't.
To reproduce:
$ swift-ring-builder foo.builder create 8 3 1
$ swift-ring-builder foo.builder add r1z1-1.2.3.4:6000/sda 100
$ swift-ring-builder foo.builder list_parts z1
Change-Id: Ic3edffab0c5c2e9551a2f89ddb881153f0b07db7
2013年03月14日 18:49:30 -07:00
Jenkins
b115356af6 Merge "Remove check for valid Origin for the "actual request"." 2013年03月14日 11:29:17 +00:00
Jenkins
8e58c9c2a9 Merge "Add missing CONTRIBUTING.md to source tarball" 2013年03月13日 22:53:39 +00:00
Jenkins
fd3a8a6650 Merge "Fix swift-ring-builder's list_parts command." 2013年03月13日 22:53:34 +00:00
David Goetz
f6e29b81d0 Remove check for valid Origin for the "actual request".
The only place in the spec that I could see the Origin being checked was
during the pre-flight OPTIONS request. If it gets to the actual request
let auth decide. Please correct me if this is wrong.
Change-Id: Ic31b71746ec056091c7778ebff3db7becc32bd9c
2013年03月13日 13:43:19 -07:00
Samuel Merritt
35acd5912f Fix swift-ring-builder's list_parts command.
I broke it in 7548cb9 when a ring's replica count changed from an int
to a float.
Change-Id: I49fa7e2961a09daad0c96e19cf1e39fec248d998
2013年03月13日 13:34:19 -07:00
Samuel Merritt
ebcd60f7d9 Add a region tier to Swift's ring.
The region is one level above the zone; it is intended to represent a
chunk of machines that is distant from others with respect to
bandwidth and latency.
Old rings will default to having all their devices in region 1. Since
everything is in the same region by default, the ring builder will
simply distribute across zones as it did before, so your partition
assignment won't move because of this change. If you start adding
devices in other regions, of course, the assignment will change to
take that into account.
swift-ring-builder still accepts the same syntax as before, but will
default added devices to region 1 if no region is specified.
Examples:
$ swift-ring-builder foo.builder add r2z1-1.2.3.4:555/sda
$ swift-ring-builder foo.builder add r1z3-1.2.3.4:555/sda
$ swift-ring-builder foo.builder add z3-1.2.3.4:555/sda
Also, some updates to ring-overview doc.
Change-Id: Ifefbb839cdcf033e6c9201fadca95224c7303a29
2013年03月13日 10:00:58 -07:00
Thierry Carrez
b3732787ea Add missing CONTRIBUTING.md to source tarball
Fixes MANIFEST.in to include missing CONTRIBUTING.md into source
code tarballs.
Change-Id: I81876adad14e0f1b2211d39ec6471e35f5464120
2013年03月13日 11:35:42 +01:00
gholt
f6d1fa1c15 Fixed bug with account_info
There was a bug where account_info wasn't converting the
container_count value to an int. Causes max container count cap to
get hit pretty quick since '0' > 0.
Change-Id: Ibfc6eebbff5a00aaebb47e9731dd053b60e3caa4
2013年03月12日 19:15:35 +00:00
Pete Zaitcev
35e07e2982 Permit functional tests against Swift with Keystone
While poking at such problems with authentication other than swauth
it was useful to allow stock functional tests running back-to-back
at two clusters, with tempauth and Keystone.
When running the legacy tests, this version packs account into user
the way it was down previously. This way we do not need to repack
them before every call to get_auth. The downside is additional work
to be done when setting ACLs.
Change-Id: Ieb1d9227cb88977ecd2c39825039bc4be8afae0b
2013年03月10日 18:52:10 -06:00
Christian Schwede
157c3c91ee Add tests and doc entry for request.environ[reseller_request]
The recent account_quotas (https://review.openstack.org/23434)
patch added a new setting request.environ[reseller_request].
This patch adds tests for tempauth and keystoneauth as well as
an updated overview_auth.rst.
Change-Id: Icdb7ec9948ae7424b0721fc51a143782b2fdc5a6
2013年03月10日 19:21:13 +01:00
Kun Huang
cb69dc881a Give friendly notification in swift-get-nodes
Hard coding of '/srv/node' maybe drive to some errors. But it seems
unfixable (please see talks in bug report). To avoid erros as we can,
showing a friendly notification to let user set their own device
location works better than hard coding directly.
Change-Id: I45d749dd52af8d3b051dfe98dbb9d71a5a374f97
Fixes: bug #907908 
2013年03月09日 13:43:54 +08:00
David Hadas
8b140033f0 Improved container-sync resiliency
container-sync now skips faulty objects in the first and second rounds.
All replicas try in the second round.
No server will give up until the faulty object suceeds
Fixes: bug #1068423
Change-Id: I0defc174b2ce3796a6acf410a2d2eae138e8193d
2013年03月08日 22:28:06 +02:00
jola-mirecka
5e427e5e3b Add exception to swift-drive-audit if no date in line.
Sometimes there is no date at the beginning of a line in kern.log.
Although it does not happen often, there should be a check ensuring
the program doesn't crash in case it happens.
Added try-except block surrounding parsing string to date format.
Change-Id: I44a101266582eea2199189a006afa1037a9bd4ea
Fixes: bug #1152658 
2013年03月08日 16:38:11 +00:00
Jenkins
a8af3835c0 Merge "Account quotas" 2013年03月08日 16:37:04 +00:00
Christian Schwede
28c75db0e7 Account quotas
Add a new middleware implementing account quotas.
This middleware blocks write requests (PUT, POST) if a given quota (in bytes)
is exceeded while DELETE requests are still allowed.
Quotas are stored in the x-account-meta-quota-bytes metadata entry.
Write requests to this metadata setting are only allowed for resellers.
Change-Id: I57fd7c6209f34cc79d4bab72d500d43ba2a62083
2013年03月08日 14:31:35 +01:00
Samuel Merritt
d9fb84d209 Fix some unreadable code.
I thought it was readable back when I wrote it; turns out it's
not. Oops.
Change-Id: I1e1020935356522d6e07409aa867a5ffc8919787
Bonus: remove unused import.
2013年03月07日 14:44:03 -08:00
Jenkins
48380c501a Merge "simplify the chexor function" 2013年03月07日 22:20:40 +00:00
Jenkins
09f1387af5 Merge "Support tests for Apache" 2013年03月07日 13:33:48 +00:00
Michael Barton
0219b08b46 simplify the chexor function
Replace all that map(operator) nonsense.
It changes the error raised on invalid hashes, but we don't handle that
anywhere, and it shouldn't ever happen in real life.
Change-Id: Ib8cb549fac05e0b2725b4ea295326ac0c5e1f035
2013年03月07日 01:34:46 -08:00
David Hadas
40782ed20c Support tests for Apache
Add support for functional tests that work with Apache web front end
Change-Id: I72358a12016eeccc842d834461dbebaa188aa117
Implements: blueprint wsgi-application-interface
2013年03月07日 01:32:16 +02:00
Sergey Lukjanov
7d5095c122 Support listing endpoints for an object.
Implements blueprint list-endpoints.
DocImpact: new middleware list_endpoints.
Change-Id: I0c4911ff726abd4cb8ce2b6245c99786ad46b410
2013年03月07日 01:38:21 +04:00
Jenkins
34beb92edb Merge "Spread handoffs out better around zones." 2013年03月06日 20:11:05 +00:00
Samuel Merritt
71a20d04cc Fix misspelled variable name
Change-Id: Ied6ed3cad16e9797df73a05f3df3ac9cc64299e0
2013年03月05日 18:15:09 -08:00
Jenkins
28ac46ded3 Merge "Added per disk PUT timing monitoring support." 2013年03月06日 01:59:23 +00:00
Samuel Merritt
27dcaf2636 Spread handoffs out better around zones.
Before, you'd get your 3* primary nodes in 3 different zones, and then
get_more_nodes would give you everything it could from a non-primary
zone, and then finish up with stuff from the primary zones. It would
sort of look like this:
P: device in a primary node's zone
N: device not in a primary node's zone
PPPNNNNNNNNNNNNNNNNNNN...NNNNNNNNNPPP...PPPPPP
(The first three Ps are the primary nodes; they don't actually come
out of get_more_nodes(), but they're included for clarity.)
Now, the first few handoffs from get_more_nodes are in non-primary
zones, but only one per zone, and then the rest of the handoffs ignore
zones. It's still sampling the ring, so it's still taking weights into
consideration, but the zone distribution is more even early in the
handoff chain. It looks like this, assuming 10 zones:
P: device in a primary node's zone
N: device not in a primary node's zone
D: zone doesn't matter
PPPNNNNNNNDDDDDDDDDDD...DDD
* or whatever your replica count is
Change-Id: I31d2a2bc2cd6038386a2df85cd4fa37ccf2f650e
2013年03月05日 13:28:12 -08:00
tong li
7fd4323a69 David Hadas email address has been changed.
Change-Id: Ic3e9ad50f123eecb4abbe91340b0acff4a2d580c
2013年03月05日 11:59:14 -05:00
Jenkins
7117b744cc Merge "Static Large Object Support" 2013年03月05日 04:09:47 +00:00
gholt
e064ba1915 Updated get_more_nodes algorithm
The handoff nodes will try to be in zones other than the primary
zones, will take into account the device weights, and will usually
keep the same sequences of handoffs even with ring changes.
On a real ring test the old get_more_nodes placed data mostly evenly
across zones, which is a problem for differently weighted zones. But
the real problem was that the extra partitions given to each device
was 0% to 0.77% with only 46.05% of the candidate devices getting
anything. Some of the devices increased in effective weight over 50%
in the test.
The new get_more_nodes placed closer to what the zone weights were
and the extra partitions given to each device was 0% to 0.24% with
90.58% of the candidate devices getting something. The worst off
device only increased in effective weight by 10.71%.
Change-Id: Iffb133a22db69074acaa2b90854cbfa92e4c2b9e
2013年03月04日 08:52:24 +00:00
Jenkins
457ff9672d Merge "Make rings' replica counts adjustable." 2013年03月04日 06:36:48 +00:00
Jenkins
84bd434d8d Merge "Remove reduant check of list." 2013年03月02日 18:46:57 +00:00
Jenkins
9808a8744b Merge "TempURL filename options; bug fixes" 2013年03月02日 05:20:57 +00:00
David Goetz
5d73da158b Static Large Object Support
DocImpact
Change-Id: I7edaa5e44208ab451f7f7566b64bb571b8eea1f9
2013年03月01日 16:46:10 -08:00
Jenkins
cc63f8d791 Merge "Fixed formpost QUERY_STRING bugs." 2013年03月01日 21:27:58 +00:00
gholt
c4c66d81bd TempURL filename options; bug fixes
- Prior to this commit, a Content-Disposition header was always set
 on responses to GET requests, with the filename based on the object
 name. Now, the header will only be set for 2xx responses and the
 filename can be overridden with a filename query parameter on the
 request.
- Fixed a bug where all query parameters on the request were being
 passed down the WSGI pipeline. Now, just the query parameters
 useful in log-based debugging are included. This becomes important
 with things like the Bulk middleware that act upon query
 parameters.
- Fixed bug where the Content-Disposition header wasn't following RFC
 spec.
DocImpact
Change-Id: I66ad809321dcdd03444324973c8b76869e3b0c8e
2013年03月01日 15:47:20 +00:00
ywang19
b715eb5d18 Remove reduant check of list.
Remove len() check and parenthesis.
Fixes Bug #1136893
Change-Id: Ib47ec4890c2f6a50e316a7fef204ef818c6c4d6e
2013年03月01日 13:22:35 +08:00
Jenkins
9e006183f8 Merge "make swift fsync" 2013年02月28日 20:59:12 +00:00
Jian Zhang
1d8a02f25c Added per disk PUT timing monitoring support.
Fixes bug 1104708
There could be severe performance drop for swift is one disk of one
storage node is problematic due to the tragic state of async disk I/O.
This patch provided PUT timing per kB transfered (ms/kB) monitoring
support for each non-zero-byte request of each disk and report to
statsD for alert.
-adding "object-server.PUT.<device>.timing" metrics for object-server.
DocImpact.
Change-Id: Ie94bddad28e8be52e71683bf6c9db988664abe47
2013年02月28日 02:52:06 -08:00
Jenkins
b6b5d6670d Merge "Allow acl with a valid token." 2013年02月28日 04:51:55 +00:00
Jenkins
61f4d077ae Merge "Add tests on keystone for invalid path requests." 2013年02月28日 03:22:39 +00:00
Michael Barton
8bc065ec78 make swift fsync
Swift never fsyncs, it only fdatasyncs. That is dumb, we have important
metadata we need to save. Also, the code was weird and had no tests.
Change-Id: I6ec875c14560820b686266a28043a2b7631781e9
2013年02月27日 17:43:19 -08:00
Jenkins
569bd1e4f6 Merge "Force log entries to be one line" 2013年02月27日 22:45:48 +00:00