]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
13 years agomon: fix monitor cluster contraction race
Sage Weil [Tue, 21 Aug 2012 00:04:58 +0000 (17:04 -0700)]
mon: fix monitor cluster contraction race

If we contract to 1 monitor, we win_standalone_election() without bumping
the election epoch.  Racing paxos updates can then reach us without being
ignored and trigger an assert:

mon/Paxos.cc: In function 'void Paxos::handle_accept(MMonPaxos*)' thread 7f85eae05700 time 2012-08-20 16:01:00.843937
mon/Paxos.cc: 468: FAILED assert(state == STATE_UPDATING)

Fixes: #3003
Reported-by: John Wilkins <john.wilkins@inktank.com>
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoAdd manpage sections for flatten, snap {un}protect
Dan Mick [Tue, 21 Aug 2012 01:00:46 +0000 (18:00 -0700)]
Add manpage sections for flatten, snap {un}protect

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: John Wilkins <john.wilkins@inktank.com>
13 years agomkcephfs, init-ceph: Warn if hostname "localhost" is seen in ceph.conf.
Tommi Virtanen [Tue, 21 Aug 2012 00:06:09 +0000 (17:06 -0700)]
mkcephfs, init-ceph: Warn if hostname "localhost" is seen in ceph.conf.

Given a ceph.conf that looks like

  [osd.42]
  host = localhost

mkcephfs used to exit with an obscure error message:

  cat: /tmp/mkcephfs.MCBIHvn4Ru/key.*: No such file or directory

"localhost" was never intended to be a valid hostname to use there.
Warn if we see it, and skip the entry. You should use the proper short
hostname of the box.

As init-ceph and mkcephfs share this library, this change affects the
sysvinit scripts too. The behavior *shouldn't* change there (localhost
entries were ignored earlier, too), but you may see this extra
warning. Which is good.

Closes: #3001
Signed-off-by: Tommi Virtanen <tv@inktank.com>
13 years ago"Removed 274 from xfstests"
tamil [Mon, 20 Aug 2012 23:53:18 +0000 (16:53 -0700)]
"Removed 274 from xfstests"

Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
13 years agotest_rbd.py: remove clone before image it depends on
Dan Mick [Mon, 20 Aug 2012 22:59:33 +0000 (15:59 -0700)]
test_rbd.py: remove clone before image it depends on

Signed-off-by: Dan Mick <dan.mick@inktank.com>
13 years agoMerge branch 'next'
Sage Weil [Mon, 20 Aug 2012 22:04:45 +0000 (15:04 -0700)]
Merge branch 'next'

13 years agoosd: fix requeue order of dup ops
Sage Weil [Mon, 20 Aug 2012 19:33:08 +0000 (12:33 -0700)]
osd: fix requeue order of dup ops

The waiting_for_ondisk (and ack) maps get dups of ops that are in progress.
If we have a peering change in which the role does not change, we will
requeue the in-progress ops but leave these in the waiting_for_ondisk
maps, which will then trigger an assert the next time we examine that map
and find it didn't match up with what we expected.

Fix this by requeuing these on any peering reset in on_change().  This
keeps the two queues in sync.

Fixes: #2956
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoosd: fix warning
Sage Weil [Mon, 20 Aug 2012 20:30:50 +0000 (13:30 -0700)]
osd: fix warning

signed/unsigned comp

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoinit-ceph: use SSH in "service ceph status -a" to get version
Travis Rhoden [Mon, 20 Aug 2012 20:29:11 +0000 (13:29 -0700)]
init-ceph: use SSH in "service ceph status -a" to get version

When running "service ceph status -a", a version number was never
returned for remote hosts, only for the local.  This was because
the command to query the version number didn't use the do_cmd
function, which is responsible for running the command over SSH
when needed.

Modify the ceph init.d script to use do_cmd for querying the
Ceph version.

Signed-off-by: Travis Rhoden <trhoden@gmail.com>
13 years agodoc: mkcephfs man page, -c ceph.conf is not optional
Travis Rhoden [Fri, 17 Aug 2012 20:45:09 +0000 (16:45 -0400)]
doc: mkcephfs man page, -c ceph.conf is not optional

    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "ANSI_X3.4-1968" character set.  ]
    [ Some characters may be displayed incorrectly. ]

The man page for mkcephfs and the output of mkcephfs --help
do not agree with each other.  the man page says -c ceph.conf
is optional, while mkcephfs --help says it is required.

Through empirical evidence, I believe it is required.  Update
the man page to make it so.

Signed-off-by: Travis Rhoden <trhoden@gmail.com>
13 years agoosd: make notify debug output less noisy
Sage Weil [Mon, 20 Aug 2012 20:23:21 +0000 (13:23 -0700)]
osd: make notify debug output less noisy

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomds: do not return null dentry lease on getattr
Sage Weil [Fri, 17 Aug 2012 16:02:10 +0000 (09:02 -0700)]
mds: do not return null dentry lease on getattr

Specifically, /foo may exist and client may try to mount /foo/bar.  That
GETATTR request is on #1/foo/bar, but we cannot return a null dentry on bar
because the client is not prepared to handle it and will crash in
fill_trace().

Fixes: #2959
Reported-by: Yan Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge remote-tracking branch 'gh/wip-rbd-layer'
Sage Weil [Mon, 20 Aug 2012 17:49:31 +0000 (10:49 -0700)]
Merge remote-tracking branch 'gh/wip-rbd-layer'

13 years agodoc: fix key export syntax
Sage Weil [Mon, 20 Aug 2012 16:14:33 +0000 (09:14 -0700)]
doc: fix key export syntax

'ceph auth export mon.' no longer works as a side-effect of switching
around the mon. key handling.  'get' works, though; use that for now.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge branch 'wip-rbd-layering'
Dan Mick [Sat, 18 Aug 2012 02:29:13 +0000 (19:29 -0700)]
Merge branch 'wip-rbd-layering'

Conflicts:
src/librbd/internal.cc

13 years agoRoll up loose ends from a marathon merge/rebase session
Dan Mick [Sat, 18 Aug 2012 01:56:37 +0000 (18:56 -0700)]
Roll up loose ends from a marathon merge/rebase session

Signed-off-by: Dan Mick <dan.mick@inktank.com>
13 years agoReview:
Dan Mick [Fri, 17 Aug 2012 17:40:05 +0000 (10:40 -0700)]
Review:

standardize on "*_id" form of variable names
log errors in parameter decode in rbd_children methods
whitespace, assert -> comment

13 years agolibrbd: snap_protect: verify layering is supported
Dan Mick [Fri, 17 Aug 2012 23:01:15 +0000 (16:01 -0700)]
librbd: snap_protect: verify layering is supported

13 years agolibrbd: review: don't call to the OSD to get current protection status
Dan Mick [Fri, 17 Aug 2012 22:55:00 +0000 (15:55 -0700)]
librbd: review: don't call to the OSD to get current protection status

13 years agotest_rbd.py: actually make unprotect_with_children work, and clean up
Dan Mick [Fri, 17 Aug 2012 22:44:37 +0000 (15:44 -0700)]
test_rbd.py: actually make unprotect_with_children work, and clean up

13 years agolibrbd: change EINVAL to EBUSY on "can't unprotect because children exist"
Dan Mick [Fri, 17 Aug 2012 20:03:21 +0000 (13:03 -0700)]
librbd: change EINVAL to EBUSY on "can't unprotect because children exist"
Add pool, number of children in this pool that caused failure to log

13 years agoreview: librbd, test_librbd: make "protect protected snap" fail
Dan Mick [Fri, 17 Aug 2012 20:00:48 +0000 (13:00 -0700)]
review: librbd, test_librbd: make "protect protected snap" fail

13 years agoUpdate protection methods to use parent_spec, parent_types.h, etc.
Dan Mick [Sat, 18 Aug 2012 00:58:31 +0000 (17:58 -0700)]
Update protection methods to use parent_spec, parent_types.h, etc.

13 years agotest_rbd: add test for denying removal of protected parent
Dan Mick [Tue, 14 Aug 2012 22:32:30 +0000 (15:32 -0700)]
test_rbd: add test for denying removal of protected parent

13 years agoget_features requires md_lock and snap_lock to be held
Dan Mick [Tue, 14 Aug 2012 22:30:48 +0000 (15:30 -0700)]
get_features requires md_lock and snap_lock to be held

13 years agolibrbd: clone return codes: ENOSYS for no layering, EINVAL for no prot
Dan Mick [Tue, 14 Aug 2012 18:42:54 +0000 (11:42 -0700)]
librbd: clone return codes: ENOSYS for no layering, EINVAL for no prot

13 years agolibrbd, test_librbd: snap_unprotect: refuse if children still exist
Dan Mick [Tue, 14 Aug 2012 18:51:55 +0000 (11:51 -0700)]
librbd, test_librbd: snap_unprotect: refuse if children still exist

13 years agoMerge branch 'wip-rbd-protect' into more-rebasing
Dan Mick [Sat, 18 Aug 2012 01:42:04 +0000 (18:42 -0700)]
Merge branch 'wip-rbd-protect' into more-rebasing

Conflicts:
src/librbd/ImageCtx.cc
src/librbd/SnapInfo.h
src/librbd/internal.cc
src/test/rbd/test_cls_rbd.cc

13 years agotest_cls_rbd: get_parent with no parent: should fail and return null-pspec
Dan Mick [Fri, 17 Aug 2012 20:07:04 +0000 (13:07 -0700)]
test_cls_rbd: get_parent with no parent: should fail and return null-pspec

13 years agolibrbd: cause add_child/remove_child to treat duplicate ops as errors
Dan Mick [Fri, 17 Aug 2012 19:50:00 +0000 (12:50 -0700)]
librbd: cause add_child/remove_child to treat duplicate ops as errors

13 years agolibrbd: review: add helper for 'scanning snapshots for this parent'
Dan Mick [Fri, 17 Aug 2012 22:44:10 +0000 (15:44 -0700)]
librbd: review: add helper for 'scanning snapshots for this parent'

13 years agolibrbd: review: change get_snapinfo to get_parent_spec
Dan Mick [Fri, 17 Aug 2012 19:59:26 +0000 (12:59 -0700)]
librbd: review: change get_snapinfo to get_parent_spec

13 years agolibrbd, cls_rbd: move parent_info and parent_spec to parent_types.h
Dan Mick [Sat, 18 Aug 2012 00:54:27 +0000 (17:54 -0700)]
librbd, cls_rbd: move parent_info and parent_spec to parent_types.h

parent_type.h is a new librbd-scope header containing info
related to parents and children (clones)

Signed-off-by: Dan Mick <dan.mick@inktank.com>
13 years agolibrbd: memcpy object_prefix must copy terminating NUL
Dan Mick [Wed, 15 Aug 2012 18:10:16 +0000 (11:10 -0700)]
librbd: memcpy object_prefix must copy terminating NUL

13 years agolibrbd: remove: keep ictx open until snapshots are scanned
Dan Mick [Tue, 14 Aug 2012 18:44:03 +0000 (11:44 -0700)]
librbd: remove: keep ictx open until snapshots are scanned

13 years agoReview: change to look for parent across base and all snapshots,
Dan Mick [Sat, 11 Aug 2012 04:46:45 +0000 (21:46 -0700)]
Review: change to look for parent across base and all snapshots,
and remove only if not present in any of them.

13 years agoEnhance add/remove child tests
Dan Mick [Sat, 11 Aug 2012 03:15:19 +0000 (20:15 -0700)]
Enhance add/remove child tests

13 years agoget_parent on non-layered image no longer fails; remove test case
Dan Mick [Sat, 11 Aug 2012 02:32:11 +0000 (19:32 -0700)]
get_parent on non-layered image no longer fails; remove test case

13 years agoAdd struct parent_spec
Dan Mick [Sat, 11 Aug 2012 02:31:38 +0000 (19:31 -0700)]
Add struct parent_spec
Holds poolid,imageid,snapid triple identifying parent
Allows for equality comparison of parents

13 years agopoolid should be signed
Dan Mick [Thu, 9 Aug 2012 22:43:33 +0000 (15:43 -0700)]
poolid should be signed

13 years agorun-rbd-tests: prefer local binaries over $PATH
Dan Mick [Thu, 9 Aug 2012 04:55:36 +0000 (21:55 -0700)]
run-rbd-tests: prefer local binaries over $PATH

Signed-off-by: Dan Mick <dan.mick@inktank.com>
13 years agolibrbd: snap_set and open_image need to refresh parent info
Dan Mick [Thu, 9 Aug 2012 02:31:37 +0000 (19:31 -0700)]
librbd: snap_set and open_image need to refresh parent info

13 years agolibrbd: Manipulate rbd_children in flatten, clone, remove, snap remove
Dan Mick [Tue, 7 Aug 2012 03:32:13 +0000 (20:32 -0700)]
librbd: Manipulate rbd_children in flatten, clone, remove, snap remove

13 years agolibrbd: make get_parent_info look at snapshot-specific info when needed
Dan Mick [Mon, 13 Aug 2012 22:03:07 +0000 (15:03 -0700)]
librbd: make get_parent_info look at snapshot-specific info when needed

13 years agoFix some trailing spaces on lines
Dan Mick [Tue, 7 Aug 2012 00:56:24 +0000 (17:56 -0700)]
Fix some trailing spaces on lines

Signed-off-by: Dan Mick <dan.mick@inktank.com>
13 years agorados: allow listomapvals to dump keys with nonprintable characters
Dan Mick [Mon, 6 Aug 2012 17:50:40 +0000 (10:50 -0700)]
rados: allow listomapvals to dump keys with nonprintable characters

Signed-off-by: Dan Mick <dan.mick@inktank.com>
13 years agocls_rbd, cls_rbd_client: add/remove/get children
Dan Mick [Fri, 3 Aug 2012 00:50:06 +0000 (17:50 -0700)]
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>
13 years agoMerge remote-tracking branch 'gh/master' into wip-auth
Sage Weil [Fri, 17 Aug 2012 23:51:46 +0000 (16:51 -0700)]
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>
13 years agorbd: warn on 0-length secret
Sage Weil [Fri, 17 Aug 2012 00:25:38 +0000 (17:25 -0700)]
rbd: warn on 0-length secret

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agodoc: properly document 'rbd map' without touching sysfs
Sage Weil [Fri, 17 Aug 2012 00:10:46 +0000 (17:10 -0700)]
doc: properly document 'rbd map' without touching sysfs

Fixes: #2670
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agorbd: update man page to avoid deprecated --secret, --user
Sage Weil [Fri, 17 Aug 2012 00:09:42 +0000 (17:09 -0700)]
rbd: update man page to avoid deprecated --secret, --user

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agorbd: use generic options, keyring for 'rbd map'
Sage Weil [Thu, 16 Aug 2012 18:01:24 +0000 (11:01 -0700)]
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>
13 years agokeyring: make --key, --keyfile override loaded keyring
Sage Weil [Thu, 16 Aug 2012 02:06:04 +0000 (19:06 -0700)]
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>
13 years agoconfig: make --user a synonym for --id
Sage Weil [Sat, 9 Jun 2012 00:21:03 +0000 (17:21 -0700)]
config: make --user a synonym for --id

This grandfathers in rbd usage.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge remote-tracking branch 'gh/bug-2958'
Sage Weil [Fri, 17 Aug 2012 23:21:37 +0000 (16:21 -0700)]
Merge remote-tracking branch 'gh/bug-2958'

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: add test for discard of nonexistent objects
Sage Weil [Fri, 17 Aug 2012 23:04:20 +0000 (16:04 -0700)]
librbd: add test for discard of nonexistent objects

This verifies librbd properly handles ENOENT during discard.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agolibrbd: hide ENOENT on discard
Sage Weil [Fri, 17 Aug 2012 19:10:05 +0000 (12:10 -0700)]
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>
13 years agomsg/Pipe: log port number
Sage Weil [Fri, 17 Aug 2012 18:46:37 +0000 (11:46 -0700)]
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>
13 years agocpu_profiler: drop start, stop commands
Sage Weil [Fri, 17 Aug 2012 17:58:24 +0000 (10:58 -0700)]
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>
13 years agodoc: small RST syntax fixes for eu.ceph.com mirror
Ross Turk [Fri, 17 Aug 2012 17:41:06 +0000 (10:41 -0700)]
doc: small RST syntax fixes for eu.ceph.com mirror

Signed-off-by: Ross Turk <ross@inktank.com>
13 years agodocs: Add EU mirror for getting Ceph source and packages
Wido den Hollander [Wed, 15 Aug 2012 10:13:07 +0000 (12:13 +0200)]
docs: Add EU mirror for getting Ceph source and packages

Signed-off-by: Wido den Hollander <wido@widodh.nl>
13 years agoceph-fuse: debug off by default
Sage Weil [Fri, 17 Aug 2012 03:28:50 +0000 (20:28 -0700)]
ceph-fuse: debug off by default

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoosd: avoid dereferencing pg info without lock
Sage Weil [Thu, 16 Aug 2012 23:55:32 +0000 (16:55 -0700)]
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>
13 years agomutex: add is_locked_by_me()
Sage Weil [Thu, 16 Aug 2012 23:55:04 +0000 (16:55 -0700)]
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>
13 years agorun-cli-tests: Check that virtualenv is found.
Tommi Virtanen [Thu, 16 Aug 2012 23:35:30 +0000 (16:35 -0700)]
run-cli-tests: Check that virtualenv is found.

Commit 343cc792e847ca8901f6c08e41799a2fbbd2ca92 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>
13 years agoMerge remote-tracking branch 'gh/wip-osd'
Sage Weil [Thu, 16 Aug 2012 22:28:35 +0000 (15:28 -0700)]
Merge remote-tracking branch 'gh/wip-osd'

Reviewed-by: Samuel Just <sam.just@inktank.com>
13 years agomsg/SimpleMessenger: fix leak of local_connection
Sage Weil [Wed, 15 Aug 2012 22:20:14 +0000 (15:20 -0700)]
msg/SimpleMessenger: fix leak of local_connection

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agotest_librbd_fsx: fix leak
Sage Weil [Thu, 16 Aug 2012 21:42:58 +0000 (14:42 -0700)]
test_librbd_fsx: fix leak

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoSyntheticClient: fix warnings
Sage Weil [Thu, 16 Aug 2012 21:34:01 +0000 (14:34 -0700)]
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>
13 years agolibrbd: make aio_discard declaration match definition
Sage Weil [Thu, 16 Aug 2012 01:18:33 +0000 (18:18 -0700)]
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>
13 years agolibrbd: fix uninit var new_snap in ictrx_refresh()
Sage Weil [Thu, 16 Aug 2012 00:48:06 +0000 (17:48 -0700)]
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>
13 years agolibrbd: fix warning
Sage Weil [Thu, 16 Aug 2012 21:27:35 +0000 (14:27 -0700)]
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>
13 years agoheap_profiler: return result via ostream
Sage Weil [Thu, 16 Aug 2012 20:08:14 +0000 (13:08 -0700)]
heap_profiler: return result via ostream

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocpu_profiler: outout to ostream instead of clog
Sage Weil [Thu, 16 Aug 2012 20:05:01 +0000 (13:05 -0700)]
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>
13 years agoosd: avoid generate huge osdmap deletion transactions
Sage Weil [Thu, 16 Aug 2012 20:38:54 +0000 (13:38 -0700)]
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>
13 years agoosd: break potentially large transaction into pieces
Sage Weil [Wed, 25 Jul 2012 23:35:09 +0000 (16:35 -0700)]
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>
13 years agoosd: only commit past intervals at end of parallel build
Sage Weil [Wed, 25 Jul 2012 21:53:34 +0000 (14:53 -0700)]
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>
13 years agoMerge branch 'next'
Sage Weil [Thu, 16 Aug 2012 20:21:39 +0000 (13:21 -0700)]
Merge branch 'next'

13 years agoosd: explicitly requeue waiting_for_map in on_change()
Sage Weil [Thu, 16 Aug 2012 00:19:22 +0000 (17:19 -0700)]
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>
13 years agoosd: simplify how in-progress ops are requeued
Sage Weil [Thu, 16 Aug 2012 00:19:11 +0000 (17:19 -0700)]
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>
13 years agoosd: rename op_waiters -> waiting_for_map
Sage Weil [Thu, 16 Aug 2012 00:18:57 +0000 (17:18 -0700)]
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>
13 years agoMerge branch 'wip-rbd-protect-merge'
Josh Durgin [Thu, 16 Aug 2012 20:00:03 +0000 (13:00 -0700)]
Merge branch 'wip-rbd-protect-merge'

13 years agoMerge branch 'wip-rbd-protect' into master
Josh Durgin [Thu, 16 Aug 2012 19:03:41 +0000 (12:03 -0700)]
Merge branch 'wip-rbd-protect' into master

Conflicts:
src/librbd.cc
src/librbd/cls_rbd_client.h

13 years agomds: fix some gcc 4.7 warnings
Sage Weil [Thu, 16 Aug 2012 19:53:18 +0000 (12:53 -0700)]
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>
13 years agocrypto: remove unused label
Sage Weil [Thu, 16 Aug 2012 18:39:43 +0000 (11:39 -0700)]
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>
13 years agodo_autogen.sh: -n for nss
Sage Weil [Thu, 16 Aug 2012 18:39:22 +0000 (11:39 -0700)]
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>
13 years agobyteorder: fix gcc 4.7 warnings
Sage Weil [Thu, 16 Aug 2012 18:38:46 +0000 (11:38 -0700)]
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>
13 years agodo_autogen.sh: apply 'profiler' options to CXXFLAGS, too
Sage Weil [Thu, 16 Aug 2012 18:07:41 +0000 (11:07 -0700)]
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>
13 years agodo_autogen.sh: -p to pass --with-profiler to configure (google cpu profiler)
Sage Weil [Thu, 16 Aug 2012 18:05:44 +0000 (11:05 -0700)]
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>
13 years agoobsync: add missing package specifier to format_exc
Matthew Wodrich [Wed, 1 Aug 2012 02:13:03 +0000 (19:13 -0700)]
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>
13 years agoceph-fuse: add --fuse-debug option to enable libfuse debugging
Sage Weil [Thu, 16 Aug 2012 16:33:23 +0000 (09:33 -0700)]
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>
13 years agofix keyring generation for mds and osd
Danny Kukawka [Thu, 16 Aug 2012 10:56:58 +0000 (12:56 +0200)]
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>
13 years agofix ceph osd create help
Danny Kukawka [Thu, 16 Aug 2012 10:56:32 +0000 (12:56 +0200)]
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>
13 years agoobjectcacher: fix bh leak on discard
Sage Weil [Thu, 16 Aug 2012 01:42:56 +0000 (18:42 -0700)]
objectcacher: fix bh leak on discard

Fixes: #2950
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge branch 'testing' into next
Sage Weil [Thu, 16 Aug 2012 00:56:41 +0000 (17:56 -0700)]
Merge branch 'testing' into next

13 years agomkcephfs: fix mon data empty check
Sage Weil [Thu, 16 Aug 2012 00:56:35 +0000 (17:56 -0700)]
mkcephfs: fix mon data empty check

'read' needs an arg on dash.

Fixes #2922, again.
Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge branch 'next'
Samuel Just [Wed, 15 Aug 2012 22:21:09 +0000 (15:21 -0700)]
Merge branch 'next'

13 years agoMerge branch 'testing' into next
Samuel Just [Wed, 15 Aug 2012 22:19:02 +0000 (15:19 -0700)]
Merge branch 'testing' into next

13 years agoPG,Message: move intrusive_ptr_* into top namespace
Samuel Just [Wed, 15 Aug 2012 21:40:17 +0000 (14:40 -0700)]
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>
13 years agomon: make 'clocks too skewed' message for accurate
Sage Weil [Wed, 15 Aug 2012 18:13:46 +0000 (11:13 -0700)]
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>