]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agoceph-disk-activate: don't override default or configured osd journal path
Sage Weil [Tue, 12 Mar 2013 04:14:53 +0000 (21:14 -0700)]
ceph-disk-activate: don't override default or configured osd journal path

There is no reason not to rely on the default or obey any configured
value here.

Fixes: #4031
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'next'
Josh Durgin [Mon, 11 Mar 2013 23:59:05 +0000 (16:59 -0700)]
Merge branch 'next'

12 years agoMerge branch 'wip-rbd-flatten-cache' into next
Josh Durgin [Mon, 11 Mar 2013 23:56:35 +0000 (16:56 -0700)]
Merge branch 'wip-rbd-flatten-cache' into next

Reviewed-by: Sage Weil <sage.weil@inktank.com>
12 years agodebian: stop ceph-mds before uninstalling ceph-mds
Sage Weil [Tue, 12 Mar 2013 00:09:37 +0000 (17:09 -0700)]
debian: stop ceph-mds before uninstalling ceph-mds

Fixes: #4384
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Mon, 11 Mar 2013 23:57:00 +0000 (16:57 -0700)]
Merge remote-tracking branch 'gh/next'

12 years agolog: drop default 'log max recent' from 100k -> 10k
Sage Weil [Mon, 11 Mar 2013 23:25:16 +0000 (16:25 -0700)]
log: drop default 'log max recent' from 100k -> 10k

Use less memory.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agolibrbd: invalidate cache when flattening
Josh Durgin [Sat, 9 Mar 2013 02:57:24 +0000 (18:57 -0800)]
librbd: invalidate cache when flattening

The cache stores which objects don't exist. Flatten bypasses the cache
when doing its copyups, so when it is done the -ENOENT from the cache
is treated as zeroes instead of 'need to read from parent'.

Clients that have the image open need to forgot about the cached
non-existent objects as well. Do this during ictx_refresh, while the
parent_lock is held exclusively so no new reads from the parent can
happen until the updated parent metadata is visible, so no new reads
from the parent will occur.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: add a method to clear -ENOENT caching
Josh Durgin [Sat, 9 Mar 2013 01:53:31 +0000 (17:53 -0800)]
ObjectCacher: add a method to clear -ENOENT caching

Clear the exists and complete flags for any objects that have exists
set to false, and force any in-flight reads to retry if they get
-ENOENT instead of generating zeros.

This is useful for getting the cache into a consistent state for rbd
after an image has been flattened, since many objects which previously
did not exist and went up to the parent to retrieve data may now exist
in the child.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoObjectCacher: keep track of outstanding reads on an object
Josh Durgin [Sat, 9 Mar 2013 01:49:27 +0000 (17:49 -0800)]
ObjectCacher: keep track of outstanding reads on an object

Reads always use C_ReadFinish as a callback (and they are the only
user of this callback). Keep an xlist of these for each object, so
they can remove themselves as they finish. To prevent racing requests
and with discard removing objects from the cache, clear the xlist in
the object destructor, so if the Object is still valid the set_item
will still be on the list.

Make the ObjectCacher constructor take an Object* instead of the pool
and object id, which are derived from the Object* anyway.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoceph: fix cli test
Sage Weil [Mon, 11 Mar 2013 21:54:50 +0000 (14:54 -0700)]
ceph: fix cli test

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoRevert "Use start-stop-daemon --chuid option to setuid to www-data."
Sage Weil [Mon, 11 Mar 2013 20:23:13 +0000 (13:23 -0700)]
Revert "Use start-stop-daemon --chuid option to setuid to www-data."

This reverts commit a99ed038ecaf170574ee75cd5ddb12f252f9bc26.

On second thought, this will require a bit more care to ensure that all
of the paths radosgw needs to read/write from have the correct permissions
in the packages and so forth.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-4135'
David Zafman [Mon, 11 Mar 2013 19:50:38 +0000 (12:50 -0700)]
Merge branch 'wip-4135'

Feature: #4135 - osd: noscrub, nodeepscrub osdmap flags

Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agomon: Paxos: increase trim tolerance from 3 to 30.
Joao Eduardo Luis [Mon, 11 Mar 2013 16:45:10 +0000 (16:45 +0000)]
mon: Paxos: increase trim tolerance from 3 to 30.

This increase only means that we'll keep more versions around before we
trim.  It doesn't change the number of versions we'll keep around after
trimming (that's still as much as 'paxos_max_join_drift', i.e. 10), nor
does it change the criteria used to consider a monitor as having drifted
(same rule applies, 'paxos_max_join_drift').

This change however will enable the leader to put off trimming for a longer
period of time, giving a better chance for a monitor to join the cluster.
See, after going through the probing phase, at which point a monitor may
only be, say, 5 versions off, the same monitor may end up getting into the
quorum only to find that in-between probing and finally triggering an
election some 6 versions might have come to existence.  Before this patch,
by then the state had been trimmed and the monitor would have to bootstrap
to perform a full store sync.  With this patch in place, the monitor would
be able to sync the remaining 11 versions.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomon: Paxos: bootstrap leader if he has fallen behind upon reaching collect
Joao Eduardo Luis [Mon, 11 Mar 2013 16:25:35 +0000 (16:25 +0000)]
mon: Paxos: bootstrap leader if he has fallen behind upon reaching collect

Fixes: #4256
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoDocument scrubbing behavior
David Zafman [Mon, 11 Mar 2013 19:44:47 +0000 (12:44 -0700)]
Document scrubbing behavior

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoMerge pull request #100 from jaharkes/init
Sage Weil [Mon, 11 Mar 2013 19:00:52 +0000 (12:00 -0700)]
Merge pull request #100 from jaharkes/init

Fixes for RadosGW init script

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #99 from dalgaaf/wip-da-sca-style-3
Sage Weil [Mon, 11 Mar 2013 19:00:14 +0000 (12:00 -0700)]
Merge pull request #99 from dalgaaf/wip-da-sca-style-3

More smaller (style related) fixes

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #91 from Youscribe/defaultweight
Sage Weil [Mon, 11 Mar 2013 16:31:57 +0000 (09:31 -0700)]
Merge pull request #91 from Youscribe/defaultweight

Set weight of an osd based on df.

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoUse start-stop-daemon --chuid option to setuid to www-data. 100/head
Jan Harkes [Fri, 8 Mar 2013 21:40:06 +0000 (16:40 -0500)]
Use start-stop-daemon --chuid option to setuid to www-data.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
12 years agoFix radosgw actually reloading after rotating logs.
Jan Harkes [Fri, 8 Mar 2013 17:45:57 +0000 (12:45 -0500)]
Fix radosgw actually reloading after rotating logs.

The --signal argument to Debian's start-stop-daemon doesn't
make it send a signal, but defines which signal should be send
when --stop is specified.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
12 years agorgw/rgw_op.cc: remove unused variables 99/head
Danny Al-Gaaf [Mon, 11 Mar 2013 15:31:15 +0000 (16:31 +0100)]
rgw/rgw_op.cc: remove unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_op.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 15:28:02 +0000 (16:28 +0100)]
rgw/rgw_op.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_multi_del.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 15:25:49 +0000 (16:25 +0100)]
rgw/rgw_multi_del.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_multi.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 15:23:05 +0000 (16:23 +0100)]
rgw/rgw_multi.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_http_client.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 15:19:04 +0000 (16:19 +0100)]
rgw/rgw_http_client.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorados_sync.cc: fix typo in error msg
Danny Al-Gaaf [Mon, 11 Mar 2013 15:10:54 +0000 (16:10 +0100)]
rados_sync.cc: fix typo in error msg

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_common.cc: initialize has_acl_header in constructor with 'false'
Danny Al-Gaaf [Mon, 11 Mar 2013 15:08:00 +0000 (16:08 +0100)]
rgw/rgw_common.cc: initialize has_acl_header in constructor with 'false'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_admin.cc: remove some unused variables
Danny Al-Gaaf [Mon, 11 Mar 2013 15:00:16 +0000 (16:00 +0100)]
rgw/rgw_admin.cc: remove some unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_admin.cc: reduce scope of 'int ret'
Danny Al-Gaaf [Mon, 11 Mar 2013 14:56:28 +0000 (15:56 +0100)]
rgw/rgw_admin.cc: reduce scope of 'int ret'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_admin.cc: remove twice check for 'object'
Danny Al-Gaaf [Mon, 11 Mar 2013 14:52:34 +0000 (15:52 +0100)]
rgw/rgw_admin.cc: remove twice check for 'object'

Remove twice checked 'object'. Put checks in alphabetic order to make
double checks easier to catch.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_rados.h: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 14:47:14 +0000 (15:47 +0100)]
rgw/rgw_rados.h: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_acl_s3.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 14:44:13 +0000 (15:44 +0100)]
rgw/rgw_acl_s3.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorgw/rgw_common.h: pass some const variables by reference to 'operator<<'
Danny Al-Gaaf [Mon, 11 Mar 2013 14:35:53 +0000 (15:35 +0100)]
rgw/rgw_common.h: pass some const variables by reference to 'operator<<'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorbd_fuse/rbd-fuse.c: remove consecutive return/break statement
Danny Al-Gaaf [Mon, 11 Mar 2013 14:31:50 +0000 (15:31 +0100)]
rbd_fuse/rbd-fuse.c: remove consecutive return/break statement

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorbd.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 14:30:55 +0000 (15:30 +0100)]
rbd.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorados_sync.{cc,h}: pass some const std::string by reference
Danny Al-Gaaf [Mon, 11 Mar 2013 14:23:15 +0000 (15:23 +0100)]
rados_sync.{cc,h}: pass some const std::string by reference

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorados_sync.cc: remove unused variable
Danny Al-Gaaf [Mon, 11 Mar 2013 14:14:41 +0000 (15:14 +0100)]
rados_sync.cc: remove unused variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agorados_export.cc: reduce scope of 'int ret' in do_rados_export()
Danny Al-Gaaf [Mon, 11 Mar 2013 14:07:36 +0000 (15:07 +0100)]
rados_export.cc: reduce scope of 'int ret' in do_rados_export()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agosrc/rados.cc: remove unused variable
Danny Al-Gaaf [Mon, 11 Mar 2013 14:05:00 +0000 (15:05 +0100)]
src/rados.cc: remove unused variable

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agosrc/osdmaptool.cc: remove some unused variables
Danny Al-Gaaf [Mon, 11 Mar 2013 14:02:09 +0000 (15:02 +0100)]
src/osdmaptool.cc: remove some unused variables

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoosdc/Objecter.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 13:58:59 +0000 (14:58 +0100)]
osdc/Objecter.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoosdc/ObjectCacher.cc: set left to 0 instead off 'left -= left'
Danny Al-Gaaf [Mon, 11 Mar 2013 13:50:23 +0000 (14:50 +0100)]
osdc/ObjectCacher.cc: set left to 0 instead off 'left -= left'

Instead of call 'left -= left', which results in 0, set left directly
to 0 and remove not needed assert call 'left == 0'.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoosdc/ObjectCacher.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 13:38:24 +0000 (14:38 +0100)]
osdc/ObjectCacher.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoos/FileStore.cc: move variable async_done to the right #ifdef block
Danny Al-Gaaf [Mon, 11 Mar 2013 13:06:10 +0000 (14:06 +0100)]
os/FileStore.cc: move variable async_done to the right #ifdef block

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoos/FileStore.cc: remove assignment of a never used value
Danny Al-Gaaf [Mon, 11 Mar 2013 13:03:27 +0000 (14:03 +0100)]
os/FileStore.cc: remove assignment of a never used value

There is no need to set local variable basedir_fd to -1 after
closing and right before leaving the function.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomsg/SimpleMessenger.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 12:45:33 +0000 (13:45 +0100)]
msg/SimpleMessenger.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon/PGMonitor.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Mon, 11 Mar 2013 12:30:04 +0000 (13:30 +0100)]
mon/PGMonitor.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon/Monitor.cc: Clarify calculation precedence for '%' and '?'
Danny Al-Gaaf [Mon, 11 Mar 2013 12:25:41 +0000 (13:25 +0100)]
mon/Monitor.cc: Clarify calculation precedence for '%' and '?'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agolibrbd/internal.cc: clarify expression with parentheses
Danny Al-Gaaf [Mon, 11 Mar 2013 11:52:44 +0000 (12:52 +0100)]
librbd/internal.cc: clarify expression with parentheses

From cppcheck:
 [src/librbd/internal.cc:379]: (style) Boolean result is used in
 bitwise operation. Clarify expression with parentheses.

12 years agoSyntheticClient.cc: Clarify calculation precedence for '%' and '?'
Danny Al-Gaaf [Mon, 11 Mar 2013 11:25:06 +0000 (12:25 +0100)]
SyntheticClient.cc: Clarify calculation precedence for '%' and '?'

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agofusetrace_ll.cc: reduce scope of 'int err' in main()
Danny Al-Gaaf [Mon, 11 Mar 2013 11:11:06 +0000 (12:11 +0100)]
fusetrace_ll.cc: reduce scope of 'int err' in main()

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/Locker.cc: fix warning about 'Possible null pointer dereference'
Danny Al-Gaaf [Fri, 1 Mar 2013 19:12:03 +0000 (20:12 +0100)]
mds/Locker.cc: fix warning about 'Possible null pointer dereference'

Fix following warning from cppcheck:
 [src/mds/Locker.cc:2255] -> [src/mds/Locker.cc:2258]: (error)
   Possible null pointer dereference: in - otherwise it is redundant
   to check it against null.

Since head_in used for call pick_inode_snap() is already valid,
there is no need to check if 'CInode *in' is not NULL. Remove
not needed check.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomds/Locker.cc: use static_cast instead of C-Style cast
Danny Al-Gaaf [Fri, 1 Mar 2013 18:55:05 +0000 (19:55 +0100)]
mds/Locker.cc: use static_cast instead of C-Style cast

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomon/MonMap: don't crash on dup IP in mon host
Sage Weil [Sun, 10 Mar 2013 06:12:00 +0000 (22:12 -0800)]
mon/MonMap: don't crash on dup IP in mon host

If the mon_host line has an IP twice, we shouldn't crash.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoAdd code to check flag state
David Zafman [Sat, 9 Mar 2013 04:23:21 +0000 (20:23 -0800)]
Add code to check flag state

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Sat, 9 Mar 2013 02:38:32 +0000 (18:38 -0800)]
Merge remote-tracking branch 'gh/next'

12 years agoceph_common.sh: add warning if 'host' contains dots
Dan Mick [Fri, 8 Mar 2013 23:18:54 +0000 (15:18 -0800)]
ceph_common.sh: add warning if 'host' contains dots

This is a common error and there's no reason the script can't
at least tell you it's a really bad idea.  One might argue it
could even successfully proactively truncate the host parameter
at the first dot, but that's a little controlling, perhaps.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoRevert "Update conf.py"
Dan Mick [Fri, 8 Mar 2013 23:46:34 +0000 (15:46 -0800)]
Revert "Update conf.py"

This reverts commit 700899206224436255522d8469612e6603fe3116.
Apparently github's edit lets you commit directly to the repo.
Oops.

12 years agoUpdate conf.py
Dan Mick [Fri, 8 Mar 2013 23:44:28 +0000 (15:44 -0800)]
Update conf.py

12 years agoosd: noscrub, nodeepscrub osdmap flags
David Zafman [Fri, 8 Mar 2013 22:06:24 +0000 (14:06 -0800)]
osd: noscrub, nodeepscrub osdmap flags

Just add NOSCRUB/NODEEP_SCRUB to OSDMap flags and  allow set/unset

Feature: #4135

Signed-off-by: David Zafman <david.zafman@inktank.com>
12 years agoMerge pull request #96 from concubidated/master
Sage Weil [Fri, 8 Mar 2013 21:49:04 +0000 (13:49 -0800)]
Merge pull request #96 from concubidated/master

Fix output of command 'ceph osd tree --format=json'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agodoc: Added a new network configuration reference document.
John Wilkins [Fri, 8 Mar 2013 21:45:04 +0000 (13:45 -0800)]
doc: Added a new network configuration reference document.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoFix output of 'ceph osd tree --format=json' 96/head
Concubidated [Fri, 8 Mar 2013 21:44:39 +0000 (13:44 -0800)]
Fix output of 'ceph osd tree --format=json'

Signed-off-by: Tyler Brekke <tyler.brekke@inktank.com>
12 years agodoc: Added network settings. Reorganized index.
John Wilkins [Fri, 8 Mar 2013 21:44:31 +0000 (13:44 -0800)]
doc: Added network settings. Reorganized index.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Excised network settings.
John Wilkins [Fri, 8 Mar 2013 21:43:44 +0000 (13:43 -0800)]
doc: Excised network settings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Format edits. Excised much of network discussion. Added reference to network...
John Wilkins [Fri, 8 Mar 2013 21:43:12 +0000 (13:43 -0800)]
doc: Format edits. Excised much of network discussion. Added reference to network guide.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge branch 'wip-osd-map' into next
Samuel Just [Fri, 8 Mar 2013 20:44:42 +0000 (12:44 -0800)]
Merge branch 'wip-osd-map' into next

Fixes: 4369
Backport: bobtail
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: mark down connections from old peers
Sage Weil [Fri, 8 Mar 2013 16:56:44 +0000 (08:56 -0800)]
osd: mark down connections from old peers

Close out any connection with an old peer.  This avoids a race like:

- peer marked down
- we get map, mark down the con
- they reconnect and try to send us some stuff
- we share our map to tell them they are old and dead, but leave the con
  open
...
- peer marks itself up a few times, eventually reuses the same port
- sends messages on their fresh con
- we discard because of our old con

This could cause a tight reconnect loop, but it is better than wrong
behavior.

Other possible fixes:
 - make addr nonce truly unique (augment pid in nonce)
 - make a smarter 'disposable' msgr state (bleh)

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd/PG: rename require_same_or_newer_map -> is_same_or_newer_map
Sage Weil [Fri, 8 Mar 2013 16:53:40 +0000 (08:53 -0800)]
osd/PG: rename require_same_or_newer_map -> is_same_or_newer_map

This avoids confusion with the OSD method of the same name, and better
matches what the function tests (and does not do).

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomon/Paxos: make old clock skew message more/less suggestive
Sage Weil [Fri, 8 Mar 2013 18:43:21 +0000 (10:43 -0800)]
mon/Paxos: make old clock skew message more/less suggestive

There is a separate clock skew check now, and more often than not this
suggests laggy messages, and not necessarily skew.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #92 from jaharkes/content_length
Yehuda Sadeh [Fri, 8 Mar 2013 17:45:44 +0000 (09:45 -0800)]
Merge pull request #92 from jaharkes/content_length

Properly format Content-Length: header on 32-bit systems.

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoProperly format Content-Length: header on 32-bit systems. 92/head
Jan Harkes [Thu, 7 Mar 2013 21:07:26 +0000 (16:07 -0500)]
Properly format Content-Length: header on 32-bit systems.

- Promote len argument in dump_content_length to uint64_t.
- Make sure there is sufficient scratch space to format string.
- Use PRIu64 macro for formatting.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
12 years agorgw: set attrs on various list bucket xml results (swift)
Yehuda Sadeh [Fri, 22 Feb 2013 23:04:37 +0000 (15:04 -0800)]
rgw: set attrs on various list bucket xml results (swift)

Fixes: #4247
The list buckets operation was missing some attrs on the different
xml result entities. This fixes it.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoformatter: add the ability to dump attrs in xml entities
Yehuda Sadeh [Fri, 22 Feb 2013 23:02:02 +0000 (15:02 -0800)]
formatter: add the ability to dump attrs in xml entities

xml entities may have attrs assigned to them. Add the ability
to set them. A usage example:

formatter->open_array_section_with_attrs("container",
     FormatterAttrs("name", "foo", NULL));

This will generate the following xml entity:
<container name="foo">

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agorgw: don't iterate through all objects when in namespace
Yehuda Sadeh [Thu, 7 Mar 2013 03:32:21 +0000 (19:32 -0800)]
rgw: don't iterate through all objects when in namespace

Fixes: #4363
Backport: argonaut, bobtail
When listing objects in namespace don't iterate through all the
objects, only go though the ones that starts with the namespace
prefix

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge pull request #93 from jaharkes/range_requests
Yehuda Sadeh [Fri, 8 Mar 2013 14:47:00 +0000 (06:47 -0800)]
Merge pull request #93 from jaharkes/range_requests

Avoid sending a success response when an error occurs.

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge branch 'wip-2733'
David Zafman [Fri, 8 Mar 2013 04:02:04 +0000 (20:02 -0800)]
Merge branch 'wip-2733'

12 years agoAdd filestore_replica_fadvise config option default true
David Zafman [Fri, 8 Mar 2013 02:02:07 +0000 (18:02 -0800)]
Add filestore_replica_fadvise config option default true

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
12 years agoosd: fadvise replica data don't use
David Zafman [Fri, 8 Mar 2013 03:36:07 +0000 (19:36 -0800)]
osd: fadvise replica data don't use

Add transaction flag indicating if op is at a replica
After write has been sync'ed use posix_fadvise() to clear kernel cache

Feature: #2733

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
12 years agoAvoid sending a success response when an error occurs. 93/head
Jan Harkes [Fri, 8 Mar 2013 03:10:42 +0000 (22:10 -0500)]
Avoid sending a success response when an error occurs.

Functions called from RGWGetObj_ObjStore_S3::send_response_data may
change the value of the non-local variable 'ret'. But the response
relies on a local 'req_state' which copies ret at the start of the
function.

Right now none of the called functions actually changes ret so the
problem doesn't trigger, but to avoid future breakage it is safer
to not rely on the (early) copy of the ret variable.

Signed-off-by: Jan Harkes <jaharkes@cs.cmu.edu>
12 years agoFix FileStore to notice if filestore_flusher config is changed
David Zafman [Fri, 8 Mar 2013 01:05:20 +0000 (17:05 -0800)]
Fix FileStore to notice if filestore_flusher config is changed

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-traceless'
Sage Weil [Fri, 8 Mar 2013 01:52:26 +0000 (17:52 -0800)]
Merge branch 'wip-traceless'

Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agoclient: move annoying traceless handling into verify_reply_trace()
Sage Weil [Fri, 8 Mar 2013 00:31:29 +0000 (16:31 -0800)]
client: move annoying traceless handling into verify_reply_trace()

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: debug async cache invalidation
Sage Weil [Wed, 6 Mar 2013 23:51:48 +0000 (15:51 -0800)]
client: debug async cache invalidation

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: pass created_ino back to client on replayed requests
Sage Weil [Wed, 6 Mar 2013 03:12:21 +0000 (19:12 -0800)]
mds: pass created_ino back to client on replayed requests

After an MDS restart, the client will resend uncommitted requests.  Use the
information we now have in the session_info_t to pass the created ino
back via the extra_bl payload in the reply.

Fixes: #4034
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: track created inos with completed request ids in session info
Sage Weil [Fri, 8 Mar 2013 00:33:12 +0000 (16:33 -0800)]
mds: track created inos with completed request ids in session info

Along with each session completed request (tid), also track the created
ino (if any).  This will be used to pass back to the client when they
replay requests in the next patch.

Do not bother making this a backward compatible encoding.  The only
benefit is to allow ceph-mds code to run and then old mds code to run
after it.  Given all of the other incompat changes we *just* made, this
is highly unlikely and not worth the code clutter.  If we had spanned
more releases or a stable release the story would be different.

While we are here, inline the second add_completed_request() method variant
since there is only a single caller and having it overloaded somewhat
obscures what is going on.  This also avoids a duplicate lookup in the
session map in the have_session() check and then in the (old) helper.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: debug created ino
Sage Weil [Wed, 6 Mar 2013 02:30:05 +0000 (18:30 -0800)]
client: debug created ino

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: unlink old_dentry on traceless rename reply
Sage Weil [Mon, 4 Mar 2013 23:47:06 +0000 (15:47 -0800)]
client: unlink old_dentry on traceless rename reply

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: force lookup on traceless reply
Sage Weil [Mon, 4 Mar 2013 23:46:49 +0000 (15:46 -0800)]
client: force lookup on traceless reply

Call _do_lookup directly so that we avoid hitting the cache

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: make _do_lookup take a const string
Sage Weil [Mon, 4 Mar 2013 23:45:51 +0000 (15:45 -0800)]
client: make _do_lookup take a const string

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agomds: do not do traceless reply for open O_TRUNC requests
Sage Weil [Sat, 2 Mar 2013 00:28:25 +0000 (16:28 -0800)]
mds: do not do traceless reply for open O_TRUNC requests

Even though these are "may_write" and may be a mutation, the MDS should not
fake out a traceless reply.  In a real failure, it looks like:

 - mds process request (mutation)
 - mds fails
 - client resends request
 - mds notes that it is O_TRUNC, and already committed, and proceeds with
   a regular open

And that is all fine.

But, that means that if we are trying to simulate this behavior without a
failure, then we should never do a traceless reply on an O_TRUNC request,
because the client will never see such a reply--it'll get a full open
request response instead.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: handle fh cleanup in ll_create() failure path
Sage Weil [Thu, 7 Mar 2013 23:22:26 +0000 (15:22 -0800)]
client: handle fh cleanup in ll_create() failure path

Release the fh if we fail the permissions check.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: root can write to any file
Sage Weil [Fri, 1 Mar 2013 23:57:40 +0000 (15:57 -0800)]
client: root can write to any file

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: clear I_COMPLETE on traceless reply for dentry request
Sage Weil [Fri, 1 Mar 2013 06:32:30 +0000 (22:32 -0800)]
client: clear I_COMPLETE on traceless reply for dentry request

If a request is against a dentry, and we get a traceless reply, clear
the directory I_COMPLETE flag on the parent directory because we can no
longer trust that our cache is complete.

It is possible we could do something a bit more intelligent here, but it
is not trivial because of racing requests, and traceless replies are
rare, so it's not worth the effort.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: pass ptarget from link, create, mkdir, symlink, setattr
Sage Weil [Fri, 1 Mar 2013 02:08:51 +0000 (18:08 -0800)]
client: pass ptarget from link, create, mkdir, symlink, setattr

Use the new make_request functionality to ensure that we properly handle
the re-lookup/getattr when we get a traceless reply back from the MDS.

Note that we have to do this on setattr() because ll_getattr() expects to
return the updated inode metadata to the caller.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoclient: handle traceless replies from make_request()
Sage Weil [Fri, 1 Mar 2013 02:07:33 +0000 (18:07 -0800)]
client: handle traceless replies from make_request()

Modify the generic make_request wrapper to retry lookups or getattrs on
requests when the ptarget pointer is specified but there is no trace in
the reply.

Refactor the _create() method to use this, effectively moving all of the
extra_bl code processing into make_request where it is generically
useful.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: increate default pg log size from 1000 -> 3000
Sage Weil [Thu, 7 Mar 2013 18:31:27 +0000 (10:31 -0800)]
osd: increate default pg log size from 1000 -> 3000

This reduces the probability that we will fail to detect a dup op.  See
#4368.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'gh/wip-log-max' into next
Sage Weil [Thu, 7 Mar 2013 17:29:44 +0000 (09:29 -0800)]
Merge remote-tracking branch 'gh/wip-log-max' into next

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agovstart.sh: osd debug op order = true
Sage Weil [Thu, 7 Mar 2013 05:34:36 +0000 (21:34 -0800)]
vstart.sh: osd debug op order = true

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoSet weight of an osd based on df. 91/head
Guilhem Lettron [Thu, 7 Mar 2013 14:32:13 +0000 (15:32 +0100)]
Set weight of an osd based on df.
priority to Weight in ceph.conf

Signed-off-by: Guilhem Lettron <guilhem.lettron@youscribe.com>