]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
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 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>
13 years agoMerge branch 'next'
Sage Weil [Tue, 14 Aug 2012 23:54:17 +0000 (16:54 -0700)]
Merge branch 'next'

13 years agoMerge branch 'testing' into next
Sage Weil [Tue, 14 Aug 2012 23:53:48 +0000 (16:53 -0700)]
Merge branch 'testing' into next

13 years agomkcephfs: fix mon_data check
Sage Weil [Tue, 14 Aug 2012 23:53:18 +0000 (16:53 -0700)]
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>
13 years agoMerge branch 'wip-2918'
Sage Weil [Tue, 14 Aug 2012 23:17:48 +0000 (16:17 -0700)]
Merge branch 'wip-2918'

Reviewed-by: Dan Mick <dan.mick@inktank.com>
13 years agoosdmap: apply mon_max_osd when generating osdmap from conf
Sage Weil [Tue, 14 Aug 2012 21:26:23 +0000 (14:26 -0700)]
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>
13 years agoosdmap: fix pg_num calculation when generating osdmap from conf
Sage Weil [Tue, 14 Aug 2012 23:06:54 +0000 (16:06 -0700)]
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>
13 years agoglobal: only print banner if type is daemon
Sage Weil [Tue, 14 Aug 2012 21:59:36 +0000 (14:59 -0700)]
global: only print banner if type is daemon

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: throttle daemon messages independently from client messages
Sage Weil [Tue, 14 Aug 2012 22:07:06 +0000 (15:07 -0700)]
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>
13 years agofilejournal: instrument journal write counts, sizes
Sage Weil [Tue, 14 Aug 2012 21:43:34 +0000 (14:43 -0700)]
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>
13 years agoperfcounters: add u64 average type
Sage Weil [Tue, 14 Aug 2012 21:31:38 +0000 (14:31 -0700)]
perfcounters: add u64 average type

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoglobal: fix version banner in log on startup
Sage Weil [Tue, 14 Aug 2012 21:06:47 +0000 (14:06 -0700)]
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>
13 years agoMerge branch 'wip-crush-tunables'
Sage Weil [Tue, 14 Aug 2012 20:13:03 +0000 (13:13 -0700)]
Merge branch 'wip-crush-tunables'

Reviewed-by: Greg Farnum <greg@inktank.com>
13 years agodoc: document use of CRUSH tunables
Sage Weil [Tue, 14 Aug 2012 20:11:15 +0000 (13:11 -0700)]
doc: document use of CRUSH tunables

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomon: require CRUSH_TUNABLES when latest osdmap has tunables set
Sage Weil [Mon, 13 Aug 2012 17:46:30 +0000 (10:46 -0700)]
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>
13 years agoosd: require CRUSH_TUNABLES feature of peers, clients when used
Sage Weil [Mon, 13 Aug 2012 17:44:08 +0000 (10:44 -0700)]
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>
13 years agoosd: put throttler on default policy
Sage Weil [Mon, 13 Aug 2012 17:43:39 +0000 (10:43 -0700)]
osd: put throttler on default policy

Before we were associating the throttler with a CLIENT specific policy
that didn't cover MDS.  That's silly.  Instead, associate the throttler
with the default policy (which is now possible).

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsgr: make set_policy_throttler safe, act on default
Sage Weil [Mon, 13 Aug 2012 17:49:03 +0000 (10:49 -0700)]
msgr: make set_policy_throttler safe, act on default

Add locking in set_policy_throttler.

Also, make it act on the default policy when the specified type does not
have a sepcific policy set for it.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsgr: make set_policy() and set_default_policy() safe to re-use
Sage Weil [Mon, 13 Aug 2012 17:48:20 +0000 (10:48 -0700)]
msgr: make set_policy() and set_default_policy() safe to re-use

Introduce a policy_lock in SimpleMessenger to make this safe even after
the messenger has been started up.  The user needs to be aware that
policy changes will not affect connections that are already established.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agodoc: v0.48.1argonaut release notes, changelog
Sage Weil [Tue, 14 Aug 2012 17:06:16 +0000 (10:06 -0700)]
doc: v0.48.1argonaut release notes, changelog

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge branch 'wip-msgr'
Sage Weil [Mon, 13 Aug 2012 20:34:29 +0000 (13:34 -0700)]
Merge branch 'wip-msgr'

13 years agomsg/Accepter: fix nonce initialization
Sage Weil [Mon, 13 Aug 2012 20:15:55 +0000 (13:15 -0700)]
msg/Accepter: fix nonce initialization

This needs to be provided to the Accepter at bind time, not by start().
Otherwise the nonce is effectively always 0, which is useless and breaks
all sorts of things.  Broken by 8453a8198c65712db968ff42be4fd10d2d216582.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoceph-osd: log journal-creation failure with derr
Dan Mick [Mon, 13 Aug 2012 18:46:48 +0000 (11:46 -0700)]
ceph-osd: log journal-creation failure with derr

Fixes: #2938
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Signed-off-by: Dan Mick <dan.mick@inktank.com>
13 years agomsgr: expose get_policy() through generic Messenger API
Sage Weil [Mon, 13 Aug 2012 17:38:52 +0000 (10:38 -0700)]
msgr: expose get_policy() through generic Messenger API

Return a copy instead of a const reference, too...

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocrush: add helper has_nondefault_tunables()
Sage Weil [Sat, 21 Jul 2012 00:50:35 +0000 (17:50 -0700)]
crush: add helper has_nondefault_tunables()

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agoMerge branch 'wip-msgr'
Sage Weil [Mon, 13 Aug 2012 16:58:49 +0000 (09:58 -0700)]
Merge branch 'wip-msgr'

13 years agocephtool: make command wait for osdmap explicit
Sage Weil [Mon, 13 Aug 2012 16:56:59 +0000 (09:56 -0700)]
cephtool: make command wait for osdmap explicit

If we are waiting for an osdmap for a command, track that explicitly so
that we know when to retry send_command().

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agov0.50 v0.50
Sage Weil [Mon, 13 Aug 2012 16:49:24 +0000 (09:49 -0700)]
v0.50

13 years agoMerge tag 'v0.50'
Sage Weil [Mon, 13 Aug 2012 16:48:49 +0000 (09:48 -0700)]
Merge tag 'v0.50'

v0.50

13 years agomsg/Pipe: discard_queue() -> discard_out_queue()
Sage Weil [Sat, 11 Aug 2012 15:13:39 +0000 (08:13 -0700)]
msg/Pipe: discard_queue() -> discard_out_queue()

We only discard outgoing messages; incoming messages are handled by the
IncomingQueue.. but this method doesn't touch that.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsg/Pipe: simplify Pipe::tcp_read() return value
Sage Weil [Sat, 11 Aug 2012 15:10:14 +0000 (08:10 -0700)]
msg/Pipe: simplify Pipe::tcp_read() return value

0 for success; no reason to return length (always == len).

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsg/Pipe: document tcp_*()
Sage Weil [Sat, 11 Aug 2012 15:03:52 +0000 (08:03 -0700)]
msg/Pipe: document tcp_*()

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsg/Accepter: use learned_addr() from Accepter::bind()
Sage Weil [Sat, 11 Aug 2012 14:52:28 +0000 (07:52 -0700)]
msg/Accepter: use learned_addr() from Accepter::bind()

Normally we never go from need_addr == false to need_addr == true.
It always starts out as true, so this else is useless on the first
call to Accepter::bind().

The only exception is rebind().  Add an unlearn_addr() that will clear
need_addr.  This is almost unnecessary, but doing so fixes a small bug
where the local_connection->peer_addr doesn't get updated when we do a
rebind().

Drop now-unused set_need_addr().  We keep get_need_addr() only because
it is useful in the debug output and for the assert.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsg/SimpleMessenger: push need_addr check into learned_addr()
Sage Weil [Sat, 11 Aug 2012 14:45:18 +0000 (07:45 -0700)]
msg/SimpleMessenger: push need_addr check into learned_addr()

This puts all of the do/do not lock logic in one place, and documents
it.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsg/Accepter: pass nonce on start
Sage Weil [Sat, 11 Aug 2012 14:37:45 +0000 (07:37 -0700)]
msg/Accepter: pass nonce on start

This lets us drop the otherwise awkward SimpleMessenger::get_nonce()
accessor.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsgr: protect set_myaddr()
Sage Weil [Sat, 11 Aug 2012 14:31:35 +0000 (07:31 -0700)]
msgr: protect set_myaddr()

This is used by Messenger implementation (and their constituent
components).

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsg/Accepter: make members private
Sage Weil [Sat, 11 Aug 2012 14:29:38 +0000 (07:29 -0700)]
msg/Accepter: make members private

Nobody uses these.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsgr: remove useless SimpleMessenger::msgr
Sage Weil [Sat, 11 Aug 2012 14:28:32 +0000 (07:28 -0700)]
msgr: remove useless SimpleMessenger::msgr

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agomsgr: some SimpleMessenger docs
Sage Weil [Sat, 11 Aug 2012 14:24:04 +0000 (07:24 -0700)]
msgr: some SimpleMessenger docs

Document basic modules and the lock ordering.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocephtool: send keepalive to tell target
Sage Weil [Tue, 31 Jul 2012 22:02:55 +0000 (15:02 -0700)]
cephtool: send keepalive to tell target

If we 'ceph tell <foo> ...' to a non-monitor, we need to send keepalives to
ensure we detect a tcp drop.  (Not so for monitors; monclient already does
its own keepalive thing.)

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocephtool: retry 'ceph tell <who> ...' command if connection fails
Sage Weil [Tue, 31 Jul 2012 21:47:26 +0000 (14:47 -0700)]
cephtool: retry 'ceph tell <who> ...' command if connection fails

It was easy to reproduce a hang with 'ceph osd tell osd.0 foo' and
messenger failure injection.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocephtool: set messenger policy
Sage Weil [Tue, 31 Jul 2012 21:46:13 +0000 (14:46 -0700)]
cephtool: set messenger policy

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agocephtool: fix deadlock on fault when waiting for osdmap
Sage Weil [Tue, 31 Jul 2012 21:45:51 +0000 (14:45 -0700)]
cephtool: fix deadlock on fault when waiting for osdmap

send_command() was blocking for the osdmap, and also called from the
connect callback.  Instead, re-call it from the handle_osd_map() callback
so that it never blocks.

This was easy to trigger with 'ceph osd tell osd.0 foo' and ms failure
injection.

Signed-off-by: Sage Weil <sage@inktank.com>
13 years agorbd: show snap protection status
Josh Durgin [Sun, 12 Aug 2012 23:42:42 +0000 (16:42 -0700)]
rbd: show snap protection status

If you do rbd info image@snap, include whether that snapshot is protected.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoMonMap: return error on failure in build_initial
Josh Durgin [Wed, 8 Aug 2012 22:24:57 +0000 (15:24 -0700)]
MonMap: return error on failure in build_initial

If mon_host fails to parse, return an error instead of success.
This avoids failing later on an assert monmap.size() > 0 in the
monmap in MonClient.

Fixes: #2913
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agoaddr_parsing: report correct error message
Josh Durgin [Wed, 8 Aug 2012 22:10:27 +0000 (15:10 -0700)]
addr_parsing: report correct error message

getaddrinfo uses its return code to report failures.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agorbd: fix test compilation on 32-bit
Josh Durgin [Thu, 9 Aug 2012 22:13:46 +0000 (15:13 -0700)]
rbd: fix test compilation on 32-bit

32-bit can't implicitly convert size_t or unsigned to uint64_t

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agotest_librbd_fsx: fix warning
Josh Durgin [Thu, 9 Aug 2012 22:12:55 +0000 (15:12 -0700)]
test_librbd_fsx: fix warning

fstat was included implicitly before.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agorbd: fix cli tests
Josh Durgin [Thu, 9 Aug 2012 21:53:24 +0000 (14:53 -0700)]
rbd: fix cli tests

add flatten, snap protect, and snap unprotect

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agorgw: modify some error messages
Yehuda Sadeh [Thu, 9 Aug 2012 20:54:15 +0000 (13:54 -0700)]
rgw: modify some error messages

Make them more correct, clearer.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agoMerge remote-tracking branch 'origin/wip-rgw-admin'
Yehuda Sadeh [Thu, 9 Aug 2012 20:39:20 +0000 (13:39 -0700)]
Merge remote-tracking branch 'origin/wip-rgw-admin'

13 years agorgw: use multiple notification objects
Yehuda Sadeh [Mon, 18 Jun 2012 20:25:44 +0000 (13:25 -0700)]
rgw: use multiple notification objects

Issue #2504. This makes us listen and notify on more than
a single object, which reduces the contention of cache
notifications.

NOTE: This change requires that any radosgw and radosgw-admin
use the same 'rgw num control oids' config value. A config value
of 0 will maintain old compatibility, and will allow an upgraded
process run in conjuction with an old one. Setting value other
than 0 (or using the non-zero default) will require upgrading
and restarting all the gateways together. Failing to do so
might lead to inconsistent user and buckets metadata (which
will be resolved once gateways are restarted).

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
13 years agoradosgw-admin.rst: Misc doccumentation update.
caleb miles [Wed, 25 Jul 2012 19:56:59 +0000 (12:56 -0700)]
radosgw-admin.rst: Misc doccumentation update.

Signed-off-by: caleb miles <caleb.miles@inktank.com>
13 years agorgw_admin.cc: Allow removal of a user's buckets during user removal.
caleb miles [Thu, 9 Aug 2012 20:27:21 +0000 (13:27 -0700)]
rgw_admin.cc: Allow removal of a user's buckets during user removal.

Allow the buckets, and any child objects, of a user to be deleted when the
user is deleted through radosgw-admin. In reference to feature request
2499: http://tracker.newdream.net/issues/2499.

Signed-off-by: caleb miles <caleb.miles@inktank.com>
13 years agolibrados: add method to get the fsid of a cluster
Josh Durgin [Thu, 9 Aug 2012 02:13:45 +0000 (19:13 -0700)]
librados: add method to get the fsid of a cluster

This will be used by OpenStack to check whether two components
have access to the same backend cluster.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: fix memory leak on error in clone
Josh Durgin [Sat, 4 Aug 2012 00:30:04 +0000 (17:30 -0700)]
librbd: fix memory leak on error in clone

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agorbd: add snap [un]protect commands
Josh Durgin [Fri, 3 Aug 2012 23:31:12 +0000 (16:31 -0700)]
rbd: add snap [un]protect commands

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
13 years agolibrbd: add methods for protecting/unprotecting snapshots
Josh Durgin [Fri, 3 Aug 2012 23:30:42 +0000 (16:30 -0700)]
librbd: add methods for protecting/unprotecting snapshots

Unprotect will be more useful once integrated with the rbd_children object.
Right now we just check that a snapshot is protected before cloning it,
and that it's unprotected before removing it.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>