]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoReplicatedBackend: don't hold ObjectContexts in pull completion callback 760/head
Samuel Just [Mon, 28 Oct 2013 18:02:34 +0000 (11:02 -0700)]
ReplicatedBackend: don't hold ObjectContexts in pull completion callback

We need flushing the sequencer to ensure that all Contexts which hold
ObjectContextRefs have been run or deleted.
C_ReplicatedBackend_OnPullComplete, however, gets queued in a second
work queue in order to avoid performing expensive push related reads
in the FileStore finisher.

Rather than keep the objects contexts around, we instead put off
removing the object from the pulling map until the call back
fires and read the object context out of the pulling map.  This
way the ObjectContextRef will be cleaned up along with the rest
of the pulling map in on_change.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: put repops even in TrimObjects
Samuel Just [Sun, 27 Oct 2013 03:21:25 +0000 (20:21 -0700)]
ReplicatedPG: put repops even in TrimObjects

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: improved on_flushed error output
Samuel Just [Sun, 27 Oct 2013 01:24:41 +0000 (18:24 -0700)]
ReplicatedPG: improved on_flushed error output

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPG: call on_flushed on FlushEvt
Samuel Just [Sat, 26 Oct 2013 23:46:22 +0000 (16:46 -0700)]
PG: call on_flushed on FlushEvt

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoPG,ReplicatedPG: remove the waiting_for_backfill_peer mechanism
Samuel Just [Sat, 26 Oct 2013 00:58:31 +0000 (17:58 -0700)]
PG,ReplicatedPG: remove the waiting_for_backfill_peer mechanism

See previous patch.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: have make_writeable adjust backfill_pos
Samuel Just [Sat, 26 Oct 2013 00:58:10 +0000 (17:58 -0700)]
ReplicatedPG: have make_writeable adjust backfill_pos

If we are writing to backfill_pos and create a clone, we end
up failing to send the transaction creating the clone to the
backfill peer.  This is fine as long as we end up backfilling
the clone.  To that end, we simply add the clone to
backfill_info and adjust backfill_pos accordingly.  This is less
brittle than the waiting_for_backfill_pos mechanism since it
works even if we wait between that check and issuing the repop,
which can happen for copy_from.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedBackend: fix failed push error output
Samuel Just [Sat, 26 Oct 2013 23:52:32 +0000 (16:52 -0700)]
ReplicatedBackend: fix failed push error output

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG,osd_types: move rw tracking from its own map to ObjectContext
Samuel Just [Sat, 26 Oct 2013 23:52:16 +0000 (16:52 -0700)]
ReplicatedPG,osd_types: move rw tracking from its own map to ObjectContext

We also modify recovering to hold a reference to the recovering obc
in order to ensure that our backfill_read_lock doesn't outlive the
obc.

ReplicatedPG::op_applied no longer clears repop->obc since we need
it to live until the op is finally cleaned up.  This is fine since
repop->obc is now an ObjectContextRef and can clean itself up.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoosd_types,OpRequest: move osd_req_id into OpRequest
Samuel Just [Sat, 26 Oct 2013 00:36:40 +0000 (17:36 -0700)]
osd_types,OpRequest: move osd_req_id into OpRequest

This way I can have OpRequest included from osd_types.h.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoOpRequest: move method implementations into cc
Samuel Just [Sat, 26 Oct 2013 00:35:49 +0000 (17:35 -0700)]
OpRequest: move method implementations into cc

I need to remove the osd_types.h include.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: reset new_obs and new_snapset in execute_ctx
Samuel Just [Fri, 25 Oct 2013 01:52:59 +0000 (18:52 -0700)]
ReplicatedPG: reset new_obs and new_snapset in execute_ctx

This way, if execute_ctx is rerun on the same OpContext, we
won't erroneously reuse a stale snapset/object_info.

Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoReplicatedPG: take and drop read locks when doing backfill
Greg Farnum [Wed, 23 Oct 2013 18:28:45 +0000 (11:28 -0700)]
ReplicatedPG: take and drop read locks when doing backfill

All our interfaces are in place, so now we can actually take and
drop the locks.
1) Take locks in ReplicatedPG::recover_backfill. This is the entry
into the backfill code path, and covers all objects which are
added to backfills_in_flight (via prep_backfill_object_push()). If we
can't get the lock right away, we stop the backfill movement there
until we can do so.
2) Drop the locks in ReplicatedPG::on_peer_recover(), called when the
push is completed.
2b) Further drop the locks on all backfills_in_flight objects in
_clear_recovery_state(), for when we cancel peering.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoPG: switch the start_recovery_ops interface to specify work to do as a param
Greg Farnum [Tue, 22 Oct 2013 00:36:04 +0000 (17:36 -0700)]
PG: switch the start_recovery_ops interface to specify work to do as a param

We previously inferred whether there was useful work to be done
by looking at the number of ops started, but with the upcoming
introduction of the rw_manager read locking on backfill, we could
start no ops while still having work to do. Switch around the
interfaces to specify these as separate pieces of information.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: implement the RWTracker mechanisms for backfill read locking
Greg Farnum [Mon, 21 Oct 2013 21:27:32 +0000 (14:27 -0700)]
ReplicatedPG: implement the RWTracker mechanisms for backfill read locking

We want backfill to take read locks on the objects it's pushing. Add
a get_backfill_read(hobject_t) function, a corresponding drop_backfill_read(),
and a backfill_waiting_on_read member in ObjState. Check that member when
getting a write lock, and in put_write(). Tell callers to requeue the recovery
if necessary, and clean up the backfill block when its read lock is dropped.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: separate RWTracker's waitlist from getting locks
Greg Farnum [Mon, 21 Oct 2013 21:02:57 +0000 (14:02 -0700)]
ReplicatedPG: separate RWTracker's waitlist from getting locks

This way we can try and get locks which aren't associated with
an OpRequest.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agocommon: add an hobject_t::is_min() function
Greg Farnum [Mon, 21 Oct 2013 21:11:28 +0000 (14:11 -0700)]
common: add an hobject_t::is_min() function

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #765 from ceph/wip-6635
Sage Weil [Sat, 26 Oct 2013 00:53:30 +0000 (17:53 -0700)]
Merge pull request #765 from ceph/wip-6635

mon: OSDMonitor: Make 'osd pool rename' idempotent

Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon/OSDMonitor: make racing dup pool rename behave 765/head
Sage Weil [Sat, 26 Oct 2013 00:45:06 +0000 (17:45 -0700)]
mon/OSDMonitor: make racing dup pool rename behave

If we get dup pool rename requests that are racing, make sure the second
one comes back with 'success' if the rename entry already exists in the
pending_inc map.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon: OSDMonitor: Make 'osd pool rename' idempotent
Joao Eduardo Luis [Fri, 25 Oct 2013 02:33:53 +0000 (03:33 +0100)]
mon: OSDMonitor: Make 'osd pool rename' idempotent

'ceph osd pool rename' takes two arguments: source pool and dest pool.
If by chance 'source pool' does not exist and 'destination pool' does,
then, in order to assure it's idempotent, we want to assume that if
'source pool' no longer exists is because it was already renamed.

However, while we will return success in such case, we want to make sure
to let the user know that we made such assumption.  Mostly to warn the
user of such a thing in case of a mistake on the user's part (say, the
user didn't notice that the source pool didn't exist, while the dest did),
but also to make sure that the user is not surprised by the command
returning success if the user expected an ENOENT or EEXIST.

Fixes: #6635
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agoMerge pull request #769 from ceph/wip-copy-get
Gregory Farnum [Fri, 25 Oct 2013 20:57:21 +0000 (13:57 -0700)]
Merge pull request #769 from ceph/wip-copy-get

With this branch we make copy-get significantly easier to extend by applying our standard encode/decode stuff to it, instead of doing an inline encode-onto-the-payload. We also add some infrastructure for dealing with completion of RepGathers.

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoObjecter: expose the copy-get()'ed object's category 769/head
Greg Farnum [Wed, 9 Oct 2013 22:07:07 +0000 (15:07 -0700)]
Objecter: expose the copy-get()'ed object's category

In the OSD, store the category in the CopyOp using this.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd: add category to object_copy_data_t
Greg Farnum [Fri, 25 Oct 2013 20:41:29 +0000 (13:41 -0700)]
osd: add category to object_copy_data_t

We don't bump the encoding version -- and stick it in the middle --
since it's still brand-new. For simplicity, we encode it unconditionally
rather than trying to embed it alongside the attrs or with its own
"complete" flag in the cursor.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: add back CEPH_OSD_OP_COPY_GET, and use it in the Objecter
Greg Farnum [Wed, 9 Oct 2013 17:39:19 +0000 (10:39 -0700)]
OSD: add back CEPH_OSD_OP_COPY_GET, and use it in the Objecter

This one is encoded with version information. We are not doing anything
to control which op gets sent by the client, but after discussion with
Sam we think this op isn't accessible enough to clients (right now it's
only triggered by a client sending copy-from, which can only happen via
ceph-test-rados) to require compatibility versioning.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoOSD: rename CEPH_OSD_OP_COPY_GET -> CEPH_OSD_OP_COPY_GET_CLASSIC
Greg Farnum [Wed, 9 Oct 2013 17:08:24 +0000 (10:08 -0700)]
OSD: rename CEPH_OSD_OP_COPY_GET -> CEPH_OSD_OP_COPY_GET_CLASSIC

In order to introduce versioning of copy-get, we need to make it a
different op that has the versioning infrastructure from the start.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: copy: move the COPY_GET implementation into its own function
Greg Farnum [Fri, 25 Oct 2013 20:50:58 +0000 (13:50 -0700)]
ReplicatedPG: copy: move the COPY_GET implementation into its own function

It was getting long, isn't terribly dependent on access to do_osd_ops()
state, and will be easier to make generic as its own function.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoosd: Add a new object_copy_data_t, and use it in the OSD/Objecter
Greg Farnum [Tue, 8 Oct 2013 21:57:31 +0000 (14:57 -0700)]
osd: Add a new object_copy_data_t, and use it in the OSD/Objecter

Right now this is very primitive, but we're about to extend it to
deal with request versioning appropriately, and adding in some
extra fields.
Sadly we are doing a little extra copying in the Objecter as a result, but
too bad -- being able to do updates will be worth it.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: cache: don't handle cache if the obc is blocked
Greg Farnum [Fri, 4 Oct 2013 22:54:21 +0000 (15:54 -0700)]
ReplicatedPG: cache: don't handle cache if the obc is blocked

Right now the only way that can happen is if we're in the middle of a
promote!

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: copy: add a C_KickBlockedObject
Greg Farnum [Fri, 4 Oct 2013 22:55:41 +0000 (15:55 -0700)]
ReplicatedPG: copy: add a C_KickBlockedObject

As the name says, you give it an obc and it kicks the block list
when finish()ed.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: add a Context *ondone to RepGathers
Greg Farnum [Fri, 4 Oct 2013 22:53:35 +0000 (15:53 -0700)]
ReplicatedPG: add a Context *ondone to RepGathers

Make a few changes to make sure we trigger it when appropriate. We'll use
this shortly for object promotion, and perhaps for other things in future.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: copy: rename CopyOp::version -> user_version
Greg Farnum [Tue, 8 Oct 2013 00:12:33 +0000 (17:12 -0700)]
ReplicatedPG: copy: rename CopyOp::version -> user_version

This version is a user version, and since we're in the OSD we
should call it such. (In particular, we may want to keep track
of the internal version too when doing cache promotes.)

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoReplicatedPG: copy: do not let start_copy() return error codes
Greg Farnum [Fri, 4 Oct 2013 20:30:46 +0000 (13:30 -0700)]
ReplicatedPG: copy: do not let start_copy() return error codes

There's no failure it can actually run into, and handling error
codes in some of its callers is going to be a pain.
While we're here, document the parameters.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoObjectStore: add a bufferlist-based getattrs() function
Greg Farnum [Thu, 17 Oct 2013 22:14:40 +0000 (15:14 -0700)]
ObjectStore: add a bufferlist-based getattrs() function

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoMerge branch 'wip-osd-fixes' into next
Sage Weil [Fri, 25 Oct 2013 19:56:02 +0000 (12:56 -0700)]
Merge branch 'wip-osd-fixes' into next

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoosd/osd_types: init SnapSet::seq in ctor 768/head
Sage Weil [Fri, 25 Oct 2013 05:01:06 +0000 (22:01 -0700)]
osd/osd_types: init SnapSet::seq in ctor

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoos/FileStore: fix getattr return value when using omap
Sage Weil [Wed, 23 Oct 2013 02:39:51 +0000 (19:39 -0700)]
os/FileStore: fix getattr return value when using omap

The return value should be the length of the value, even when it was
stored in omap.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoos/ObjectStore: fix RMATTRS encoding
Sage Weil [Wed, 23 Oct 2013 00:12:18 +0000 (17:12 -0700)]
os/ObjectStore: fix RMATTRS encoding

Apparently nobody uses this!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoPGLog::read_log: don't add items past backfill line to missing
Samuel Just [Fri, 25 Oct 2013 17:47:28 +0000 (10:47 -0700)]
PGLog::read_log: don't add items past backfill line to missing

Fixes: #6574
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: David Zafman <david.zafman@inktank.com>
11 years agoMerge pull request #764 from ceph/wip-rbd-parent-info
Sage Weil [Fri, 25 Oct 2013 17:09:28 +0000 (10:09 -0700)]
Merge pull request #764 from ceph/wip-rbd-parent-info

rbd.py: increase parent name size limit

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agorbd.py: increase parent name size limit 764/head
Josh Durgin [Fri, 25 Oct 2013 00:25:16 +0000 (17:25 -0700)]
rbd.py: increase parent name size limit

64 characters isn't all that long. 4096 ought to be enough for anyone.

Fixes: #6072
Backport: dumpling, cuttlefish
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoPGMap::dirty_all should be asserting about osd_epochs, not in.osd_epochs
Samuel Just [Thu, 24 Oct 2013 21:31:27 +0000 (14:31 -0700)]
PGMap::dirty_all should be asserting about osd_epochs, not in.osd_epochs

Fixes: #6627
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agoUpdate init-rbdmap
Adam Twardowski [Thu, 24 Oct 2013 16:24:11 +0000 (12:24 -0400)]
Update init-rbdmap

Add a chkconfig line for RHEL based distros to make chkconfig start rbdmap earlier on boot and stop later on shutdown.  This will help prevent shutdown/reboot from hanging your system forever in the event that some daemon has a file held open on an rbd mounted filesystem.

Signed-off-by: Adam Twardowski <adam.twardowski@gmail.com>(cherry picked from commit 80384a1a24e681fff11c8715804b7f8cc4a2189a)
11 years agoceph: tolerate commands without any child args
Greg Farnum [Thu, 24 Oct 2013 18:33:08 +0000 (11:33 -0700)]
ceph: tolerate commands without any child args

Signed-off-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge branch 'wip-rgw-sync-next' into next
Josh Durgin [Thu, 24 Oct 2013 18:38:13 +0000 (11:38 -0700)]
Merge branch 'wip-rgw-sync-next' into next

Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: eliminate one unnecessary case statement
Josh Durgin [Thu, 24 Oct 2013 16:47:16 +0000 (09:47 -0700)]
rgw: eliminate one unnecessary case statement

0x21 '!' is the first character that doesn't need encoding, so we can
expand the lower bound check.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoradosgw-admin: remove unused function escape_str() 763/head
Josh Durgin [Thu, 24 Oct 2013 15:46:31 +0000 (08:46 -0700)]
radosgw-admin: remove unused function escape_str()

This was added before formatters were used for dumping logs.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorgw: escape bucket and object names in StreamReadRequests
Josh Durgin [Thu, 24 Oct 2013 15:42:48 +0000 (08:42 -0700)]
rgw: escape bucket and object names in StreamReadRequests

This fixes copy operations for objects that contain unsafe characters,
like a newline, which would return a 403 otherwise, since the GET to
the source rgw would be unable to verify the signature on a partially
valid bucket name.

Fixes: #6604
Backport: dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorgw: move url escaping to a common place
Josh Durgin [Thu, 24 Oct 2013 15:37:25 +0000 (08:37 -0700)]
rgw: move url escaping to a common place

This is useful outside of the s3 interface. Rename url_escape()
url_encode() for consistency with the exsting common url_decode()
function. This is in preparation for the next commit, which needs
to escape url-unsafe characters in another place.

Backport: dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorgw: update metadata log list to match data log list
Josh Durgin [Thu, 24 Oct 2013 15:34:24 +0000 (08:34 -0700)]
rgw: update metadata log list to match data log list

Send the last marker whether the log is truncated in the same format
as data log list, so clients don't have more needless complexity
handling the difference.  Keep bucket index logs the same, since they
contain the marker already, and are not used in exactly the same way
metadata and data logs are.

Backport: dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorgw: include marker and truncated flag in data log list api
Josh Durgin [Thu, 24 Oct 2013 15:26:19 +0000 (08:26 -0700)]
rgw: include marker and truncated flag in data log list api

Consumers of this api need to know their position in the log. It's
readily available when fetching the log, so return it.  Without the
marker in this call, a client could not easily or efficiently figure
out its position in the log, since it would require getting the global
last marker in the log, and then reading all the log entries.

This would be slow for large logs, and would be subject to races that
would cause potentially very expensive duplicate work.

Returning this atomically while fetching the log entries simplifies
all of this.

Fixes: #6615
Backport: dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agocls_log: always return final marker from log_list
Josh Durgin [Thu, 24 Oct 2013 15:18:19 +0000 (08:18 -0700)]
cls_log: always return final marker from log_list

There's no reason to restrict returning the marker to the case where
less than the whole log is returned, since there's already a truncated
flag to tell the client what happened.

Giving the client the last marker makes it easy to consume when the
log entries do not contain their own marker. If the last marker is not
returned, the client cannot get the last marker without racing with
updates to the log.

Backport: dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorgw: skip read_policy checks for system_users
Josh Durgin [Thu, 10 Oct 2013 22:50:39 +0000 (15:50 -0700)]
rgw: skip read_policy checks for system_users

A system user should still be able to examine suspended buckets, and
get -ENOENT instead of -EACCESS for a deleted object.

Fixes: #6616
Backport: dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #761 from ceph/wip-6620
Sage Weil [Wed, 23 Oct 2013 23:24:23 +0000 (16:24 -0700)]
Merge pull request #761 from ceph/wip-6620

mds: MDSMap: adjust buffer size for uint64 values with more than 5 chars

Backport: dumpling, cuttlefish

11 years agomds: MDSMap: adjust buffer size for uint64 values with more than 5 chars 761/head
Joao Eduardo Luis [Wed, 23 Oct 2013 23:17:45 +0000 (00:17 +0100)]
mds: MDSMap: adjust buffer size for uint64 values with more than 5 chars

Fixes: #6620
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agoMerge pull request #730 from ceph/wip-monc-ping
João Eduardo Luís [Wed, 23 Oct 2013 02:18:55 +0000 (19:18 -0700)]
Merge pull request #730 from ceph/wip-monc-ping

mon: MonClient: ping monitors without authenticating

* add support on the monitor to reply to MPing messages with the contents of
  'mon_status' and 'health', regardless of a client having authenticated beforehand.

* add support on the MonClient to send a MPing message to a randomly picked
  monitor (it was easier this way, '-m ip:port' allows for targeted ping) and block
  waiting for a reply.

* add support on librados, pybind/rados.py and the 'ceph' tool to send pings to
  monitors.

Resolves: #5984

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agocli: ceph: add support to ping monitors 730/head
Joao Eduardo Luis [Wed, 23 Oct 2013 02:04:23 +0000 (03:04 +0100)]
cli: ceph: add support to ping monitors

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agopybind: rados: ping a monitor via librados
Joao Eduardo Luis [Tue, 15 Oct 2013 16:49:57 +0000 (17:49 +0100)]
pybind: rados: ping a monitor via librados

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agopybind: rados: support ETIMEDOUT on make_ex()
Joao Eduardo Luis [Wed, 23 Oct 2013 01:54:34 +0000 (02:54 +0100)]
pybind: rados: support ETIMEDOUT on make_ex()

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agolibrados: support pinging a monitor without auth via RadosClient
Joao Eduardo Luis [Tue, 15 Oct 2013 16:49:40 +0000 (17:49 +0100)]
librados: support pinging a monitor without auth via RadosClient

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: MonClient: allow pinging a monitor without authenticating first
Joao Eduardo Luis [Wed, 16 Oct 2013 15:19:58 +0000 (16:19 +0100)]
mon: MonClient: allow pinging a monitor without authenticating first

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: MonClient: adjust whitespaces
Joao Eduardo Luis [Wed, 16 Oct 2013 15:19:48 +0000 (16:19 +0100)]
mon: MonClient: adjust whitespaces

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: Monitor: reply to ping messages, letting them know we're alive
Joao Eduardo Luis [Tue, 15 Oct 2013 17:36:28 +0000 (18:36 +0100)]
mon: Monitor: reply to ping messages, letting them know we're alive

Fixes: #5984
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agomon: Monitor: do not flush formatter at end of _mon_status()
Joao Eduardo Luis [Wed, 16 Oct 2013 00:31:20 +0000 (01:31 +0100)]
mon: Monitor: do not flush formatter at end of _mon_status()

Delegate that to the caller so that we can combine the result of
_mon_status() with the result of other functions.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
11 years agoMerge remote-tracking branch 'gh/wip-6242-b' into next
Sage Weil [Tue, 22 Oct 2013 20:32:01 +0000 (13:32 -0700)]
Merge remote-tracking branch 'gh/wip-6242-b' into next

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
11 years agopybind/rados: create InterruptedOrTimeoutError exception 757/head
Sage Weil [Tue, 22 Oct 2013 20:12:59 +0000 (13:12 -0700)]
pybind/rados: create InterruptedOrTimeoutError exception

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph: move timeout
Sage Weil [Tue, 22 Oct 2013 20:02:22 +0000 (13:02 -0700)]
ceph: move timeout

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph: catch exceptions thrown during the rados handle init
Sage Weil [Tue, 22 Oct 2013 19:54:09 +0000 (12:54 -0700)]
ceph: catch exceptions thrown during the rados handle init

In my case, making ceph.conf unreadable triggers an exception here:

Traceback (most recent call last):
  File "./ceph", line 802, in <module>
    sys.exit(main())
  File "./ceph", line 575, in main
    conf_defaults=conf_defaults, conffile=conffile)
  File "/home/sage/src/ceph/src/pybind/rados.py", line 221, in __init__
    self.conf_read_file(conffile)
  File "/home/sage/src/ceph/src/pybind/rados.py", line 272, in conf_read_file
    raise make_ex(ret, "error calling conf_read_file")
rados.Error: error calling conf_read_file: errno EACCES

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph: show basic help before initializing cluster connection
Sage Weil [Tue, 22 Oct 2013 19:53:30 +0000 (12:53 -0700)]
ceph: show basic help before initializing cluster connection

That way we still get help if there is an error.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph: default 5 second timeout for -h
Sage Weil [Tue, 22 Oct 2013 19:22:32 +0000 (12:22 -0700)]
ceph: default 5 second timeout for -h

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph: add --connect-timeout option
Sage Weil [Tue, 22 Oct 2013 19:22:24 +0000 (12:22 -0700)]
ceph: add --connect-timeout option

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph: print basic options before connecting
Sage Weil [Tue, 22 Oct 2013 18:23:28 +0000 (11:23 -0700)]
ceph: print basic options before connecting

This will let you control-c if the mon is unresponsive.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph: fixup do_help() function connection check
Greg Farnum [Thu, 17 Oct 2013 23:45:06 +0000 (16:45 -0700)]
ceph: fixup do_help() function connection check

We might have cluster_handle defined, but not have
successfully connected. Instead, check if it's in
the connected state.

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoceph.in: add emacs modeline
Sage Weil [Tue, 22 Oct 2013 18:13:04 +0000 (11:13 -0700)]
ceph.in: add emacs modeline

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge branch 'wip-6606' into next
Yehuda Sadeh [Tue, 22 Oct 2013 19:27:51 +0000 (12:27 -0700)]
Merge branch 'wip-6606' into next

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agorgw: don't bother to call c_str() on strings passed to dump_string() 755/head
Yehuda Sadeh [Tue, 22 Oct 2013 19:10:57 +0000 (12:10 -0700)]
rgw: don't bother to call c_str() on strings passed to dump_string()

dump_string() also accepts const string reference.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge pull request #754 from ceph/wip-test-librbd
Josh Durgin [Tue, 22 Oct 2013 17:04:25 +0000 (10:04 -0700)]
Merge pull request #754 from ceph/wip-test-librbd

fix ceph_test_lirbd crash
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoceph_test_librbd: fix heap overrun 754/head
Sage Weil [Tue, 22 Oct 2013 16:37:08 +0000 (09:37 -0700)]
ceph_test_librbd: fix heap overrun

We are storing rbd_snap_info_t structs, not pointers to them.  But we
can also avoid the heap entirely.

This crashed pretty reliably on arm.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agorgw: init src_bucket_name, src_object in the S3 handler
Yehuda Sadeh [Tue, 22 Oct 2013 01:02:32 +0000 (18:02 -0700)]
rgw: init src_bucket_name, src_object in the S3 handler

Be consistent and initialize these fields also in the S3 case.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: get rid of req_state.bucket_name
Yehuda Sadeh [Mon, 21 Oct 2013 21:45:59 +0000 (14:45 -0700)]
rgw: get rid of req_state.bucket_name

No need for this field, as we already have req_state.bucket_name_str.
This saves us some memory allocation / freeing through every request
processing.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agorgw: turn swift COPY into PUT
Yehuda Sadeh [Mon, 21 Oct 2013 21:17:12 +0000 (14:17 -0700)]
rgw: turn swift COPY into PUT

Fixes: #6606
The swift COPY operation is unique in a sense that it's a write
operation that has its destination not set by the URI target, but by a
different HTTP header. This is problematic as there are some hidden
assumptions in the code that the specified bucket/object in the URI is
the operation target. E.g., certain initialization functions, quota,
etc. Instead of creating a specialized code everywhere for this case
just turn it into a regular copy operation, that is, a PUT with
a specified copy source.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agolibrbd: parse args to ceph_test_librbd
Sage Weil [Mon, 21 Oct 2013 22:55:32 +0000 (15:55 -0700)]
librbd: parse args to ceph_test_librbd

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agolibrbd: fix build error
Sage Weil [Mon, 21 Oct 2013 22:48:42 +0000 (15:48 -0700)]
librbd: fix build error

From a10703008f7f4eb57a62658f2b9a015eb81509d0.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph-mon: add debug to ip selection
Sage Weil [Mon, 21 Oct 2013 22:33:37 +0000 (15:33 -0700)]
ceph-mon: add debug to ip selection

This will hopefully help us track down #5804.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #753 from ceph/wip-5668-b
Josh Durgin [Mon, 21 Oct 2013 21:58:31 +0000 (14:58 -0700)]
Merge pull request #753 from ceph/wip-5668-b

librbd: wire up flush counter
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibrbd: wire up flush counter 753/head
Sage Weil [Mon, 21 Oct 2013 21:40:03 +0000 (14:40 -0700)]
librbd: wire up flush counter

Fixes: #5668
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #751 from ceph/wip-6603
Loic Dachary [Mon, 21 Oct 2013 18:20:37 +0000 (11:20 -0700)]
Merge pull request #751 from ceph/wip-6603

a couple trivial leaks

11 years agocommon/BackTrace: fix memory leak 751/head
Sage Weil [Mon, 21 Oct 2013 16:22:35 +0000 (09:22 -0700)]
common/BackTrace: fix memory leak

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/cmdparse: fix memory leak
Sage Weil [Mon, 21 Oct 2013 16:21:57 +0000 (09:21 -0700)]
common/cmdparse: fix memory leak

demangle is allocating with malloc() in this case.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #746 from ceph/wip-6582
Sage Weil [Sat, 19 Oct 2013 06:08:08 +0000 (23:08 -0700)]
Merge pull request #746 from ceph/wip-6582

Wip 6582

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoReplicatedPG: copy: conditionally requeue copy ops when cancelled 746/head
Greg Farnum [Fri, 18 Oct 2013 23:34:11 +0000 (16:34 -0700)]
ReplicatedPG: copy: conditionally requeue copy ops when cancelled

We may need to requeue copy ops which are cancelled as part of an acting
set change but don't change the primary. To support this, add a
"requeue" flag to cancel_copy_ops() and copy_ops(), as well as to
CopyResults. The CopyCallback is then responsible for requeuing (the
higher layers can't do so as they can't know which request actually
triggered the copy).

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoPG: add a requeue_op() function to complement requeue_ops().
Greg Farnum [Fri, 18 Oct 2013 23:24:27 +0000 (16:24 -0700)]
PG: add a requeue_op() function to complement requeue_ops().

Signed-off-by: Greg Farnum <greg@inktank.com>
11 years agoMerge branch 'next'
Gary Lowell [Fri, 18 Oct 2013 01:51:16 +0000 (01:51 +0000)]
Merge branch 'next'

11 years agoMerge pull request #737 from xarses/6127
Josh Durgin [Fri, 18 Oct 2013 00:27:34 +0000 (17:27 -0700)]
Merge pull request #737 from xarses/6127

Add Redhat init script option
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoAdd Redhat init script option 737/head
Andrew Woodward [Thu, 17 Oct 2013 23:21:58 +0000 (16:21 -0700)]
Add Redhat init script option

Resolves: 6127
Signed-off-by: Andrew Woodward <awoodward@mirantis.com>
11 years agoMerge pull request #738 from ceph/wip-cache-crc
Sage Weil [Thu, 17 Oct 2013 23:52:29 +0000 (16:52 -0700)]
Merge pull request #738 from ceph/wip-cache-crc

fix cached crc, bug #6583

Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agocommon/buffer: invalidate crc on zero, copy_in 738/head
Sage Weil [Thu, 17 Oct 2013 23:47:29 +0000 (16:47 -0700)]
common/buffer: invalidate crc on zero, copy_in

This does not capture users who

 - calc a crc
 - use c_str() to modify the buffer content
 - (re)calc a crc

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/buffer: fix crc_map types
Sage Weil [Thu, 17 Oct 2013 23:46:10 +0000 (16:46 -0700)]
common/buffer: fix crc_map types

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocommon/buffer: drop unused fields
Sage Weil [Thu, 17 Oct 2013 23:36:20 +0000 (16:36 -0700)]
common/buffer: drop unused fields

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoqa/workunits/rest/test.py: fix mds {add,remove}_data_pool test
Sage Weil [Thu, 17 Oct 2013 21:38:37 +0000 (14:38 -0700)]
qa/workunits/rest/test.py: fix mds {add,remove}_data_pool test

Arg name changed from poolid to pool in e2602c54.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agodoc/release-notes: link ot the changelog
Sage Weil [Thu, 17 Oct 2013 20:25:59 +0000 (13:25 -0700)]
doc/release-notes: link ot the changelog

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agodoc/release-notes: v0.61.9
Sage Weil [Thu, 17 Oct 2013 20:15:23 +0000 (13:15 -0700)]
doc/release-notes: v0.61.9

Signed-off-by: Sage Weil <sage@inktank.com>