Commit Graph

17192 Commits

Author SHA1 Message Date
Yehuda Sadeh
2e195500b5 rgw: don't log entries with bad utf8 2011-11-14 17:02:08 -08:00
Yehuda Sadeh
0276eab440 rgw: adjust error code in swift copy failures 2011-11-14 14:39:18 -08:00
Yehuda Sadeh
1fe16923b4 rgw: fix swift responses encoding 2011-11-14 13:55:29 -08:00
Josh Pieper
2445fd8416 rgw: Fix some merge problems uncovered by gcc warnings:
* a refactor in e2100bce left the mod_ptr and unmod_ptr members set
   incorrectly in RGWCopyObj::init_common
 * a fix in 6752babd aggregated error returns, but then failed to do
   anything with them

Signed-off-by: Josh Pieper <jjp@pobox.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-14 13:23:29 -08:00
Josh Pieper
cd90061239 Resolve gcc warnings.
These should have no functional changes:
 * Check errors from functions that currently cannot return any
 * Initialize variables that gcc can't determine will be initialized
   in a following function call
 * Remove unused variables

Signed-off-by: Josh Pieper <jjp@pobox.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-14 13:23:18 -08:00
Sage Weil
a5b8c8518f osd: remove dead osd_max_opq code
This is no longer used as of a while ago!

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-14 12:15:14 -08:00
Josh Durgin
f418775d2c workunits: rados python workunit should be executable
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-11-14 08:18:47 -08:00
Sage Weil
102c434297 crush: send debug output to dout, not stdout/err
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-13 14:18:19 -08:00
Sage Weil
25eee416fd test/run_cmd: use mkstemp instead of mkstemps
my box didn't have mkstemps

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-13 14:16:52 -08:00
Sage Weil
18009866f2 ceph-authtool: fix clitests
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-13 14:07:01 -08:00
Sage Weil
d476ae2509 test_str_list: make sure ' ' and ', ' separaters work for str lists
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 15:17:29 -08:00
Sage Weil
ecd713c5c3 ceph-authtool: make error msg more helpful
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 14:55:39 -08:00
Sage Weil
4f39aaa7a9 keyring: don't print auid if it is the default
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 14:55:28 -08:00
Sage Weil
ee02a1e12b mon: implement 'fsid' command
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 14:55:06 -08:00
Sage Weil
5a3004e2c4 Merge branch 'stable' 2011-11-12 14:19:26 -08:00
Sage Weil
73f99a189f mon: fix 'osd crush add ..' weight
This was changed to floating point in commit 3f67893.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 14:08:02 -08:00
Sage Weil
1b843e0ef6 osdmap: build_simple with normal osd/host/rack/pool hierarchy
This will be useful in the general case where the cluster is created with
an empty map and useful crush hierarchy.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 14:05:15 -08:00
Sage Weil
ec97c852d7 mon: fix 'osd crush add ..' weight
This was changed to floating point in commit 3f67893.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 14:04:15 -08:00
Sage Weil
0349fa9625 vstart.sh: don't generate initial osdmap explicitly
This is simpler and exercises the monitors ability to start with a generic
osdmap and build it out as new osds are added to the cluster.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 13:42:38 -08:00
Sage Weil
30ddc85e54 mon: make initial osdmap optional
If an initial osdmap is not provided, we generate an empty one.  The user
add osds on their own after that.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 13:41:59 -08:00
Sage Weil
0d812252d7 osdmap: build_simple: create reasonable pools when numosd==0
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 13:41:05 -08:00
Sage Weil
8e150fb496 mon: add '--fsid foo' arg for setting generated monmap fsid
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-12 13:16:30 -08:00
Sage Weil
b51d817e23 mon: take '--fsid foo' arg with --mkfs
This will set the seed monmap's fsid.  This is useful if the monmap is
dynamically generated (e.g., based on ceph.conf or --mon-host list).

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-11 21:04:58 -08:00
Sage Weil
0c731ed7a9 osd: fix warnings
osd/ReplicatedPG.cc: In member function 'virtual void ReplicatedPG::remove_watchers_and_notifies()':
osd/ReplicatedPG.cc:1167: warning: suggest a space before ';' or explicit braces around empty body in 'for' statement
osd/ReplicatedPG.cc:1176: warning: suggest a space before ';' or explicit braces around empty body in 'for' statement

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-11 21:04:56 -08:00
Sage Weil
73705f661b monmaptool: fix clitests
Initial map is epoch 0.  Modifications still bump epoch by one.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-11-11 20:52:28 -08:00
Sage Weil
36241da4b1 paxos: discard waiting_for_active events on reset
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 20:49:00 -08:00
Sage Weil
80ab65682a monclient: use blank fsid (instead of epoch==0) for monmap checks
We can safely mkfs with an epoch=0 monmap as long as the fsid is set.  And
that is what commit f31825cee5 changed.

Instead, use a zeroed fsid to tell if the monmap is valid/usable.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 20:48:59 -08:00
Sage Weil
2253c0168d use libuuid for fsid
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 20:48:59 -08:00
Sage Weil
07950bb8f0 crush: grammer: allow '.' in name token
These are now in the generated crush maps, so it seems appropriate to
recompile them :).

Reported-by: Martin Mailand <martin@tuxadero.com>
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 14:59:38 -08:00
Sage Weil
cf0a53e1ed mon: fix seed monmap removal
Remove if we previous had no latest, not based on which map we now have.
It's possible we join when monmap epoch is something much larger than 1!

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 14:54:41 -08:00
Sage Weil
6d370f3bd6 mon: allow monitor to automagically join cluster
If a monitor starts up with the correct fsid and auth keys, it will now
add itself to the monmap (and subsequently try to join the quorum) if it
is not already in the monmap.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 14:52:44 -08:00
Sage Weil
d56485a8af osd: pass monclient::init errors up the stack
Fixes crash like

 ceph version 0.38-149-gbf254de (commit:bf254de5cf8a17ce9467d166d87f3ab93170ae13)
 1: (ceph::BackTrace::BackTrace(int)+0x2d) [0x91d97b]
 2: ./ceph-osd() [0xa05baa]
 3: (()+0xef60) [0x7fb54c87ef60]
 4: (std::_Rb_tree<unsigned int, unsigned int, std::_Identity<unsigned int>, std::less<unsigned int>, std::allocator<unsigned int> >::size() const+0xc) [0x8a4bc6]
 5: (std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int> >::size() const+0x18) [0x8a1d32]
 6: (void encode<unsigned int>(std::set<unsigned int, std::less<unsigned int>, std::allocator<unsigned int> > const&, ceph::buffer::list&)+0x1c) [0x8a0311]
 7: (MonClient::_reopen_session()+0x2c5) [0x89a425]
 8: (MonClient::authenticate(double)+0x24f) [0x898da7]
 9: (OSD::init()+0x112b) [0x807ca1]
 10: (main()+0x2c09) [0x73e406]
 11: (__libc_start_main()+0xfd) [0x7fb54b04ec4d]
 12: ./ceph-osd() [0x73b499]

due to auth_supported being NULL.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 12:52:24 -08:00
Sage Weil
bf254de5cf mon: verify fsid during probe and election
This will keep mismatched fsids out of the same quorum.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 12:37:07 -08:00
Sage Weil
f1a98fb8af mon: tolerate won election while active
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 12:22:37 -08:00
Sage Weil
cd736b9da0 mon: clean up logic a bit
More explicit.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 12:22:22 -08:00
Sage Weil
2633d71dbd mon: only re bootstrap if monmap actually changes
If we go thru here just to update latest, that's fine; no need to restart
the bootstrap process.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 12:22:09 -08:00
Sage Weil
622fbadd66 paxos: fix off-by-one in share_state
We hit this on adding a new monitor to an existing cluster.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 12:15:16 -08:00
Sage Weil
6c663d855e mon: fix monmap update
It's on the stack; update in place.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 12:05:01 -08:00
Sage Weil
1134fdfe78 mon: properly process monmaps even when i have the latest
We may get the latest monmap when we are doing our probing, but we still
need to process it in update_from_paxos().  Consider get_latest_version()
in addition to the active map.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 12:02:52 -08:00
Sage Weil
c097e63401 mon: fix up update_from_paxos() methods
Make sure they behave when the initial state is learned from paxos.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 11:55:34 -08:00
Sage Weil
f31825cee5 monmaptool: new maps get epoch 0
Just for consistency's sake.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 11:41:42 -08:00
Sage Weil
65f797ea47 mon: clean up mkfs seed data
And make sure the monmap/latest gets written properly.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 11:41:42 -08:00
Sage Weil
e545af2db5 mon: remove empty monstore dirs
This is sloppy, but it works well enough since we mkdir dirs as needed
too.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 11:41:42 -08:00
Sage Weil
aea7563f03 mon: create initial states after quorum is formed
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 11:41:42 -08:00
Sage Weil
1533f1c0ed mon: stage mkfs seed info in mkfs/ dir
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 10:45:27 -08:00
Sage Weil
9e941c4359 mon: eliminate PaxosService::init()
update_from_paxos() is sufficient

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 10:34:42 -08:00
Sage Weil
0a926ef576 mon: include monmap dump in mon_status and quorum_status
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 10:19:33 -08:00
Sage Weil
8c3d872ef0 mon: pull initial monmap from monmap/latest OR mkfs/monmap
Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 10:15:23 -08:00
Sage Weil
0ecae9969e mon: take explicit initial monmap -or- generate one via MonClient
This will simplify bootstrapping a cluster via e.g. mon_host.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-11 10:05:36 -08:00
Sage Weil
dae6c95654 test_filestore_idempotent: detect commit cycles due to non-idempotent ops
If we do a non-idempotent op and it does a commit itself, we don't see
fs->is_committed() true ever.  Also count full commit cycles, and kill
ourselves after several of those have gone by.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-11-10 21:12:38 -08:00