Commit Graph

22834 Commits

Author SHA1 Message Date
Josh Durgin
3950182268 st_rados_watch: tolerate extra notifies
With retries, it's possible for notifies to be received more than once
when they are resent to different OSDs, since the OSDs only track them
in memory.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-12-11 15:44:32 -08:00
Josh Durgin
c3107009f6 objecter: don't use new tid when retrying notifies
Watches update the on-disk state in the OSD, and aren't idempotent,
so refreshing them must be treated as a separate transaction by the OSD.
Notifies are just in-memory state, and resending them will result in
acceptable behavior:

- if it's the same osd, the resent op will be recognized as a duplicate
- if it's a different osd, a new notify will be triggered since the new osd
  can't tell whether the original notify was received by any watchers

Using a new tid for each resend can cause some unecessary extra work,
as the first case turns into the second.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-12-11 11:13:17 -08:00
Samuel Just
bcf1461c7e Merge remote-tracking branch 'upstream/wip_split2' into next
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-12-10 22:00:36 -08:00
Samuel Just
1699b7dc5e OSD: get_or_create_pg doesn't need an op passed in
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-10 19:03:55 -08:00
Samuel Just
6a4fa89afa LFNIndex: fix move_subdir comments
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-10 17:45:02 -08:00
Samuel Just
fdcdca7d68 HashIndex: fix typo in reset_attr documentation
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-10 17:40:10 -08:00
Samuel Just
7eac96827e HashIndex: init exists in col_split_level and reset_attr
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-10 17:39:13 -08:00
Samuel Just
12673c24f2 PrioritizedQueue: increment ret when removing items from list
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-10 17:31:44 -08:00
Samuel Just
80cca214b9 PrioritizedQueue: move if check out of loop in filter_list_pairs
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-10 17:30:59 -08:00
Sage Weil
e4d0aeace1 Merge remote-tracking branch 'gh/wip-filestore2' into next
Reviewed-by: Sam Just <sam.just@inktank.com>
2012-12-10 14:34:07 -08:00
Samuel Just
788992bbf5 config_opts.h: adjust recovery defaults
osd max backfills: 5 was too low for a default, 10
 seems to work better in testing.  The message
 priority system should minimize disruption of
 push and pull operations anyway.

osd recovery max chunk: 1MB was too small for a
 default.  8MB is reasonable for a single push
 and will allow us to recover an rbd block in
 one push rather then 4 reducing client io
 latency during log-based recovery.

osd recovery op priority: 10 rather than 30 will
 further reduce the client io latency impact of
 push and pull operations.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-10 13:53:10 -08:00
Sage Weil
45865285e7 Merge remote-tracking branch 'gh/wip-3559' into next
Reviewed-by: Sage Weil <sage@inktank.com>
2012-12-10 12:55:14 -08:00
Sage Weil
333b3f43b5 mon: fix leak of pool op reply data
We pass a pointer because it is an optional argument, but we shouldn't
put the bufferlist on the heap or else we have to manage it's life
cycle, and that's fragile (and previously broken).

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-08 21:44:54 -08:00
Sage Weil
f66fe7783e os/JournalingObjectStore: simplify op_submitting sanity check
A list is overkill; just use a seq and make sure it increments to ensure
the op_submit_finish calls are in order.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-08 09:32:47 -08:00
Sage Weil
a88b584933 os/JournalingObjectStore: remove unused ops_submitting
Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-08 09:32:47 -08:00
Sage Weil
ad4158d1ab os/JourningObjectStore: drop now-useless max_applying_seq
Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-08 09:32:47 -08:00
Sage Weil
d9dce4e927 filestore: simplify op quescing
The delicate balancing with op_apply_start() and that fact that it can
block was making it very hard to determine how long commit_start() should
wait, since requests in the workqueue threads could op_apply_start() in
any order.  For example,

 threadA: gets osr1 from wq
 threadA: gets osr2 from wq
 threadA: dequeue seq 11 from osr1, op_apply_start
 threadC: commit_start on 11
 threadA: op_apply_finish on seq 11
 threadC: commit_started, commit_finish
 threadB: dequeue seq 10 from osr2
   <failed assert, badness>

Instead, rip out all this code, and use the ThreadPool pause() method to
quiesce operations.  Keep some of the (now unnecessary) fields around
for sanity checks (blocked, open_ops, max_applying_seq, etc.).

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-08 09:32:47 -08:00
Sage Weil
25ea06969f osd: make pool_stat_t encoding backward compatible with v0.41 and older
In particular, this is the encoding that is used in precise.

Fixes: #3212
Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-08 09:24:38 -08:00
Sage Weil
81e567c90d Merge remote-tracking branch 'gh/wip-ceph-test' into next 2012-12-08 09:18:21 -08:00
Sage Weil
e227c70945 crush/CrushWrapper: do not crash if you move an item with no current home
This will let us take an existing orphan and place it somewhere.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-08 09:17:51 -08:00
Joao Eduardo Luis
1acb691008 mon: Elector: init elector before each election
Fixes: #3587

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-12-08 09:16:02 -08:00
Sage Weil
42d21937fb Merge branch 'testing' into next 2012-12-08 09:12:21 -08:00
Sage Weil
f3029833c3 init-ceph: =, not ==
Reported-by: v@alan.lt
Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-08 09:12:07 -08:00
Dan Mick
8816b39aad debian: add ceph.postinst to remove /etc/init/ceph.conf on update
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2012-12-07 23:11:39 -08:00
Samuel Just
fc58299eea PG: remove last_epoch_started asserts in proc_primary_info
These asserts are valid for a uniform cluster, but they won't hold
for a replica running a version without the info.last_epoch_started
patch.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit 0756052cff)
2012-12-07 22:36:36 -08:00
Yehuda Sadeh
81fdea135c auth: set default auth_client_required
Fixes: #3578
Set auth_client_required to default to "cephx, none".

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-12-07 22:33:31 -08:00
Peter Reiher
a3908a6898 auth: changed order of test for legacy and new authentication
Changed order of test for legacy and new configuration options
in several places.

Signed-off-by: Peter Reiher <reiher@inktank.com>
2012-12-07 22:33:27 -08:00
Yehuda Sadeh
907da185a8 auth: improve logging
Add some logging around failure cases.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
2012-12-07 22:32:59 -08:00
Dan Mick
8355733027 rbd: use ExportContext for progress, not cerr
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-12-07 16:41:04 -08:00
Sage Weil
07b36992da mds: move from EXCL to SYNC if nobody wants to write
We were moving to the MIX even if nobody wanted to write; that is not
useful, since if we only want to read SYNC will let us cache those reads.
SYNC is also a more friendly place (all things equal) to be.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-12-07 10:18:40 -10:00
Sam Lang
636048db61 mds/locker: Add debugging for excl->mix trans
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-12-07 10:18:40 -10:00
Sam Lang
fa5a46c75e test/libcephfs: Add a test for validating caps
Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-12-07 10:18:35 -10:00
Sam Lang
10bf150990 client: Add routine to get caps of file/fd
In order to properly validate the client capabilities,
we need to be able to access them from libcephfs.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
2012-12-07 10:18:26 -10:00
Josh Durgin
efc6614883 librbd: change internal order parameter to pass-by-value
It doesn't change in any of these places.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-12-07 10:37:51 -08:00
Josh Durgin
57d5c69985 librbd: clean up after errors in create
Split format 1 and 2 image creation into separate functions for better
readability. Format 2 requires more error handling.

Fixes: #2677
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-12-07 10:37:51 -08:00
Josh Durgin
c1bf2291e8 librbd: bump version for new functions
copy2, clone2, and create3 are new.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2012-12-07 10:37:51 -08:00
Joao Eduardo Luis
bc6f726825 mon: PGMonitor: erase entries from 'creating_pgs_by_osd' when set is empty
This patch avoids sending empty MOSDPGCreate's every tick.

Fixes: #3571

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-12-07 04:16:15 -08:00
Joao Eduardo Luis
e1c27fe178 mon: Monitor: rework 'paxos' to a list instead of a vector
After adding the gv patches, during Monitor::recovered_leader() we started
waking up contexts following the order of the 'paxos' vector. However,
given that the mdsmon has a forgotten dependency on the osdmon paxos
machine, we were incurring in a situation in which we proposed a value
through the osdmon before creating a new pending value (but by being
active, the mdsmon would go through with it nonetheless).

This is easily fixed by making sure that the mdsmon callbacks are only
awaken *after* the osdmon has been taken care of.

Fixes: #3495

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
2012-12-07 04:04:14 -08:00
Sage Weil
58f6798f3d Merge branch 'testing' into next 2012-12-07 04:00:22 -08:00
Samuel Just
27071f3bc2 OSD: store current pg epoch in info and load at that epoch
Prior to split, this did not matter.  With split, however, it's
crucial that a pg go through advance_pg() for the map causing
the split.  During operation, a PG lags the OSD superblock
epoch.  If the OSD dies after the OSD epoch passes the split
but before the pg epoch passes the split, the PG will be
reloaded at the OSD epoch and won't see the split operation.
The PG collection might after that point contain incorrect
objects which should have been split into a child.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:53:07 -08:00
Samuel Just
9f169ac0f5 OSD: account for split in project_pg_history
split causes a new interval.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:53:07 -08:00
Samuel Just
15d899370f PG: update info.last_update_started in split_into
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:53:07 -08:00
Samuel Just
338f3688b0 OSDMonitor: require --allow-experimental-feature to increase pg_num
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:53:06 -08:00
Samuel Just
fb738506f6 PG: set child up/acting in split_into
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:53:06 -08:00
Samuel Just
3f412e88fa OSD: do _remove_pg in add_newly_split_pg is pool if gone
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:52:54 -08:00
Samuel Just
19e6861daf osd/: dirty info and log on child during split
Otherwise, the log may not get written out.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:51:56 -08:00
Samuel Just
9835e19015 osd/: mark info.stats as invalid after split, fix in scrub
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:51:56 -08:00
Samuel Just
5f8a3634c4 PG: split ops for child objects into child
Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:51:56 -08:00
Samuel Just
9981bee565 OSD: add initial split support
PGs are split after updating to the map on which they split.
OSD::activate_map populates the set of currently "splitting"
pgs.  Messages for those pgs are delayed until the split
is complete.  We add the newly split children to pg_map
once the transaction populating their on-disk state completes.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-12-06 22:51:52 -08:00
Samuel Just
58890cfad5 librados: watch() should set the WRITE flag on the op
This caused a bug where the watch operation bypassed the is_degraded()
check in the write path and the repop got sent to the replica where the
replica crashed due to the is_missing() assert in sub_op_modify.

Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-12-06 16:56:41 -08:00