Commit Graph

14387 Commits

Author SHA1 Message Date
Sage Weil
4fbd6c23c9 mds: assert auth on journal_cow_dentry
We have no business doing cow (or journaling) non-auth dentries.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-06 13:15:18 -07:00
Sage Weil
f757f134e9 mds: don't journal src when not auth on rename
If we aren't auth for the srcdn, don't put it in the journal, or else we'll
barf on journal replay.

This fixes a crash reproduced with

sudo mkdir mnt/foo
sudo touch mnt/foo/a
sudo ln mnt/foo/a mnt/foo/b
sudo rm mnt/foo/a

sudo mkdir mnt/bar
sudo touch mnt/bar/nothing

./ceph mds tell 0 export_dir /bar 1

sudo mv mnt/foo/b mnt/bar/b

+ mds restart.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-06 13:15:18 -07:00
Josh Durgin
621af5e319 PG: choose_acting needs the value of the osd, not its index
This caused two osds to keep flipping the acting set between [2] and
[0,2] when osd.0 was far behind and needed a backlog. This is visible
as toggling between peering and peering+degraded.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-05-06 12:25:25 -07:00
Colin Patrick McCabe
2315a64e91 Create rados_sync tool to back up rados pools
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-06 12:06:30 -07:00
Tommi Virtanen
0edbc75a5f stop.sh: Avoid bashisms.
I have a habit of running "sh -x stop.sh" whenever it seems
to fail, and that runs it with dash, not bash. Since it
doesn't actually need the bashisms, remove them.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-05-06 11:10:16 -07:00
Tommi Virtanen
6ee6261cc1 stop.sh: Whitespace.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-05-06 11:07:05 -07:00
Sage Weil
6c366c0648 osd: fix include in cosd.cc too
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-06 09:26:59 -07:00
Sage Weil
88875fbaef osd: rearrange #includes to get our assert
Make sure we include boostchart headers before our common/assert.h so that
ours clobbers theirs.  Otherwise the generic one will clobber ours and our
assert output won't get logged or be as pretty.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-06 09:26:32 -07:00
Sage Weil
d6ebf6001f mon: fix multi-osd 'ceph in|out N..' operations
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-05 16:27:33 -07:00
Colin Patrick McCabe
3ee41ab83c ceph_argparse: ignore dashes after equals sign
When parsing argv, ignore dashes after equals signs. This is so that
things like --log-file=/tmp/foo-file will work correctly.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-05 16:24:53 -07:00
Sage Weil
57bc9b3f86 Merge branch 'wip_pg_refactor' 2011-05-05 16:17:21 -07:00
Josh Durgin
2ab3062ba6 PG: strays don't peer (only the primary does)
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-05-05 16:36:01 -07:00
Josh Durgin
76febd2d61 PG: clear peering flag when we transition from Peering to Reset
This is safe because the only other transitions are to Pending (still
peering) and Active, which clears the state itself.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-05-05 16:35:45 -07:00
Sage Weil
3b92d40826 Merge branch 'stable' 2011-05-05 16:17:17 -07:00
Sage Weil
dc9be20006 osdmap: fix temp osd pg mapping
If you feed in a raw pg (full precision) you should get the same mapping
out as when you plug in the effective/reduced precision pg.  The
raw_to_temp_osds() wasn't doing that, which gave you results like

flak:src 04:01 PM $ ./ceph pg map 0.4
2011-05-05 16:01:18.524051 mon <- [pg,map,0.4]
2011-05-05 16:01:18.524987 mon2 -> 'osdmap e11 pg 0.4 (0.4) -> up [1,0] acting [0]' (0)
flak:src 04:01 PM $ ./ceph pg map 0.7ed4
2011-05-05 16:01:21.755490 mon <- [pg,map,0.7ed4]
2011-05-05 16:01:21.755996 mon1 -> 'osdmap e11 pg 0.7ed4 (0.4) -> up [1,0] acting [1,0]' (0)

The objecter was feeding in raw pgs, so this was sending requests to the
wrong nodes.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-05 16:12:26 -07:00
Sage Weil
5c520fefce mon: do not stop mds0 unless all other nodes have also stopped
If we are the root node or the tableserver, we have to shut down last.
(And even then, if we have client sessions, we can't fully shut down, we
can only kill ourselves!)

Fixes: #1048 (sorta)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-05 15:15:03 -07:00
Sage Weil
58ea8358a9 Merge branch 'stable'
Conflicts:
	src/mds/Resetter.cc
2011-05-05 15:24:48 -07:00
Greg Farnum
6ac5572946 PG: handle MOSDPGLog messages in Active state.
We previously didn't, but we definitely need to as we can go
active while waiting on strays to send in logs to recover missing
objects.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-05-05 14:36:26 -07:00
Tommi Virtanen
79b1a10149 ceph_crypto: Fix ceph::crypto::init mutex for NSS.
Even after ceph::crypto::shutdown, the library looked
already initialized; this broke the ForkDeathTest.MD5
in "make check", and NSS-using daemons.

See 921d4b3d8b for more.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-05-05 14:07:02 -07:00
Sage Weil
44900d4c13 v0.27.1 2011-05-05 13:42:20 -07:00
Colin Patrick McCabe
27a48c1c88 ceph::crypto::init: add PTHREAD_MUTEX_INITIALIZER
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-05 13:38:30 -07:00
Sage Weil
7d12d1807f mds: fix --reset-journal
Don't fork.  (Already fixed in master branch by the start_with_nonce
refactor, so this is just for 0.27.1.)

Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-05 13:35:50 -07:00
Colin Patrick McCabe
28ccdf4236 obsync: remove misguided strip_owner
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-05 13:27:53 -07:00
Colin Patrick McCabe
8606449130 test-obsync.py: allow better nonce,better printout
Support deterministic nonces. Better debug printouts.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-05 13:27:53 -07:00
Sage Weil
8460cffae2 libceph: initialize keyring after conf is parsed
Init the keyring in ceph_mount, after the user has a change to load a conf
file or parse command line args.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-05 13:07:38 -07:00
Sage Weil
2ca61c9278 osdmap: small cleanup
Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-05 13:07:38 -07:00
Sage Weil
e6dfcfda99 fix some shadowing arguments
Small subset of what -Wshadow turns up.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-05-05 13:07:37 -07:00
Colin Patrick McCabe
921d4b3d8b crypto: fix non-reentrancy of ceph::crypto::init
This could be called multiple times from common_preinit.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-05 12:44:40 -07:00
Colin Patrick McCabe
429bf1fe93 test-obsync: use s3-tests configuration file
Use the same configuration file format as s3-tests. This should make it
easier for people to run obsync tests!

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-05 11:39:57 -07:00
Sage Weil
b8055b4531 osd: fix GetInfo down check
The PgPriorSet::down set can have lots of stuff it in without it affecting
peering completion.  We just need to look at the some_down flag to tell us
if any nodes in the _cur_ set are down, which indicates no progress is
possible (unless/until someone starts up again or last_epoch_started moves
forward in time).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-05 11:20:58 -07:00
Sage Weil
db4026d24e osd: some comment, debug output cleanup
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-05 10:55:30 -07:00
Sage Weil
a284e205a5 osd: reg_last_scrub on pg load
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-05 10:54:38 -07:00
Colin Patrick McCabe
2b1c61e4f1 obsync: remove omit_owner for acls
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-05 10:22:48 -07:00
Colin Patrick McCabe
8964359c9d obsync: implement --force option
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-05 10:19:16 -07:00
Colin Patrick McCabe
24f641f806 obsync: be more verbose about set_xml_acl errors
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-05 10:19:16 -07:00
Colin Patrick McCabe
b39bb4627f boto_tool: add getacl, setacl
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-05 10:19:16 -07:00
Colin Patrick McCabe
6d8ddbc945 obsync: Fix ACL parsing yet again
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-05 10:19:16 -07:00
Sage Weil
5d77c54329 osd: GetLog, GetMissing cleanups, fixes
Added missing continue in GetMissing ctor.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-05 10:09:10 -07:00
Sage Weil
fe988b110b osd: only transition to Pending from GetInfo cons
No need to do so in get_infos().  The need_up_thru requirement will only
get better as last_epoch_started floor moves forward in time, not worse.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-05 10:03:54 -07:00
Sage Weil
d2865501ba osd: consistent naming
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-05 09:30:29 -07:00
Sage Weil
04e343c951 osd: handle notify+info explicitly in GetInfo state
This fixes a few things:
 - do not proceed past GetInfo if there are down osds.  ever.
 - if we get a new info that moves last_epoch_started forward,
   rebuild prior, because we may have eliminated said down osds.
 - if we get dup info, do nothing
 - if we get new info, see if we can proceed to GetLog

This is all simpler/cleaner by handling Notify/Info (they're the same)
explicitly in the GetInfo state and not falling back to the parent
state handler.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-05 08:54:23 -07:00
Sage Weil
ade1fcb7d5 osd: statechart whitespace
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-05 08:18:55 -07:00
Sage Weil
565de26115 osd: initialize pg state event counters
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-05 08:14:17 -07:00
Sage Weil
c24859f1cb osd: fix GetInfo querying
Don't query for info we already have, or have already requested.  Remove
unneeded helper so that this is simpler and we have access to the info
we need.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-05 08:12:24 -07:00
Sage Weil
1fbefb32f9 osd: handle event notify/info/log from Initial
We shouldn't post a creation event and jump into peering/stray based on
pg creation when we are about to process more information or else we will
send out unnecessary queries.  Instead, handle those from Initial and jump
to the appropriate state.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-05 08:11:41 -07:00
Colin Patrick McCabe
d634739263 rgw: don't output optional DisplayName if not set
Don't output optional DisplayName if not set. Be a little more explicit
about zeroing other optional fields during xml parsing.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-04 17:25:20 -07:00
Sage Weil
b5cb4c5e97 osd: debug handle_*
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-04 16:44:45 -07:00
Colin Patrick McCabe
a544bda757 rgw: don't assume XML is valid
XML parsing functions in RGW now return a bool, indicating whether they
were able to get the fields they needed to out of the XML.
If any field returns false, the parsing is deemed to have failed.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-05-04 16:19:10 -07:00
Sage Weil
9ebcd3651e osd: fix min_time in state stats
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-04 16:10:05 -07:00
Sage Weil
4d66199949 osd: rename states to reflect nesting; fix enter/exit msgs
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-05-04 16:10:05 -07:00