Commit Graph

50602 Commits

Author SHA1 Message Date
Yehuda Sadeh
a794ea5f7e Merge pull request #7887 from cbodley/wip-rgw-test-multi-period
test/rgw: add multisite test for meta sync across periods

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2016-03-05 09:25:27 -08:00
Yehuda Sadeh
2286463b15 Merge pull request #7827 from cbodley/wip-rgw-period-meta-logs
rgw: fixes for per-period metadata logs

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2016-03-05 09:25:01 -08:00
Loic Dachary
a9493f23ce Merge pull request #7941 from SUSE/wip-teuos-intro
doc: detailed description of bugfixing workflow

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2016-03-05 21:55:13 +07:00
Nathan Cutler
a0572bc55c doc: detailed description of bugfixing workflow
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2016-03-05 15:54:09 +01:00
Loic Dachary
19f6c8d488 Merge pull request #7933 from ceph/wip-doc-dist-ceph-detect-init
doc: add ceph-detect-init(8) source to dist tarball

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2016-03-05 08:09:36 +07:00
Josh Durgin
56ca57329b Merge pull request #7937 from saru95/patch--1
ceph_daemon.py: Resolved ImportError to work with python3

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-03-04 14:45:12 -08:00
Zack Cerza
28cc0ca66d Merge pull request #7936 from ceph/wip-fix-debian-build
debian/changelog: Remove stray 'v' in version
2016-03-04 15:12:37 -07:00
Sarthak Munshi
9e47cef30c ceph_daemon.py: Resolved ImportError to work with python3
Signed-off-by: Sarthak Munshi <sarthakmunshi@gmail.com>
2016-03-05 03:35:50 +05:30
Casey Bodley
9a6771a864 rgw: fix for RGWCoroutinesManager::run() return value
the 'int ret' variable of the inner scope was shadowing an 'int ret'
variable in the outer scope, so we weren't propagating any of the error
codes

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-03-04 17:04:09 -05:00
Casey Bodley
5434db9335 rgw: use current period for InitSyncStatus
the InitSyncStatus coroutine records the position to start incremental
sync after finishing a full sync.  this should be the master's marker
from the current period, rather than its oldest log period

this also adds a check to run_sync() that restarts a full sync if it
sees that our sync period is behind the master's oldest log period

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-03-04 17:04:09 -05:00
Casey Bodley
762c075bb2 rgw: meta log rest handlers avoid get_log()
RGWMetadataManager::get_log() will allocate a log and keep it in memory.
this could lead to a potential denial of service by making requests with
lots of different period ids

RGWMetadataLog if effectively stateless (the only state is a set of
modified_shards, which are not touched by any of the rest api calls), so
we can use a temporary instead of calling get_log()

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-03-04 17:04:09 -05:00
Casey Bodley
faa60bc1a9 rgw: pull first log period from master if not found locally
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-03-04 17:04:09 -05:00
Casey Bodley
1353fe514b rgw: implement find_oldest_log_period for RGWMetadataManager
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-03-04 17:04:09 -05:00
Casey Bodley
1b4d1e303b rgw: period history behaves with no current_period
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-03-04 17:04:08 -05:00
Casey Bodley
8044dcb048 rgw: initialize async_rados before meta_mgr
RGWMetadataManager::init() will depend on async_rados

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-03-04 17:04:08 -05:00
Casey Bodley
f8804b34a4 rgw: make RGWMetadataLog::get_shard_oid public and const
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-03-04 17:04:08 -05:00
Casey Bodley
b8a4a9d9a4 rgw: add RGWStatObjCR for async raw_obj_stat
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-03-04 17:04:08 -05:00
Casey Bodley
dbb934056b rgw: only write meta sync shard markers if can_adjust_marker
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-03-04 17:04:08 -05:00
Casey Bodley
873cf39882 rgw: make RGWMetaSyncCR wakeups thread-safe
now that the shards will be coming and going after startup, they need to
be reference counted and protected by a mutex

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-03-04 17:04:08 -05:00
Casey Bodley
da5f3e7e37 rgw-admin: add read_current_period_id() helper function
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2016-03-04 17:04:08 -05:00
Dan Mick
0f7730c8f4 debian/changelog: Remove stray 'v' in version
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2016-03-04 11:42:08 -08:00
Orit Wasserman
ede8deeb46 Merge pull request #7918 from ceph/wip-rgw-payer-yehuda
rgw: link payer info to usage logging

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
2016-03-04 19:37:21 +01:00
Ken Dreyer
c8ec17aa1d doc: add ceph-detect-init(8) source to dist tarball
Prior to this commit, the tarball from "make dist" did not include the
ceph-detect-init(8) man page rST source.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2016-03-04 09:35:46 -07:00
Orit Wasserman
d720540eef Merge pull request #7929 from yehudasa/wip-submodules-fix
submodules: revert an accidental change

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
2016-03-04 16:47:22 +01:00
Samuel Just
fc88f488ce Merge pull request #7910 from ceph/wip-14955
buffer: increment history alloc as well in raw_combined

Reviewed-by: Sage Weil <sage@redhat.com>
2016-03-04 07:02:47 -08:00
Yehuda Sadeh
2f7d1c9d2c submodules: revert an accidental change
revert changes that went in in commit f1ac0de5bf.
This affects ceph-erasure-code-corpus, civetweb

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-03-04 06:54:49 -08:00
Orit Wasserman
2fe0f8eb54 Merge pull request #7916 from ceph/wip-14975
rgw: adjust error code when bucket does not exist in copy operation
rgw: don't override error when initializing zonegroup

Fixes: #14975

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
2016-03-04 12:25:37 +01:00
Loic Dachary
e51ac3eec8 ceph-disk: protect destroy with the activate lock
So that it does not race against an activation.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
003dc15443 ceph-disk: map after luks formatting
dmcrypt_map is idempotent, it does not matter that it is called multiple
times when activating or preparing a device. It is however important to
not cryptsetup remove the device after preparing it because partprobe
may not re-send another add udev event to luksOpen / create it again.

On Ubuntu 14.04, no extra add udev event is sent after the partition was
acknowledged by the kernel. On CentOS 7.2 an extra udev event is sent
for each existing partition, regardless of what the kernel already
knows.

The format() function is just a call to map() to limit the extent of the
refactor. The dmcrypt_map/unmap functions should be refactored into a
device class and the format() function can then be made more specific.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
94c5df4567 tests: verify ceph-disk lockbox activation scenarii
Simulate the cases where the activation (via udev running trigger)
sequences are:

* journal then lockbox
* data then lockbox
* lockbox

All of them must end with the OSD verfied to be up.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
0b4ab0d329 ceph-disk: improve trigger verbosity
The ceph-disk activate errors were ignored and not displayed. Capture
stdout/stderr and display it if the exit code is non zero. Also fail
when an activate fails.

Pass the --verbose flag to activate, if given to trigger.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
ed56cef1f1 tests: make ceph-disk workunit resilient to non ascii
Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
48c21ced5f ceph-disk: implement deactivate --once
It is mostly useful for test purposes.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
869eb3af80 tests: verify ceph-disk activate-lockbox
Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
b36859ce72 ceph-disk: protect list with activate lock
list may try to mount partitions to figure out the OSD id and other
details. If it does so while the OSD is activated, it will race and lead
to errors, either for activation or for list.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
4d42a56797 ceph-disk: implement list for lockbox
Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
d355a383d1 doc: update ceph-disk to refer to ceph-disk --help
The ceph-disk page is often obsolete, mostly because maintaining
it requires a significant amount of copy/paste and re-formatting.
Now that the --help of ceph-disk has been updated to include a more
verbose explanation of each subcommand, simplify the man page to
give an overview of the subcommands and suggest the --help is used
to get more information.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
67ef329af4 ceph-disk: add a description for each subcommand
Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
1ec58fcfc8 ceph-disk: implement lockbox key management
Instead of storing the dmcrypt keys in the /etc/ceph/dmcrypt-keys
directory, they are stored in the monitor. If a machine with
OSDs created with ceph-disk prepare --dmcrypt is lost, it does
not contain the key that would allow to decrypt their content.

The dmcrypt key is retrieved from the monitor using a different keyring
for each OSD. It is stored in a small partition called the lockbox. At
boot time the lockbox is mounted

    /var/lib/ceph/osd-lockbox/$uuid

and used when the $uuid partition is detected by udev to map it with
cryptsetup.

The OSDs that were prepared prior to the lockbox implementation are
supported by looking up the key found in /etc/ceph/dmcrypt-keys before
looking in /var/lib/ceph/osd-lockbox/$uuid.

http://tracker.ceph.com/issues/14669 Fixes: #14669

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
bd4bd5c65e ceph-disk: simplify trigger
The ceph-disk trigger deals with dmcrypt mapping which is redundant with
what ceph-disk activate-* does when the --dmcrypt flag is set. Remove
the dmcrypt mapping code and add the --dmcrypt flag to ceph-disk
activate-* where relevant.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
67f9e8dace ceph-disk: re-using an OSD partition bugous test
When re-using an OSD partition, the test of the partition type is done
against a non-existent variable.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
15db7feb8d ceph-disk: make dmcrypt_unmap idempotent
Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
977bf038a4 ceph-disk: destroy does not unmap block/journal
The dmcrypt boolean needs to be set for destroy to ensure the
journal/block partitions are 'cryptsetup remove'.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Loic Dachary
0186062d29 ceph-disk: display the function name with the log messages
Signed-off-by: Loic Dachary <loic@dachary.org>
2016-03-04 09:13:35 +07:00
Javier M. Mellid
4727d4261d rgw: avoid showing payer when payer == owner
If the payer matches the owner it shows the owner only.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
2016-03-03 16:07:39 -08:00
Yehuda Sadeh
155a53d649 Merge pull request #7786 from ceph/wip-rgw-indexless
rgw: indexless buckets (Yehuda Sadeh)

 - can define a policy, for which buckets are indexless
 - users can then create buckets under the specified placement target
 - indexless buckets will not be synced across zones
 - does not work with (s3) versioned buckets

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-03-03 14:18:25 -08:00
Yehuda Sadeh
b7d022f61a rgw: indexless buckets
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-03-03 14:06:19 -08:00
Yehuda Sadeh
f1ac0de5bf rgw: configurable index type
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-03-03 14:04:19 -08:00
Yehuda Sadeh
905b1d9aa9 rgw: don't override error when initializing zonegroup
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-03-03 13:56:37 -08:00
Yehuda Sadeh
0b48c8688b rgw: adjust error code when bucket does not exist in copy operation
Fixes: #14975

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
2016-03-03 13:49:39 -08:00