Commit Graph

20908 Commits

Author SHA1 Message Date
Dan Mick
d09e0e2c05 Add struct parent_spec
Holds poolid,imageid,snapid triple identifying parent
Allows for equality comparison of parents
2012-08-17 18:31:51 -07:00
Dan Mick
80d4d38e11 poolid should be signed 2012-08-17 18:31:51 -07:00
Dan Mick
a09052f94a run-rbd-tests: prefer local binaries over $PATH
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-08-17 18:31:51 -07:00
Dan Mick
fd60416fcd librbd: snap_set and open_image need to refresh parent info 2012-08-17 18:31:51 -07:00
Dan Mick
2dc751e793 librbd: Manipulate rbd_children in flatten, clone, remove, snap remove 2012-08-17 18:31:50 -07:00
Dan Mick
397285a413 librbd: make get_parent_info look at snapshot-specific info when needed 2012-08-17 18:31:50 -07:00
Dan Mick
cb74233128 Fix some trailing spaces on lines
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-08-17 18:31:50 -07:00
Dan Mick
767fdf1cba rados: allow listomapvals to dump keys with nonprintable characters
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-08-17 18:31:50 -07:00
Dan Mick
93fed220d5 cls_rbd, cls_rbd_client: add/remove/get children
Manipulate the new rbd_children object, which holds mappings between
parent snapshots and their children clone images

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2012-08-17 18:30:10 -07:00
Sage Weil
9b1df33abc Merge remote-tracking branch 'gh/master' into wip-auth
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>  (rbd bits)
Reviewed-by: Greg Farnum <greg@inktank.com>
2012-08-17 16:51:46 -07:00
Sage Weil
fefdf284f6 rbd: warn on 0-length secret
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 16:51:16 -07:00
Sage Weil
4ce0a516f6 doc: properly document 'rbd map' without touching sysfs
Fixes: #2670
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 16:51:16 -07:00
Sage Weil
b403db197e rbd: update man page to avoid deprecated --secret, --user
Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 16:51:16 -07:00
Sage Weil
2a36873d2e rbd: use generic options, keyring for 'rbd map'
Switch usage over to the normal options, and use the normal EntityName
and keyring inputs for 'rbd map'.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 16:51:15 -07:00
Sage Weil
e0b094b9ff keyring: make --key, --keyfile override loaded keyring
This way --key, --keyfile still work when a keyring is in the default
search path.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 16:51:15 -07:00
Sage Weil
7b57931ba5 config: make --user a synonym for --id
This grandfathers in rbd usage.

Signed-off-by: Sage Weil <sage@inktank.com>
2012-08-17 16:51:15 -07:00
Sage Weil
ae57db03a9 Merge remote-tracking branch 'gh/bug-2958'
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-08-17 16:21:37 -07:00
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