Commit Graph

20878 Commits

Author SHA1 Message Date
Sage Weil
71a8d32195 Merge remote-tracking branch 'gh/wip-osd'
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-16 15:28:35 -07:00
Sage Weil
ef80abed73 msg/SimpleMessenger: fix leak of local_connection
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 14:43:07 -07:00
Sage Weil
34d626d083 test_librbd_fsx: fix leak
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 14:42:58 -07:00
Sage Weil
6e44e9e86d SyntheticClient: fix warnings
client/SyntheticClient.cc: In member function 'int SyntheticClient::play_trace(Trace&, std::string&, bool)':
client/SyntheticClient.cc:1494:22: warning: ordered comparison of pointer with integer zero [-Wextra]
  CXX    rados_sync.o
client/SyntheticClient.cc:1500:22: warning: ordered comparison of pointer with integer zero [-Wextra]

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 14:37:06 -07:00
Sage Weil
aaf0123660 librbd: make aio_discard declaration match definition
Fixes i386 build:

./.libs/librbd.so: undefined reference to `librbd::aio_discard(librbd::ImageCtx*, unsigned long long, unsigned int, librbd::AioCompletion*)'

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 14:37:06 -07:00
Sage Weil
7f4851c48e librbd: fix uninit var new_snap in ictrx_refresh()
Valgrind picked this up:
==22755== Conditional jump or move depends on uninitialised value(s)
==22755==    at 0x4EC2A11: librbd::ictx_refresh(librbd::ImageCtx*) (internal.cc:1384)
==22755==    by 0x4EC10F7: librbd::ictx_check(librbd::ImageCtx*) (internal.cc:1212)
==22755==    by 0x4EBD246: librbd::info(librbd::ImageCtx*, rbd_image_info_t&, unsigned long) (internal.cc:841)
==22755==    by 0x4E9D71A: rbd_stat (librbd.cc:584)
==22755==    by 0x4039A5: check_trunc_hack (fsx.c:477)
==22755==    by 0x4060FA: main (fsx.c:1508)

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 14:37:06 -07:00
Sage Weil
cfd0d4f5aa librbd: fix warning
librbd/internal.cc: In function 'int librbd::ictx_refresh(librbd::ImageCtx*)':
librbd/internal.cc:1334:59: warning: enumeral and non-enumeral type in conditional expression [enabled by default]

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 14:37:06 -07:00
Sage Weil
17e94147a9 heap_profiler: return result via ostream
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 14:37:06 -07:00
Sage Weil
79bdcbe676 cpu_profiler: outout to ostream instead of clog
This let's the 'ceph tell osd.N cpu_profiler ...' command return the result
to the caller.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 14:37:06 -07:00
Sage Weil
35753eb776 osd: avoid generate huge osdmap deletion transactions
Cap the number of maps we delete on each pass through handle_osd_map.  As
long as the target transaction size is larger than the number of maps we
get in each message, we'll be fine.  Ensure we at least keep pace with
incoming maps in case those values' relative sizes nave flipped.

Fixes: #2856
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 13:38:54 -07:00
Sage Weil
8a4d563ee2 osd: break potentially large transaction into pieces
We do a similar trick elsewhere.  Control this via a tunable.  Eventually
we'll control the others (in a non-stable branch).

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 13:33:29 -07:00
Sage Weil
e908cb9958 osd: only commit past intervals at end of parallel build
We don't check for gaps in the past intervals, so we should only commit
this when we are completely done.  Otherwise a partial run and rsetart will
leave the gap in place, which may confuse the peering code that relies on
this information.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 13:32:56 -07:00
Sage Weil
3fee99effb Merge branch 'next' 2012-08-16 13:21:39 -07:00
Sage Weil
da210bee09 osd: explicitly requeue waiting_for_map in on_change()
Since we are requeuing stuff anyway, do it all in the correct order. This
fixes a bug where take_waiters() comes along later (at activate_map time)
and puts waiting_for_map events at the front of the queue, in front of
e.g. waiting_for_missing.  This breaks ordering from the client's
perspective.

The convention should be: whenever you requeue, requeuing everything
that logically follows it first.

Fixes: #2947
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-16 13:15:11 -07:00
Sage Weil
fac699cf41 osd: simplify how in-progress ops are requeued
Requeue them explicity from apply_and_flush_repops() and call it last, so
that the overall ordering is preserved.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-16 13:15:10 -07:00
Sage Weil
10454721dc osd: rename op_waiters -> waiting_for_map
That's what it is used for; make the name descriptive.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-16 13:15:10 -07:00
Josh Durgin
eba5585630 Merge branch 'wip-rbd-protect-merge' 2012-08-16 13:00:26 -07:00
Josh Durgin
18054ba46f Merge branch 'wip-rbd-protect' into master
Conflicts:
	src/librbd.cc
	src/librbd/cls_rbd_client.h
2012-08-16 12:57:58 -07:00
Sage Weil
9fd7d4d603 mds: fix some gcc 4.7 warnings
mds/Server.cc: In member function 'CDir* Server::validate_dentry_dir(MDRequest*, CInode*, const string&)':
mds/Server.cc:1607:12: warning: converting 'false' to pointer type 'CDir*' [-Wconversion-null]
mds/Server.cc:1620:12: warning: converting 'false' to pointer type 'CDir*' [-Wconversion-null]
mds/Server.cc: In member function 'CInode* Server::rdlock_path_pin_ref(MDRequest*, int, std::set<SimpleLock*>&, bool, bool, ceph_file_layout**)':
mds/Server.cc:1874:21: warning: converting 'false' to pointer type 'CInode*' [-Wconversion-null]

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 12:53:18 -07:00
Sage Weil
407c350a1a crypto: remove unused label
auth/Crypto.cc:210:2: warning: label 'err_ctx' defined but not used [-Wunused-label]

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 11:39:43 -07:00
Sage Weil
5bbd5dce11 do_autogen.sh: -n for nss
Cryptopp (at least my installed version) doesn't build on gcc 4.7.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 11:39:22 -07:00
Sage Weil
19063aae1d byteorder: fix gcc 4.7 warnings
./include/encoding.h: In function 'void encode(int64_t, ceph::bufferlist&, uint64_t)':
./include/encoding.h:101:1: warning: narrowing conversion of 'v' from 'int64_t {aka long int}' to '__le64 {aka long long unsigned int}' inside { } is ill-formed in C++11 [-Wnarrowing]

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 11:38:46 -07:00
Sage Weil
85558759d7 do_autogen.sh: apply 'profiler' options to CXXFLAGS, too
-P now leaves in frame pointers and makes sure debugging is turned down.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 11:07:41 -07:00
Sage Weil
3e50a09d29 do_autogen.sh: -p to pass --with-profiler to configure (google cpu profiler)
The -P profiling stuff seems somewhat nonsensical.. that should be cleaned
up too.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 11:05:44 -07:00
Matthew Wodrich
5962a9dde0 obsync: add missing package specifier to format_exc
Fixes: #2873
Signed-off-by: Matthew Wodrich <matthew.wodrich@dreamhost.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2012-08-16 11:01:46 -07:00
Sage Weil
dc76a6cb1d ceph-fuse: add --fuse-debug option to enable libfuse debugging
We consume -d (which fuse uses), so it can't be silently passed through
like we used to be able to do.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 09:40:30 -07:00
Danny Kukawka
a15fde495f fix keyring generation for mds and osd
[ The following text is in the "UTF-8" character set. ]
    [ Your display is set for the "ANSI_X3.4-1968" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Fix config keys for OSD/MDS data dirs. As in documentation and other
places of the scripts the keys are 'osd data'/'mds data' and not
'osd_data'

In case if MDS: if 'mds data' doesn't exist, create it.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
2012-08-16 09:26:00 -07:00
Danny Kukawka
36e7b077a7 fix ceph osd create help
[ The following text is in the "UTF-8" character set. ]
    [ Your display is set for the "ANSI_X3.4-1968" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Change ceph osd create <osd-id> to ceph osd create <uuid>, since this
is what the command is really doing.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
2012-08-16 09:26:00 -07:00
Sage Weil
c6ae5e29a1 objectcacher: fix bh leak on discard
Fixes: #2950
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-15 18:46:25 -07:00
Sage Weil
b97931f43b Merge branch 'testing' into next 2012-08-15 17:56:41 -07:00
Sage Weil
77745f9441 mkcephfs: fix mon data empty check
'read' needs an arg on dash.

Fixes #2922, again.
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-15 17:56:35 -07:00
Samuel Just
08b8bba433 Merge branch 'next' 2012-08-15 15:21:09 -07:00
Samuel Just
74dd560317 Merge branch 'testing' into next 2012-08-15 15:19:02 -07:00
Samuel Just
3e7df78e67 PG,Message: move intrusive_ptr_* into top namespace
gcc 4.7 requires that the intrusive_ptr_* functions be in
the same namespace as the templated class.

Signed-off-by: Samuel Just <sam.just@inktank.com>
2012-08-15 14:40:17 -07:00
Sage Weil
614417ef26 mon: make 'clocks too skewed' message for accurate
It could be that the mons are laggy, not skewed.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-15 11:14:11 -07:00
Sage Weil
36d6c4f4c8 Merge branch 'next' 2012-08-14 16:54:17 -07:00
Sage Weil
119880ca14 Merge branch 'testing' into next 2012-08-14 16:53:48 -07:00
Sage Weil
24a26c6274 mkcephfs: fix mon_data check
* check the right path <facepalm>
* behave if the directory doesn't exist at all yet

Fixes: #2922
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 16:53:34 -07:00
Sage Weil
bcd00c6560 Merge branch 'wip-2918'
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2012-08-14 16:17:48 -07:00
Sage Weil
3d3d91df47 osdmap: apply mon_max_osd when generating osdmap from conf
This prevents users from having an [osd.1234567] section and blowing up
their memory usage.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 16:06:55 -07:00
Sage Weil
1a5e12ec5f osdmap: fix pg_num calculation when generating osdmap from conf
Base num_pg calculation on the number of osds, not the max osd id.

Fixes: #2918
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 16:06:54 -07:00
Sage Weil
cca85af5b0 global: only print banner if type is daemon
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 14:59:36 -07:00
Sage Weil
615f85d088 mon: throttle daemon messages independently from client messages
This lets us set a higher limit on messages from daemons (osd, mds) than
from clients, and throttle them independently.

Fixes: #2942
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 15:07:06 -07:00
Sage Weil
9fc7958472 filejournal: instrument journal write counts, sizes
This rounds out the low-hanging fruit that are coming to mind.  Moving on.

Fixes: #2619
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 14:45:27 -07:00
Sage Weil
2f3e03f605 perfcounters: add u64 average type
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 14:45:27 -07:00
Sage Weil
1eea43db19 global: fix version banner in log on startup
Log banner from global_init().  This puts it at the very top of the log,
right when the daemon starts.

Fixes: #2940
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 14:06:47 -07:00
Sage Weil
efe913b886 Merge branch 'wip-crush-tunables'
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-08-14 13:13:03 -07:00
Sage Weil
326712764b doc: document use of CRUSH tunables
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 13:11:15 -07:00
Sage Weil
b254ba7813 mon: require CRUSH_TUNABLES when latest osdmap has tunables set
This is an imperfect check in that tunables may be set in past osdmaps,
and the OSDs may need that in order to peer correctly.  However, in the
general case, this will catch most users.  In particular, it will catch

 - set tunables
 - nothing works (osds or clients lack feature)
 - reset/clear tunables
 - things recover

But not

 - set tunables
 - osds have feature, behave
 - new osds with old code added, lack feature
 - remove tunables
 - new osds may fail to peer properly because they lack the feature

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 10:42:37 -07:00
Sage Weil
3dd5ebdc26 osd: require CRUSH_TUNABLES feature of peers, clients when used
If the current crush map has non-default tunables, set our messengers to
require the tunables feature bit.  If it does not, clear the bit.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-14 10:42:37 -07:00