Commit Graph

72609 Commits

Author SHA1 Message Date
Casey Bodley
76e147614f qa/rgw: fixes for cluster name on cleanup
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-05-17 14:48:55 -04:00
Casey Bodley
4c59d343c3 qa/rgw: move compression type out of ceph.conf
this makes the 'compression type' setting global to all gateways, and
makes the setting visible to other tasks in ctx.rgw.compression_type

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-05-17 14:48:55 -04:00
Casey Bodley
d67018cb31 test/rgw: add import for StringIO
also removes unnecessary tuple parens

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-05-17 14:48:55 -04:00
Adam C. Emerson
80b285d329 rgw: Write documentation for bucket policies
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-05-17 14:22:18 -04:00
Adam C. Emerson
b7d0b740c0 rgw: RESTful bucket policy ops
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-05-17 14:22:18 -04:00
Adam C. Emerson
266103fa22 rgw: Verify policies as WELL as ACLs
Only hook into object/bucket checks for now. Once we have STS (giving
us Roles) or User/Group policies it will make sense to hook into
those, too.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-05-17 14:22:18 -04:00
Adam C. Emerson
908d9e46d2 rgw: Build bucket permission and environment in req_state
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-05-17 14:22:18 -04:00
Adam C. Emerson
69a5eebd8a rgw: Add basic support for IAM policies
This support is currently incomplete but should provide a starting
point.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-05-17 14:22:18 -04:00
Adam C. Emerson
8416f1c569 buffer: Make the use of static areas more convenient
Make three wrapper functions to tidy up the process of making a
bufferlist holding a single static buffer.

The lack of any decent handling of const in buffer::list makes me wax
wroth, but it's a bit much to fix right now.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-05-17 14:22:18 -04:00
Adam C. Emerson
9e8172b840 rgw: Move globbing flags to header
So they can be used when calling the function

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-05-17 14:22:18 -04:00
Adam C. Emerson
56167d19f8 rgw: Add is_identity to AuthApplier class
Eventually this will allow us to match all authentication information
against all specified principals in a policy.

Right now it handles users and wildcards.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-05-17 14:22:18 -04:00
Adam C. Emerson
7cd1ccf422 common: Add ISO-8601 Date Support
For parsing and unparsing from ceph::real_time.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-05-17 14:22:15 -04:00
Jesse Williamson
ec4f4c8a64 rgw: migrate atomic_t to std::atomic<>
Signed-off-by: Jesse Williamson <jwilliamson@suse.de>
2017-05-17 10:01:15 -07:00
Adam C. Emerson
c3f2447c80 submodule: Tencent's RapidJSON library
This is a high performance, MIT licensed JSON parsing library. It
provides a SAX interface so that I can compile an S3 policy without
building up a JSONObject tree in the middle that gets thrown away.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-05-17 12:26:39 -04:00
Adam C. Emerson
64acb16354 common: Add make_unique
There are parts of C++14 that are both useful and easy to
implement. This is one of them.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2017-05-17 12:26:39 -04:00
Sage Weil
3bb9dd475b ceph_test_rados_api_list: more fix LibRadosListNP.ListObjectsError
Follow-on to d7e6e8d60309e4800389b36f786b633d0ca2ec07; we need to
make sure the client gets the updated osdmap.

Fixes: http://tracker.ceph.com/issues/19963
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-17 11:55:42 -04:00
Sage Weil
752b8389da Merge pull request #13731 from liewegas/wip-19119
PendingReleaseNotes: warning about 'osd rm ...' and #19119
2017-05-17 10:43:18 -05:00
Sage Weil
3c6755e036 PendingReleaseNotes: warning about 'osd rm ...' and #19119
See http://tracker.ceph.com/issues/19119

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-17 11:42:55 -04:00
Sage Weil
c94645567b Merge pull request #14873 from liewegas/wip-bluefs-position
os/bluestore: put bluefs in the middle of the shared device

Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
2017-05-17 10:29:52 -05:00
Sage Weil
55c47ef6e1 Merge pull request #14902 from liewegas/wip-upmap
osd/OSDMap: improve upmap calculation

Reviewed-by: Loic Dachary <loic@dachary.org>
2017-05-17 10:29:28 -05:00
Sage Weil
35834a308e Merge pull request #14933 from liewegas/wip-asok-schema
common/perf_counters: make schema more friendly and update docs

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
2017-05-17 10:29:09 -05:00
Sage Weil
16cce5a56b Merge pull request #14967 from tchaikov/wip-faster-cull
mgr: optimize DaemonStateIndex::cull() a little bit

Reviewed-by: John Spray <john.spray@redhat.com>
2017-05-17 10:28:49 -05:00
Sage Weil
81bd3025d1 Merge pull request #15002 from dachary/wip-19836-crush-pre-luminous
crush: encode can override weights with weight set

Reviewed-by: Sage Weil <sage@redhat.com>
2017-05-17 10:26:06 -05:00
Sage Weil
9a06fdbffe Merge pull request #15031 from tchaikov/wip-drop-unused-opts
config_opts: drop unused opts

Reviewed-by: Sage Weil <sage@redhat.com>
2017-05-17 10:25:25 -05:00
Sage Weil
570f576468 Merge pull request #15043 from tchaikov/wip-19884
ceph-detect-init: detect init system by poking the system

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2017-05-17 10:24:50 -05:00
Sage Weil
0260a52631 Merge pull request #15059 from liewegas/wip-mon-kvtype
mon: fix mon_keyvaluedb application

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-05-17 10:24:19 -05:00
runsisi
6d991c5c51 rbd: remove unnecessary -ENOENT check for rbd cli
Signed-off-by: runsisi <runsisi@zte.com.cn>
2017-05-17 23:14:21 +08:00
runsisi
3e3bb7b0fc librbd: translate error -ENOENT to 0 for list APIs
Signed-off-by: runsisi <runsisi@zte.com.cn>
2017-05-17 23:14:15 +08:00
John Wilkins
3b943b49e8 Merge pull request #15032 from tchaikov/wip-doc-opts
doc: add descriptions for mon/mgr options

Reviewed-by: John Wilkins <jowilkin@redhat.com>
2017-05-17 08:04:29 -07:00
Abhishek Lekshmanan
9db24d5577 rgw: drop expat header in a couple of files
Since it is already a part of rgw_xml
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2017-05-17 16:16:36 +02:00
Abhishek Lekshmanan
b4a4416e1f rgw: drop using namespace std in header files
We're still having the include in include/type.h, so just sweeping
things under the rug for now

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2017-05-17 16:13:54 +02:00
Sage Weil
73da4e199a os/bluestore/KernelDevice: helpful warning when aio limit exhausted
Suggested-by: Dan Van Der Ster <daniel.vanderster@cern.ch>
Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-17 09:38:51 -04:00
runsisi
a1328cdeb9 pybind/rbd: fix crash if more than 1024 images in trash bin
Signed-off-by: runsisi <runsisi@zte.com.cn>
2017-05-17 21:03:02 +08:00
John Spray
618b9b3f3f Merge pull request #15127 from tchaikov/wip-vstart-mgr-debug-ms
vstart: "debug_ms=1" for mgr by default

Reviewed-by: John Spray <john.spray@redhat.com>
2017-05-17 12:18:15 +01:00
Kefu Chai
fab6fc15e1 Merge pull request #15103 from drunkard/master
doc: minor fixes in radosgw/

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-05-17 17:00:56 +08:00
Kefu Chai
ae8eee2fde Merge pull request #15080 from hikycool/master
doc: update the usage of 'ceph-deploy purge'

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-05-17 16:54:42 +08:00
guozhandong
d4195bb83c rgw: rename s3_code to err_code for swift
Signed-off-by: Guo Zhandong <guozhandong@cmss.chinamobile.com>
2017-05-17 11:56:26 +08:00
lu.shasha
d05fdd3874 rgw: fix X-Object-Meta-Static-Large-Object in SLO download
when download SLO objects, the response header "X-Object-Meta-Static-Large-Object" doesn't decode. Expect value is "True", but there is four bytes gibberish before it.

Fixes: http://tracker.ceph.com/issues/19951

Signed-off-by: Shasha Lu <lu.shasha@eisoo.com>
2017-05-17 10:41:15 +08:00
Casey Bodley
4b338ce9bd doc/rgw: remove fastcgi page and sample configs
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-05-16 22:36:53 -04:00
Kefu Chai
a6daa84d1a vstart: "debug_ms=1" for mgr by default
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-05-17 10:31:46 +08:00
Jos Collin
5bc0e3448a common: Remove redundant includes
Fixes: http://tracker.ceph.com/issues/19883 (Partially)

Signed-off-by: Jos Collin <jcollin@redhat.com>
2017-05-17 06:49:19 +05:30
Casey Bodley
a21d411c9c osd: fix argument-dependent lookup of swap()
because include/types.h has a 'using namespace std', the call to
::swap() had previously been selecting overloads from namespace std. but
once any other swap() functions are present in the global namespace,
argument-dependent lookup [1] will not consider those from std

for example, when common/sstring.hh has been included, its global swap()
function is the only overload considered, so calls to ::swap() result in
errors like this:

/home/cbodley/ceph/src/osd/osd_types.h: In member function ‘void ObjectModDesc::swap(ObjectModDesc&)’:
/home/cbodley/ceph/src/osd/osd_types.h:3135:56: error: no matching function for call to ‘swap(bool&, bool&)’
     ::swap(other.can_local_rollback, can_local_rollback);
                                                        ^
/home/cbodley/ceph/src/common/sstring.hh:589:6: note: candidate: template<class char_type, class size_type, size_type max_size> void swap(basic_sstring<char_type, size_type, Max>&, basic_sstring<char_type, size_type, Max>&)
 void swap(basic_sstring<char_type, size_type, max_size>& x,
      ^
/home/cbodley/ceph/src/common/sstring.hh:589:6: note:   template argument deduction/substitution failed:
/home/cbodley/ceph/src/osd/osd_types.h:3135:56: note:   mismatched types ‘basic_sstring<char_type, size_type, Max>’ and ‘bool’
     ::swap(other.can_local_rollback, can_local_rollback);

adding a `using std::swap;` to the calling scope and removing :: from
the call to `swap()` allows argument-dependent lookup to resolve the
overloads in both namespaces

[1] http://en.cppreference.com/w/cpp/language/adl

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2017-05-16 18:47:04 -04:00
Patrick Donnelly
6c34a2c673
qa: silence upgrade test failure
The new fs setting standby_count_wanted is only avialable in luminous. Upgrade
tests were tripping on this.

Fixes: http://tracker.ceph.com/issues/19934

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-05-16 18:43:57 -04:00
Sage Weil
9da6843166 osd/PGLog: avoid pinning large buffers with ObjectModDesc
Accidentally removed by 5e0ec06376.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-16 17:33:54 -04:00
Sage Weil
234a989de4 osd: encode snaps more efficiently
1- encode into a sized buffer.
2- do not needlessly copy the set<> to a vector<> before encoding.
set<> and vector<> encode identically.  Since we are converting from sorted
set<> to unsorted vector<>, the order doesn't change either.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-05-16 17:33:48 -04:00
Neha Ojha
6ecb03299a mon: add test for crush type down health warnings
Signed-off-by: Neha Ojha <nojha@redhat.com>
2017-05-16 14:16:19 -07:00
J. Eric Ivancich
2f96956b7d osd/pglog: Remove loop through empty collection.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
2017-05-16 16:35:47 -04:00
Yuri Weinstein
26df056e34 Merge pull request #15087 from liewegas/wip-thrash-ec
qa/suites/rados: fix ec thrashing

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-05-16 13:20:34 -07:00
Yuri Weinstein
07ac91d4b9 Merge pull request #15072 from liewegas/wip-crush-swap-bucket
mon,crush: add 'osd crush swap-bucket' command

Reviewed-by: Loic Dachary <loic@dachary.org>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-05-16 13:19:59 -07:00
Yuri Weinstein
9187156b55 Merge pull request #15069 from tchaikov/wip-inttypes-cleanup
int_types.h: remove hacks to workaround old systems

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
2017-05-16 13:18:23 -07:00