Commit Graph

13933 Commits

Author SHA1 Message Date
Colin Patrick McCabe
6e49c06ca9 conf: add observer framework
Objects can now register as configuration observers interested in a
subset of the configuration keys. The observers will be told exactly
which keys have changed.

The first user is dout, which now no longer needs the infamous SIGHUP
hack to know when to reopen the config file.

librados: Remove rados_reopen_log, which was basically a means for the
library user to trigger the SIGHUP behavior.

Changes are accumulated and applied all at once by apply_changes. This
function is called as part of common_init, and after every call to
injectargs.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-19 17:28:00 -07:00
Colin Patrick McCabe
433deec0c9 dout: make dout a member of md_config_t
Since logging options are per-config, logically DoutStreambuf instances
should also be per-config. This also allows us to eliminate the
"if (uninitialized)" checks at the beginning of every call to dout.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-19 15:03:26 -07:00
Colin Patrick McCabe
9a38acf08d dout: remove DOUTSB_FLAG_STDOUT
This was used to implement log_to_stdout, but that doesn't exist any
more. Instead of we have log_to_stderr and the other stuff.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-19 15:03:26 -07:00
Greg Farnum
0b6a023f5f PGMap: add redo_full_sets() function for when ratios change.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-19 15:02:58 -07:00
Greg Farnum
515c767798 osdmon: Clean up debug output on map full flag.
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-19 14:55:43 -07:00
Greg Farnum
a2613f8274 PGMap: add [near]full_ratio to the Incremental and encoding.
This way these ratios can be distributed by map updates.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-19 14:55:43 -07:00
Greg Farnum
af92e8bfcd PGMap: always decode pg_remove.
pg_remove has been included for longer than we've had versions
in the struct, so this check for end is useless -- if pg_remove
wasn't encoded we're already broken by decoding the version at
the beginning.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-19 14:55:43 -07:00
Tommi Virtanen
ad71955a21 cfuse, mds, dout: Do not create "rank" symlinks for log files.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-04-19 13:57:14 -07:00
Sage Weil
bd7922a10a remove old debian build helper scripts.
This is now handled by ceph-build.git

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-19 11:59:46 -07:00
Colin Patrick McCabe
54284c0aef common: add environment.cc/environment.h
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-19 10:28:16 -07:00
Colin Patrick McCabe
87def518dd common_init: move version printout to common_init
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-18 17:54:29 -07:00
Colin Patrick McCabe
ae0f5f03a6 interval_set: slightly better API for erase
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-18 17:32:16 -07:00
Colin Patrick McCabe
faffcc561a Change some global config options to env vars
Options that are inherently global, like malloc settings, and also
inherently debugging or profiling settings should be environment
variables.

tcmalloc_profiler_run, profiler_allocation_interval,
profiler_highwater_interval, and buffer_track_alloc fall into this
category.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-18 16:26:41 -07:00
Sage Weil
2e41f084d4 journaler: fix do_flush adjustment
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-18 15:32:43 -07:00
Sage Weil
bb4cfabc45 osd: assert on query on deleting pg
This shouldn't happen; assert if it does.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-18 15:30:50 -07:00
Sage Weil
67721b005e osd: do not create pgs on query
We do not need to create the pg on query.  If we are a new replica we can
create it when we get the PGLog activate message.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-18 15:29:07 -07:00
Sage Weil
b05f1ba4c4 journaler: truncate/zero ahead of write position
Remove/zero objects N periods ahead of the journal write position.  This
ensures that when we reprobe the journal length, we will always detect the
end position as the correct write_pos, even when there is weird data
"ahead" of us that we may bump up against.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-18 15:06:58 -07:00
Sage Weil
974d859e83 filer: remove whole objects on zero()
Make filer::zero() remove any whole objects.  This is required by the
Journaler, given the way it probes the journal length.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-18 15:06:56 -07:00
Sage Weil
0f0c1c853e interval_set: implement erase(iterator)
Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-18 15:06:53 -07:00
Sage Weil
eaf5241363 Merge branch 'next' 2011-04-18 15:06:47 -07:00
Greg Farnum
e6393525cf journaler: check return code on _finish_write_head.
If we get an error code and assume we successfully wrote the head,
there are going to be all kinds of issues on replay!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-18 14:34:14 -07:00
Sage Weil
68863bb453 osd: make ZERO on non-existent object a no-op
Fixes bug where oi.size gets out of sync with the object size because we
actually write zeros.  (This explains #933.)

Signed-off-by: Sage Weil <sage@newdream.net>
2011-04-18 13:55:16 -07:00
Colin Patrick McCabe
42a7013907 dout: remove references to g_conf
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-18 13:12:52 -07:00
Colin Patrick McCabe
ab9dc12231 vstart tests: specify ceph.conf
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-18 13:12:52 -07:00
Yehuda Sadeh
878f4a45ce rgw: return appropriate error for unresolvable email in acl 2011-04-18 12:54:31 -07:00
Colin Patrick McCabe
b8e791bc61 config: reorder config_option struct members
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-18 11:53:30 -07:00
Colin Patrick McCabe
756a2acc78 config: remove unused OPT_NONE type
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-18 11:44:37 -07:00
Colin Patrick McCabe
8038c491ba clitests: fix radosgw_admin test
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-18 11:44:37 -07:00
Colin Patrick McCabe
3f275bcf3c clitests: eliminate use of old-style section name
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-04-18 11:44:37 -07:00
Greg Farnum
6058a36c4e MDS: move slave rename xlock handling before finish_export_inode.
finish_export_inode changes states! That's not good for our checks,
so just handle unpinning and stuff before we finish_export_inode.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-18 10:41:29 -07:00
Greg Farnum
14dd299489 improve debug printing 2011-04-18 10:41:08 -07:00
Greg Farnum
d857983301 mds: Unify migration-handling code in _commit_slave_rename.
We need to handle locks and pins on exported inodes but we
were using a separate if block with its own (non-matching!) check
for no good reason.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-18 10:41:02 -07:00
Greg Farnum
6bd20815e2 mds: _commit_slave_rename needs to drop auth_pins for exported xlocks.
Otherwise these pins are never dropped from the inode since we
don't go through our normal xlock teardown code. Now we do!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-18 10:40:43 -07:00
Greg Farnum
1a6f43763f MDS: Make _rename_apply inode import auth_pinning more intelligent.
We don't want auth_pins on the locallocks (they're never auth_pinned)
and we only want new auth_pins that are for locks on the inode that we
imported -- not for each xlock that the mdr has everywhere (like,
say, on the srcdn)!

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-18 10:40:21 -07:00
Greg Farnum
478c617311 mds: If we're a slave, clean up xlocks when we export an inode.
Because we can do an inode import during a rename that skips the usual
channels, we were getting into an odd state with the xlocks (which we
did as a slave for an inode that we exported away). Clean up the
record of these xlocks for inodes before we get into the request
cleanup (at which point we are labeled as no-longer-auth, and the
standard cleanup routines will break).

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-18 10:40:10 -07:00
Greg Farnum
5299aabe1c mds: properly drop imported xlocks.
Because we can do an inode import during a rename that skips the usual
channels, we were getting into an odd state with the xlocks (which
were formerly remote and are now local). Clean up the record of
those remote xlocks.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-18 10:40:04 -07:00
Greg Farnum
97e357c430 MDS: Server takes auth_pins for xlocks on imported inodes.
Should fix #934.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-18 10:36:22 -07:00
Sage Weil
c966410fab osd: show "full" or "nearfull" in osdmap summary line
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-18 09:57:55 -07:00
Sage Weil
879adb6190 Merge remote branch 'origin/stable'
Conflicts:
	src/osdc/Journaler.cc
2011-04-18 09:58:15 -07:00
Yehuda Sadeh
fa7061d2da Merge branch 'rgw_uid' 2011-04-18 09:56:08 -07:00
Yehuda Sadeh
796528c3db rgw: remove get_user_info() and clean up
rename all the get_uid_by_* to get_user_info_by_*, remove get_user_info()
and call the appropriate function instead (either the by_uid or by_access_key).
2011-04-18 08:56:52 -07:00
Yehuda Sadeh
d8fe208d06 rgw: store user info on all indexes in the same format
this breaks backward compatibility, we'll have to deal with that
later.
2011-04-18 08:32:09 -07:00
Yehuda Sadeh
11f1e2ef52 rgw_admin: can lookup user by access key 2011-04-18 08:15:11 -07:00
Sage Weil
d778921888 mount.ceph: behave when CONFIG_KEYS is not compiled in
In that case we get ENOSYS.  This also implies an old version of the client
and that we should fall back.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-17 21:58:27 -07:00
Wido den Hollander
d21bdd6e29 radosgw_admin: Update manpage to new syntax
Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Colin McCabe <cmccabe@alumni.cmu.edu>
2011-04-17 17:42:04 -07:00
Greg Farnum
1eccc019ed MDS: Fix Locker::handle_reqrdlock for xlocked locks.
We previously dropped the request but that was inappropriate for that
one case because the replica has no way to trigger a resend.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-16 21:04:52 -07:00
Sage Weil
79cac5ee3a mds: Always _open_parents when opening a new snaprealm
Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-04-16 21:03:48 -07:00
Greg Farnum
a028c8954c mds: don't run all of try_subtree_merge on a rename across MDSes.
Previously we'd try and do the whole thing, which meant that
the replica got a lock twiddle before it had finished the export.
That broke things spectacularly, since we weren't respecting our
invariants about who gets remote locking messages.
Now we pass through a flag and respect our invariants.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-16 21:03:37 -07:00
Greg Farnum
6250e82c00 mds: adjust LocalLock can_xlock_local().
I don't remember why we needed can_xlock_local() to begin with, but
I can tell that adding this get_xlock_by() check won't stop anything
working that was ever working to begin with (really it's still not
strong enough a check).

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-16 21:02:56 -07:00
Greg Farnum
5a65a04a9c mds: Extend use of find_ino_peers.
Missed a few places that need it.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-04-16 21:02:48 -07:00