Commit Graph

18638 Commits

Author SHA1 Message Date
Samuel Just
e0c4db9e79 FileStore: do not check dbobjectmap without option set
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2012-04-05 14:53:52 -07:00
Sage Weil
41f84fac1a filestore: set guard on collection_move
During recovery we submit transactions like:

 - delete a/foo
 - move tmp/foo to a/foo

This prevents the EEXIST check in collection_move from doing any good,
since the destination never exists.  We need to do that remove at least
sometimes, because we may be overwriting an existing/older version of the
object.

So,
 - set the guard after we do the move, so that
 - the delete won't be repated, and
 - the EEXIST check will work

Also check the guard for good measure (although that doesn't do anything
specifically useful in this scenario).

Fixes: #2164
Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
2012-03-30 09:52:09 -07:00
Sage Weil
c89b7f22c8 v0.44.1 2012-03-27 13:02:09 -07:00
Alexandre Oliva
3ab28950be don't override CFLAGS
leveldb adds -I flags to CFLAGS and CXXFLAGS, but if these macros are
overridden in the make command line, the flags are dropped, and the
build fails.  leveldb should probably use AM_CFLAGS instead, but the
spec file can specify the preferred CFLAGS in the configure command
line, and then everything will work as expected.

Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-25 07:57:39 -07:00
Jim Schutt
d3bcac241f Makefile: fix modules that cannot find pk11pub.h when compiling with NSS on RHEL6
Signed-off-by: Jim Schutt <jaschut@sandia.gov>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-25 07:57:39 -07:00
Samuel Just
2e21adf269 Objecter: resend linger_ops on any change
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-03-21 16:41:16 -07:00
Samuel Just
52aff4871c ObjectStore: Add collection_move to generate_instances
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2012-03-21 16:35:27 -07:00
Samuel Just
ec52eeb2ae FileStore: remove src on EEXIST during collection_move replay
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2012-03-21 16:35:27 -07:00
Samuel Just
23313ee6b7 FileStore: whitelist COLLECTION_MOVE on replay
Signed-off-by: Samuel Just <rexludorum@gmail.com>
2012-03-21 16:35:27 -07:00
Samuel Just
b47454b65a ObjectStore: add COLLECTION_MOVE to dump
Signed-off-by: Samuel Just <rexludorum@gmail.com>
2012-03-21 16:35:27 -07:00
Sage Weil
cdd5298d27 v0.44 2012-03-20 11:41:08 -07:00
Yehuda Sadeh
e42fbb70be rgw: process default alt args before processing conf file
this fixes #2189

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-20 10:59:52 -07:00
Sage Weil
77c08f866a osd: fix object_info.size mismatch file due to truncate_seq on new object
If the first write that creates an object includes a truncate_seq and
truncate_size, we were taking the truncte patch and doing a truncate op
in our transaction prior to the write, and then setting the object_info
size appropriately.  However, if the object doesn't exist, the truncate
op fails even though the oi.size gets set.

Later, this turns up as a scrub error (see #2080).

Fix this by skipping the truncate if it is a new object.  Instead, we
should just initialize our truncate_{seq,size} metadata so that we're all
up to date for any later writes.

Alternatively, we could touch the object and then truncate it (up) to the
large size, but this is sort of a waste; data beyond a short object eof is
defined to be zeros, so all we would accomplish is making recovery work
harder by copying zeros around.

Fixes: #2080
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
2012-03-18 09:08:41 -07:00
Sage Weil
63ec06b349 osd: remove special handline for head recovery from clone
This breaks because:

 - we don't have the head or current snapset
 - get_object_context() creates a new snapset, which is wrong

We probably can only do this if we are certain we can construct/modify
the old snapset and end up with the correct one.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-16 14:36:38 -07:00
Sage Weil
15d85af4ce osd: explicitly create new object,snap contexts on push
We specifically want to use this during recovery to avoid loading the obc
or ssc for a previous version of the object and populating the watchers.
We know we won't have any existing obc here because it is missing (old or
dne).

For the snapset context, we provide it explicitly when we recover the head
or snapset object (which we always do first).  For clones, we re-use the
existing get_snapset_context(), which will either have the ssc open or
can load it from the head/snapset object.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-16 13:30:51 -07:00
Sage Weil
d4addf5798 osd: re-use create_object_context() in get_object_context()
Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-16 13:30:51 -07:00
Sage Weil
58c5d5a033 osd: ReplicatedPG::create_object_context()
New helper that creates a new object context.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-16 13:30:51 -07:00
Sage Weil
96780bd196 osd: create_snapset_context()
Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-16 13:04:59 -07:00
Sage Weil
872bdd0d74 osd: ensure we don't clobber other *contexts when registering new ones
Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-16 12:15:06 -07:00
Samuel Just
f2e6b8d750 ReplicatedPG: populate_object_context during handle_pull_response
A cached objectcontext should always have its watchers populated.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2012-03-16 10:04:41 -07:00
Sage Weil
89ccd95a1b osd: maybe clear DEGRADED on recovery completion
We set degraded if we don't have enough "active" replicas, which excludes
the backfill target.  We need to recheck that when we finish recovery and
the backfill target is now complete.

Fixes: #2160
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-03-15 10:35:40 -07:00
Sage Weil
bec47b577c introduce CEPH_FEATURE_OMAP
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-14 12:59:37 -07:00
Sage Weil
20d1171410 osd: rev cluster internal protocol
This covers:

- the push/pull changes in 0.43 (which we forgot to protect against; see
  #2132)
- the new omap stuff for 0.44

Maybe we could make this finer grained so that ceph-osd would fail only
when mismatched versions are talking _and_ there is actual omap data in
play, but it's not worth the effort at this point.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-14 12:14:20 -07:00
Sage Weil
a0bcab5a58 ceph-fuse: make big_writes optional via 'fuse big writes'
Fixes: #2159
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-14 09:36:27 -07:00
Yehuda Sadeh
98792e9363 rgw: add more meaningful tests instances of encoded objects
this completes #2140

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-12 17:02:53 -07:00
Sage Weil
dfe50bcbec build-doc: use alternate virtualenv dir, if specified
The docs gitbuilder will use this to avoid rebuilding the virtualenv on
every build.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-12 16:46:31 -07:00
Sage Weil
6869c5766b test_idempotent: fix global_init call
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-12 15:12:55 -07:00
Sage Weil
401a571613 qa: kclient/file_layout.sh poking
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-12 15:01:59 -07:00
Yehuda Sadeh
7e0e7ce1eb rgw: modify bucket instance for encoding test
This makes 'make check' happy, otherwise we need to create
a bucket name that starts with a period. This version is better.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-12 14:59:44 -07:00
Samuel Just
f20f6ea7f1 test: add test_filestore_idempotent2
Signed-off-by: Samuel Just <rexludorum@gmail.com>
2012-03-12 14:58:26 -07:00
Samuel Just
6ca070ad2f FileStore: ignore ERANGE and ENOENT on replay
The source object may either not exist or be the wrong size
during replay if the destination object was deleted in a future
already-applied operation.  This should not impact correctness
of the replay.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2012-03-12 14:58:26 -07:00
Samuel Just
9969bba879 FileStore: clarify debug/error output
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2012-03-12 14:58:26 -07:00
Yehuda Sadeh
e19417ef55 Makefile.am, rgw: remove fcgi dependency where not needed
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-12 14:41:24 -07:00
Yehuda Sadeh
3ff5492c62 rgw: add more meaningful test instances of some encoded objects
still need to add tests for other objects

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-12 14:22:53 -07:00
Yehuda Sadeh
31578c19ff rgw: tone down some log messages
dout(0) -> dout(1)

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-12 13:22:49 -07:00
Yehuda Sadeh
452b1248a6 rgw: provide different default values for 'debug rgw'
Currently rgw and radosgw-admin require different chattiness
defaults.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-12 13:21:27 -07:00
Yehuda Sadeh
2c88f85c6d config: alternative config options for global_init()
We want to be able to provide alternative default config values, than
the ones we set in common/config_opts.h. This can be useful when we
want different default for different modules (e.g., rgw, rgw-admin).
Just passing it on the command line won't do because then we'd override
any config set by the user, so we need to process that before the regular
parsing (but after initializing the config context).

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-12 13:21:22 -07:00
Sage Weil
968d29d138 qa: use recent kernel for kernel_untar_build.sh
Happier on oneiric!

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-12 12:01:41 -07:00
Yehuda Sadeh
93164393b3 rgw: switch ops log flag to use ceph config
It's turned on by default. So now we're using the
'rgw enable ops log' config param in ceph.conf, instead
of RGW_SHOULD_LOG_DEFAULT in the apache conf.

Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-12 11:43:20 -07:00
Sage Weil
c9898f4352 filestore: fix op_num offset/labels
Start at 0, not 1.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-12 11:22:27 -07:00
Yehuda Sadeh
7c75349804 config: tmap to omap upgrade, true by default
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
2012-03-12 11:20:08 -07:00
Sage Weil
3bba6b72e4 Makefile: link libfcgi to librgw
Need this to make a linker error go away on my squeeze dev box.  We
probably need to make sure librgw doesn't touch fcgi, once that is
revisited down the line.  Opened #2166.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-11 21:16:31 -07:00
Sage Weil
945218cc30 qa/workunits/kclient/file_layout: escape *
Escape * so that it is expanded as root.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-11 20:36:47 -07:00
Sage Weil
a8497874b7 filejournal: less log noise
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-11 12:31:17 -07:00
Sage Weil
0851b747ba filestore: remove unused bool idempotent
This was from the old broken mechanism.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 20:55:09 -08:00
Sage Weil
6980ed988b filestore: fix arguments
From a change that was rebased out; missed this caller.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-09 17:07:02 -08:00
Sage Weil
ea34aa59ee Merge remote branch 'gh/wip-2098'
Reviewed-by: Samuel Just <samuel.just@dreamhost.com>
2012-03-09 16:42:15 -08:00
Sage Weil
9b2a5c5d84 filestore: sync object_map on _set_replay_guard()
We need to sync the object_map too.  We can _almost_ check to see if there
are keys for the object and only do it then, except that they may have
existed previously and then been deleted.

So, always sync.  leveldb is reasonably nice about this... it should just
be another fsync.

Signed-off-by: Sage Weil <sage@newdream.net>
2012-03-09 16:34:55 -08:00
Sage Weil
c9550c59ad omap: add sync method to ObjectMap
Signed-off-by: Samuel Just <rexludorum@gmail.com>
2012-03-09 16:32:23 -08:00
Sage Weil
13afce8300 filestore: remove old post-idempotent transaction trigger_commit
The old strategy was to initiate a commit after any non-idempotent
transaction.  This only worked if the transaction was idempotent with
respect to itself, or could be replayed partially without problems,
and in reality that isn't the case.  For example:

 - clone A -> B
 - write to A
 - <sync>

If we crash before the sync, and replay the clone A->B, we corrupt B with
the new A data.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2012-03-09 16:32:23 -08:00