Commit Graph

20841 Commits

Author SHA1 Message Date
Sage Weil
b2d6ea7fea librbd: add test for discard of nonexistent objects
This verifies librbd properly handles ENOENT during discard.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 16:04:20 -07:00
Sage Weil
a3ad98a3ee librbd: hide ENOENT on discard
AioZero, Truncate, and Remove are only used by discard and resize
operations where ENOENT can be safely ignored.  If that changes in the
future, we'll need to move the enoent flag setting into discard explicitly.

Fixes: #2958
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 12:10:05 -07:00
Sage Weil
7141a6ce53 msg/Pipe: log port number
This helps correlate log output with specific tcp sessions as reported by
e.g. netstat or tcpdump or whatever.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 11:46:37 -07:00
Sage Weil
1daeb2dd5b cpu_profiler: drop start, stop commands
These don't appear to work.  Setting CPUPROFILE=path on startup does.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 10:58:32 -07:00
Sage Weil
d01c126195 crypto: remove old crypto globals
We now use the CephContext instances.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 10:49:33 -07:00
Ross Turk
2bca756274 doc: small RST syntax fixes for eu.ceph.com mirror
Signed-off-by: Ross Turk <ross@inktank.com>
2012-08-17 10:41:06 -07:00
Wido den Hollander
35004bb52e docs: Add EU mirror for getting Ceph source and packages
Signed-off-by: Wido den Hollander <wido@widodh.nl>
2012-08-17 10:21:08 -07:00
Sage Weil
476e493659 ceph-fuse: debug off by default
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 20:28:50 -07:00
Sage Weil
107ffc6f29 auth: move Crypto users to use CephContext
Globals are bad news.  Switch all users to get the CryptoHandler from
their cct.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 17:01:25 -07:00
Sage Weil
9b7482fce9 auth: move Crypto{None,AES} definitions to header
CephContext will need this.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 17:01:25 -07:00
Sage Weil
becf206207 osd: avoid dereferencing pg info without lock
The gen_prefix() is used for debug prefixes, but traverses data structures
that can be modified when the lock is held.  Only include them in the
prefix if the lock is held; otherwise print an abbreviated prefix that is
similarly greppable to the normal output.

Fixes: #2957
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
2012-08-16 16:55:32 -07:00
Sage Weil
130b559e13 mutex: add is_locked_by_me()
Arguably this is what current is_locked() callers all want; they should
eventually be moved and is_locked() removed.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-16 16:55:22 -07:00
Tommi Virtanen
da486586a7 run-cli-tests: Check that virtualenv is found.
Commit 343cc792e8 switched us from pip
-E to virtualenv, to keep up with the Python ecosystem, but left in
this old check for existence of "pip" as a command. We don't strictly
need that; what we need is a "virtualenv" command. PIP will be
available inside the virtualenv, by the time we get around to running
it. Check for virtualenv instead.

Signed-off-by: Tommi Virtanen <tv@inktank.com>
2012-08-16 16:37:30 -07:00
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