]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
12 years agofix buffer::list::zero(unsigned o, unsigned l) to act on all buffer::ptr 53/head
Loic Dachary [Thu, 14 Feb 2013 11:05:54 +0000 (12:05 +0100)]
fix buffer::list::zero(unsigned o, unsigned l) to act on all buffer::ptr

When buffer::list::zero was called on a buffer::list with "ABC" and
"DEF" in two different buffer::ptr with buffer::list::zero(4, 1) it
did nothing. The expected result is that the "DEF" buffer::ptr is
modified to "D\0F"

The test to check if the pointer is past the end of range to be zeroed
was reversed. It was o+l >= p which would always be true if the range
spans over the first buffer::ptr . It must be "o+l <= p" meaning the
pointer is past the end of the range and there is no need to loop over
the remaining buffer::ptr in the buffer::list

The p+it->length() >= o+l part of the if (p >= o && p+it->length() >=
o+l) test was also reversed. When called on "ABC" with zero(0, 1) it
would match because the range to be zeroed is contained in the
buffer::ptr. The call to it->zero() would zero the entire buffer::ptr
instead of just the first character.

unit tests are added to demonstrate the two problems with the previous
code and show that the patch fixes them.

http://tracker.ceph.com/issues/4123 refs #4123

Signed-off-by: Loic Dachary <loic@dachary.org>
12 years agodoc/release-notes: v0.56.3
Sage Weil [Thu, 14 Feb 2013 01:43:50 +0000 (17:43 -0800)]
doc/release-notes: v0.56.3

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip_4113'
Samuel Just [Thu, 14 Feb 2013 00:25:26 +0000 (16:25 -0800)]
Merge branch 'wip_4113'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoPG,OSD: convert write_info users to write_if_dirty
Samuel Just [Wed, 13 Feb 2013 22:29:21 +0000 (14:29 -0800)]
PG,OSD: convert write_info users to write_if_dirty

Also, explicitely dirty info and biginfo where necessary.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoOSD: init infos_object in OSD::init()
Samuel Just [Wed, 13 Feb 2013 21:17:05 +0000 (13:17 -0800)]
OSD: init infos_object in OSD::init()

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: place biginfo on the infos object next to the info and epoch keys
Samuel Just [Wed, 13 Feb 2013 21:00:12 +0000 (13:00 -0800)]
PG: place biginfo on the infos object next to the info and epoch keys

This is simpler and possibly more efficient.

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: minor style change for append_log and read_info
Samuel Just [Wed, 13 Feb 2013 20:57:52 +0000 (12:57 -0800)]
PG: minor style change for append_log and read_info

They exceeded 80 characters on a line!

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoPG: use helpers to generate info and epoch keys
Samuel Just [Wed, 13 Feb 2013 20:50:04 +0000 (12:50 -0800)]
PG: use helpers to generate info and epoch keys

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agolibcephfs: Fix shutdown segfault
Sam Lang [Wed, 13 Feb 2013 18:37:32 +0000 (12:37 -0600)]
libcephfs:  Fix shutdown segfault

client->shutdown() should only be called once, but with
new inited flag, we were calling it twice.  This sets
the inited flag back to false after client->shutdown()
is called the first time.

Broken by 133295ed001a950e3296f4e88a916ab2405be0cc.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge branch 'wip-deploy'
Sage Weil [Wed, 13 Feb 2013 20:47:30 +0000 (12:47 -0800)]
Merge branch 'wip-deploy'

Reviewed-by: Greg Farnum <greg@inktank.com>
12 years agodoc: Minor clarification.
John Wilkins [Wed, 13 Feb 2013 20:44:35 +0000 (12:44 -0800)]
doc: Minor clarification.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoOSD: dirty big_info in build_past_intervals_parallel
Samuel Just [Wed, 13 Feb 2013 20:43:23 +0000 (12:43 -0800)]
OSD: dirty big_info in build_past_intervals_parallel

Otherwise, the newly generated intervals won't get written!

Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoupstart: ceph-hotplug -> ceph-osd-activate
Sage Weil [Sun, 27 Jan 2013 03:18:23 +0000 (19:18 -0800)]
upstart: ceph-hotplug -> ceph-osd-activate

This is a more meaningful name.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoupstart/ceph-hotplug: tell activate to start via upstart
Sage Weil [Sun, 27 Jan 2013 03:14:22 +0000 (19:14 -0800)]
upstart/ceph-hotplug: tell activate to start via upstart

This will mark the OSD data dir as upstart-managed.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk-prepare: refactor to support DIR, DISK, or PARTITION for data or journal
Sage Weil [Sun, 27 Jan 2013 03:08:22 +0000 (19:08 -0800)]
ceph-disk-prepare: refactor to support DIR, DISK, or PARTITION for data or journal

Lots of code reorganization collapsed into a single commit here.

- detect whether the user gave us a directory, disk, or partition, and Do The
Right Thing
- allow them to force that the input was of type X, for the careful/paranoid.
- make --zap-disk an option -- no longer the default

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: Made a few clarifications from feedback.
John Wilkins [Wed, 13 Feb 2013 20:39:24 +0000 (12:39 -0800)]
doc: Made a few clarifications from feedback.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoceph-disk-activate: detect whether PATH is mount or dir
Sage Weil [Sun, 27 Jan 2013 04:33:16 +0000 (20:33 -0800)]
ceph-disk-activate: detect whether PATH is mount or dir

remove in-the-way symlinks in /var/lib/ceph/osd

This is simpler.  Just detect what the path is and Do The Right Thing.

Closes #3341 (which wanted to make --mount the default)

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk-activate: add --mark-init INITSYSTEM option
Sage Weil [Sun, 27 Jan 2013 04:32:47 +0000 (20:32 -0800)]
ceph-disk-activate: add --mark-init INITSYSTEM option

Do not assume we will manage via upstart; let that be passed down via the
command line.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk-activate: factor mounting out of activate
Sage Weil [Sat, 26 Jan 2013 22:44:26 +0000 (14:44 -0800)]
ceph-disk-activate: factor mounting out of activate

The activate stuff is generic for any OSD, regardless of whether we want
to mount it or not.  Pull that part out.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodebian: put ceph-mds upstart conf in ceph-mds package
Sage Weil [Wed, 13 Feb 2013 02:17:55 +0000 (18:17 -0800)]
debian: put ceph-mds upstart conf in ceph-mds package

Fixes: #3157
Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodebian: include /var/lib/ceph/bootstrap-mds in package
Sage Weil [Wed, 13 Feb 2013 01:02:52 +0000 (17:02 -0800)]
debian: include /var/lib/ceph/bootstrap-mds in package

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-create-keys: create mds bootstrap key
Sage Weil [Wed, 13 Feb 2013 00:26:14 +0000 (16:26 -0800)]
ceph-create-keys: create mds bootstrap key

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoupstart/ceph-hotplug: drop -- in ceph-disk-activate args
Sage Weil [Sat, 26 Jan 2013 22:45:43 +0000 (14:45 -0800)]
upstart/ceph-hotplug: drop -- in ceph-disk-activate args

We would like to transition to

 ceph-disk-activate --mount DEV

and away from a generic multi-definition PATH argument.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoinit-ceph: iterate/locate local sysvinit-tagged directories
Sage Weil [Sat, 26 Jan 2013 06:53:23 +0000 (22:53 -0800)]
init-ceph: iterate/locate local sysvinit-tagged directories

Search /var/lib/ceph/$type/ceph-$id and start/stop those daemons if
present and tagged with the sysvinit file.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoinit-ceph: consider sysvinit-tagged dirs as local
Sage Weil [Sat, 26 Jan 2013 06:52:03 +0000 (22:52 -0800)]
init-ceph: consider sysvinit-tagged dirs as local

If there is a 'sysvinit' file in the daemon directory in the default
location (/var/lib/ceph/$type/ceph-$id), consider it sysvinit-managed.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodebian: implement purge postrm script for ceph, ceph-mds
Sage Weil [Sun, 27 Jan 2013 09:11:40 +0000 (01:11 -0800)]
debian: implement purge postrm script for ceph, ceph-mds

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoceph-disk-prepare: align mkfs, mount config options with mkcephfs
Sage Weil [Tue, 12 Feb 2013 01:39:03 +0000 (17:39 -0800)]
ceph-disk-prepare: align mkfs, mount config options with mkcephfs

'osd mkfs ...', not 'osd fs mkfs ...'.  Sigh.  Support both.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: Added many Q/A sections to the FAQ.
John Wilkins [Wed, 13 Feb 2013 20:06:25 +0000 (12:06 -0800)]
doc: Added many Q/A sections to the FAQ.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoqa: fix mon/osd.sh
Sage Weil [Wed, 13 Feb 2013 16:30:09 +0000 (08:30 -0800)]
qa: fix mon/osd.sh

It needs to be a valid osd id that we try to remove (that doesn't exist).

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agospecfile: Add ceph-coverage to list of binaries
Sam Lang [Wed, 13 Feb 2013 15:53:55 +0000 (09:53 -0600)]
specfile:  Add ceph-coverage to list of binaries

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agoosd/PG: initialize info_struct_v in ctor
Sage Weil [Wed, 13 Feb 2013 05:20:20 +0000 (21:20 -0800)]
osd/PG: initialize info_struct_v in ctor

Otherwise we randomly assert on the first write_info() for newly created
PGs.  Introduced by 188f3ea6867eeb6e950f6efed18d53ff17522bbc.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: clarified ceph id vs. ceph name, and fixed a typo.
John Wilkins [Wed, 13 Feb 2013 01:53:02 +0000 (17:53 -0800)]
doc: clarified ceph id vs. ceph name, and fixed a typo.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoMerge branch 'next'
Josh Durgin [Wed, 13 Feb 2013 00:55:32 +0000 (16:55 -0800)]
Merge branch 'next'

Conflicts:
src/include/ceph_features.h

12 years agoosd/PG: store pg_info_t in leveldb (omap), purged_snaps separately
David Zafman [Mon, 11 Feb 2013 20:20:23 +0000 (12:20 -0800)]
osd/PG: store pg_info_t in leveldb (omap), purged_snaps separately

Separate the purged_snaps portion of pg_info_t (the one that gets big).

Feature #3891: osd: move purged_snaps out of info

Add a separate dirty_big_info flag so that we only update the pginfo
"biginfo" file if that state changes.  This lets us avoid the cost in the
general case, like a regular PG write.

Add LEVELDBINFO feature

Put info, biginfo in leveldb
Move epoch to omap

Feature #3892: osd: move pg info into leveldb

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Just <sam.just@inktank.com>
12 years agodoc: Added some of the troubleshooting steps into the libvirt procedure and removed...
John Wilkins [Wed, 13 Feb 2013 01:12:41 +0000 (17:12 -0800)]
doc: Added some of the troubleshooting steps into the libvirt procedure and removed path for virsh edit.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agolibrbd: unprotect any non-unprotected snapshot
Josh Durgin [Tue, 12 Feb 2013 01:08:55 +0000 (17:08 -0800)]
librbd: unprotect any non-unprotected snapshot

Include snapshots in the UNPROTECTING state as well, which can occur
after an unprotect is interrupted.

Fixes: #4100
Backport: bobtail
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agodeb: Add ceph-coverage to ceph-test deb package
Sam Lang [Tue, 12 Feb 2013 17:32:29 +0000 (11:32 -0600)]
deb:  Add ceph-coverage to ceph-test deb package

Teuthology uses the ceph-coverage script extensively
and expects it to be installed by the ceph task.  Add
the script to the ceph-test debian package so that it
gets installed for that use case.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
12 years agomds: Setting pool on a file requires latest osdmap
Sam Lang [Tue, 12 Feb 2013 22:33:58 +0000 (16:33 -0600)]
mds: Setting pool on a file requires latest osdmap

If we create a file, then create a pool, then try to
set the pool on the file with the vxattr, no mds operation
triggers a request for the latest osdmap, so we get back
EINVAL.  So if we fail to find the pool initially, fall back
to requesting a new osdmap and trying the vxattr again.  We
don't wait for a new map if we don't get anything newer than
what we already have.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomds: Add retry field to MDRequest
Sam Lang [Tue, 12 Feb 2013 22:33:19 +0000 (16:33 -0600)]
mds:  Add retry field to MDRequest

The MDRequest can be retried via the RetryRequest finisher,
we add a retry field that gets incremented before each
retry in the finisher.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoqa/workunits: Add vxattr set pool test script
Sam Lang [Mon, 11 Feb 2013 22:13:07 +0000 (16:13 -0600)]
qa/workunits:  Add vxattr set pool test script

Add a test script that tests for creating a pool
and then setting the layout for a (pre-existing)
file to that pool.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agocephtool: Add add_data_pool command to help
Sam Lang [Mon, 11 Feb 2013 22:12:15 +0000 (16:12 -0600)]
cephtool:  Add add_data_pool command to help

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agomsg/Messenger: rename option
Sage Weil [Tue, 12 Feb 2013 22:18:24 +0000 (14:18 -0800)]
msg/Messenger: rename option

It's unhandled, not unexpected.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #50 from dalgaaf/wip-da-sca-clang-overloaded-virt-2
Gregory Farnum [Tue, 12 Feb 2013 22:17:57 +0000 (14:17 -0800)]
Merge pull request #50 from dalgaaf/wip-da-sca-clang-overloaded-virt-2

mds/LogEvent.h: change print() signature to const

12 years agoosd: only share maps on hb connection of OSD_HBMSGS feature is set
Sage Weil [Tue, 12 Feb 2013 22:11:09 +0000 (14:11 -0800)]
osd: only share maps on hb connection of OSD_HBMSGS feature is set

Back in 1bc419a7affb056540ba8f9b332b6ff9380b37af we started sharing maps
with dead osds via the heartbeat connection, but old code will crash on an
unexpected message.  Only do this if the OSD_HBMSGS feature is present.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: tolerate unexpected messages on the heartbeat interface
Sage Weil [Tue, 12 Feb 2013 22:10:51 +0000 (14:10 -0800)]
osd: tolerate unexpected messages on the heartbeat interface

We should note but not crash on unexpected messages.  Announce this awesome
new "capability" via a feature bit.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agomsg/Messenger: do not crash on unhandled message
Sage Weil [Tue, 12 Feb 2013 21:52:09 +0000 (13:52 -0800)]
msg/Messenger: do not crash on unhandled message

This is just polite.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years ago.gitignore: fix ceph_filestore_dump name
Sage Weil [Tue, 12 Feb 2013 16:29:29 +0000 (08:29 -0800)]
.gitignore: fix ceph_filestore_dump name

Underscores!

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoRevert "Makefile: name binary ceph-filestore-dump"
Sage Weil [Tue, 12 Feb 2013 16:28:31 +0000 (08:28 -0800)]
Revert "Makefile: name binary ceph-filestore-dump"

This reverts commit f0b2e32af69d7d009837832066a1445c45bbc362.

Be consistent with everything else.

12 years agomds/LogEvent.h: change print() signature to const 50/head
Danny Al-Gaaf [Tue, 12 Feb 2013 21:17:38 +0000 (22:17 +0100)]
mds/LogEvent.h: change print() signature to const

Fix print() function of src/mds/LogEvent.h, declare as

virtual void print(ostream& out) const {...}

Adapt functions of derived classes. This should fix a problem
with print function of derived classes EImportStart and
EImportFinish, which had a const signature, hiding virtual
function of the base class LogEvent (which wasn't const).

Fix -Woverloaded-virtual warning from clang was:

mds/events/EImportStart.h:43:8: warning: 'EImportStart::print'
 hides overloaded virtual function [-Woverloaded-virtual]
  void print(ostream& out) const {
       ^
mds/events/../LogEvent.h:95:16: note: hidden overloaded virtual
 function 'LogEvent::print' declared here
  virtual void print(ostream& out) {
               ^
In file included from mds/journal.cc:31:
mds/events/EImportFinish.h:35:8: warning: 'EImportFinish::print'
 hides overloaded virtual function [-Woverloaded-virtual]
  void print(ostream& out) const {
       ^
mds/events/../LogEvent.h:95:16: note: hidden overloaded
 virtual function 'LogEvent::print' declared here
  virtual void print(ostream& out) {

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agomodified the perl file name
tamil [Tue, 12 Feb 2013 18:55:27 +0000 (10:55 -0800)]
modified the perl file name
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
12 years agoMerge branch 'wip-4064-sam'
Samuel Just [Tue, 12 Feb 2013 18:15:26 +0000 (10:15 -0800)]
Merge branch 'wip-4064-sam'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoFileStore: set replay guard on create_collection
Samuel Just [Mon, 11 Feb 2013 20:52:07 +0000 (12:52 -0800)]
FileStore: set replay guard on create_collection

This should prevent sequences like:

rmcoll a
mkcoll a
touch a foo
<crash>

from causing trouble by preventing the rmcoll
and mkcoll from being replayed.

Fixes: 4064
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoFileStore: _split_collection should not create the collection
Samuel Just [Mon, 11 Feb 2013 20:24:14 +0000 (12:24 -0800)]
FileStore: _split_collection should not create the collection

This will simplify adding a replay guard to create_collection.

Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
12 years agoos/FileStore: do not tolerate ENOENT on collection_add
Sage Weil [Mon, 11 Feb 2013 03:52:13 +0000 (19:52 -0800)]
os/FileStore: do not tolerate ENOENT on collection_add

If we get ENOENT on a collection_add that is a bad thing; do not ignore
the error.  This was hiding #4071 for some time.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoosd: make coll_t::is_pg() correctly validate the snapid suffix
Sage Weil [Sun, 10 Feb 2013 05:36:58 +0000 (21:36 -0800)]
osd: make coll_t::is_pg() correctly validate the snapid suffix

The strtoull() man page suggests resetting errno and using that to
check for a parsing error.  This ensures the OSD::load_pgs() callers are
getting what they expect (now that they aren't relying on the broken
behavior).  The other callers in the os/* code is moved to a different
method that ignores the suffix.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agoos: use coll_t:is_pg_prefix() check instead of is_pg()
Sage Weil [Sun, 10 Feb 2013 05:34:02 +0000 (21:34 -0800)]
os: use coll_t:is_pg_prefix() check instead of is_pg()

The objectstore code was trying to parse out a pgid from the collection
name and using the is_pg() helper, which incorrectly tolerates a _TEMP
suffix and returns a bad value for the snapid.  The objectstore doesn't
actually care about that value, so this is harmless, but sloppy.

Introduce a simpler is_pg_prefix() helper and use that instead.

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: Removed legacy comment regarding Keystone integration.
John Wilkins [Tue, 12 Feb 2013 17:54:07 +0000 (09:54 -0800)]
doc: Removed legacy comment regarding Keystone integration.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agodoc: Added link to <disk> reference. Added minor clarifications.
John Wilkins [Tue, 12 Feb 2013 17:53:17 +0000 (09:53 -0800)]
doc: Added link to <disk> reference. Added minor clarifications.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years agoceph-filestore-dump: Improve error message
David Zafman [Fri, 8 Feb 2013 07:39:11 +0000 (23:39 -0800)]
ceph-filestore-dump: Improve error message

Fix error message when encountering already in use
OSD store.

Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
12 years agoMerge branch 'wip-mds-encode-rebased'
Greg Farnum [Tue, 12 Feb 2013 06:02:33 +0000 (22:02 -0800)]
Merge branch 'wip-mds-encode-rebased'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMakefile: name binary ceph-filestore-dump
Sage Weil [Tue, 12 Feb 2013 04:49:03 +0000 (20:49 -0800)]
Makefile: name binary ceph-filestore-dump

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agodoc: Added procedures for using libvirt VMs with Ceph.
John Wilkins [Tue, 12 Feb 2013 03:44:55 +0000 (19:44 -0800)]
doc: Added procedures for using libvirt VMs with Ceph.

fixes: #3432

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
12 years ago.gitignore: fix typo and missing vstart.sh output
Josh Durgin [Tue, 12 Feb 2013 02:38:06 +0000 (18:38 -0800)]
.gitignore: fix typo and missing vstart.sh output

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agowork unit for rbd cli tests
tamil [Tue, 12 Feb 2013 02:11:26 +0000 (18:11 -0800)]
work unit for rbd cli tests
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
12 years agoadded new cli tests
tamil [Tue, 12 Feb 2013 01:24:50 +0000 (17:24 -0800)]
added new cli tests
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
12 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Tue, 12 Feb 2013 01:12:22 +0000 (17:12 -0800)]
Merge remote-tracking branch 'gh/next'

12 years agoosd: update snap collections for sub_op_modify log records conditionaly
Sage Weil [Mon, 11 Feb 2013 14:23:54 +0000 (06:23 -0800)]
osd: update snap collections for sub_op_modify log records conditionaly

The only remaining caller is sub_op_modify().  If we do have a non-empty
op transaction, we want to do this update, regardless of what we think
last_backfill is (our notion may be not completely in sync with the
primary).  In particular, our last_backfill may be the same object but
a different snapid, but the primary disagrees and is pushing an op
transaction through.

Instead, update the collections if we have a non-empty transaction.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: include snaps in pg_log_entry_t::dump()
Sage Weil [Mon, 11 Feb 2013 01:02:45 +0000 (17:02 -0800)]
osd: include snaps in pg_log_entry_t::dump()

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: unconditionally encode snaps buffer
Sage Weil [Mon, 11 Feb 2013 00:59:48 +0000 (16:59 -0800)]
osd: unconditionally encode snaps buffer

Previously we would only encode the updated snaps vector for CLONE ops.
This doesn't work for MODIFY ops generated by the snap trimmer, which
may also adjust the clone collections.  It is also possible that other
operations may need to populate this field in the future (e.g.,
LOST_REVERT may, although it currently does not).

Fixes: #4071, and possibly #4051.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoosd: improve debug output on snap collections
Sage Weil [Sun, 10 Feb 2013 18:57:12 +0000 (10:57 -0800)]
osd: improve debug output on snap collections

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
12 years agoRevert "rgw: plain format always appends eol to data"
Yehuda Sadeh [Mon, 11 Feb 2013 19:30:02 +0000 (11:30 -0800)]
Revert "rgw: plain format always appends eol to data"

This commit breaks the swift unit test. The reason is that it
makes it so that returned error status ends with eol, which
is not as expected.

This reverts commit c31aff5f9f0b9fe4ada6b259dd1f424627b3e875.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
12 years agoMerge branch 'wip-da-rename-ceph-test'
Josh Durgin [Mon, 11 Feb 2013 19:02:16 +0000 (11:02 -0800)]
Merge branch 'wip-da-rename-ceph-test'

12 years agolibcephfs: fix for #4068
Joe Buck [Sun, 10 Feb 2013 02:48:57 +0000 (18:48 -0800)]
libcephfs: fix for #4068

If client->init() fails in mount, then client->shutdown()
should not be called. This patch uses a bool to ensure
that shutdown is only called if init() succeeds.

Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge pull request #47 from dalgaaf/wip-da-sca-cppcheck-clang-2
Sage Weil [Mon, 11 Feb 2013 17:43:31 +0000 (09:43 -0800)]
Merge pull request #47 from dalgaaf/wip-da-sca-cppcheck-clang-2

fix more issues from clang(++) and cppchecker

Reviewed-by: Sage Weil <sage@inktank.com>
12 years ago.gitignore: add local ones for ocf and man
Josh Durgin [Mon, 11 Feb 2013 17:08:01 +0000 (09:08 -0800)]
.gitignore: add local ones for ocf and man

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoqa/rbd: +x on map-snapshot-io.sh
Sage Weil [Mon, 11 Feb 2013 16:48:44 +0000 (08:48 -0800)]
qa/rbd: +x on map-snapshot-io.sh

Signed-off-by: Sage Weil <sage@inktank.com>
12 years agotest: fix run-rbd-tests
Josh Durgin [Mon, 11 Feb 2013 16:04:47 +0000 (08:04 -0800)]
test: fix run-rbd-tests

The python tests were not renamed

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years ago.gitignore: re-add vstart dirs and tags, fix typo
Josh Durgin [Mon, 11 Feb 2013 16:04:01 +0000 (08:04 -0800)]
.gitignore: re-add vstart dirs and tags, fix typo

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
12 years agoMutex.cc: fix implicitly-defined namespace 'std' 47/head
Danny Al-Gaaf [Mon, 11 Feb 2013 15:47:58 +0000 (16:47 +0100)]
Mutex.cc: fix implicitly-defined namespace 'std'

Fix warning from clang(++):

common/Mutex.cc:14:17: warning: using directive refers to
  implicitly-defined namespace 'std'
using namespace std;
                ^

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph_authtool.cc: fix implicitly-defined namespace 'std'
Danny Al-Gaaf [Mon, 11 Feb 2013 15:42:27 +0000 (16:42 +0100)]
ceph_authtool.cc: fix implicitly-defined namespace 'std'

Fix warning from clang(++):

ceph_authtool.cc:15:17: warning: using directive refers to
 implicitly-defined namespace 'std'
using namespace std;
                ^
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agolibrados/librados.cc: fix implicitly-defined namespace 'std'
Danny Al-Gaaf [Thu, 7 Feb 2013 19:36:15 +0000 (20:36 +0100)]
librados/librados.cc: fix implicitly-defined namespace 'std'

Fix warning from clang(++):

librados/librados.cc:15:17: warning: using directive refers to
 implicitly-defined namespace 'std'
using namespace std;
                ^
Include what we need and use the related classes.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agotest_mon_workloadgen.cc: fix -Wgnu
Danny Al-Gaaf [Thu, 7 Feb 2013 19:19:03 +0000 (20:19 +0100)]
test_mon_workloadgen.cc: fix -Wgnu

Fix warning from clang(++):

 test/mon/test_mon_workloadgen.cc:311:23: warning: in-class
 initializer for static data member of type 'const double' is
 a GNU extension [-Wgnu]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agosrc/osd/PG.h: use empty() instead of size()
Danny Al-Gaaf [Thu, 7 Feb 2013 19:16:46 +0000 (20:16 +0100)]
src/osd/PG.h: use empty() instead of size()

Fix warning for usage of objects.size(). Use empty() since it
should be prefered as it has, following the standard, a constant
time complexity regardless of the containter type. The same is not
guaranteed for size().

warning from cppchecker was:
[osd/PG.h:599]: (performance) Possible inefficient checking for
  'objects' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agosrc/osd/OSD.h: use empty() instead of size()
Danny Al-Gaaf [Thu, 7 Feb 2013 19:14:34 +0000 (20:14 +0100)]
src/osd/OSD.h: use empty() instead of size()

Fix warning for usage of *.size(). Use empty() since it should be
prefered as it has, following the standard, a constant time
complexity regardless of the containter type. The same is not
guaranteed for size().

warning from cppchecker was:
[osd/OSD.h:265]: (performance) Possible inefficient checking for
   'last_scrub_pg' emptiness.
[osd/OSD.h:274]: (performance) Possible inefficient checking for
   'last_scrub_pg' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agosrc/msg/Messenger.h: pass function parameter by reference
Danny Al-Gaaf [Thu, 7 Feb 2013 19:13:28 +0000 (20:13 +0100)]
src/msg/Messenger.h: pass function parameter by reference

Fix "(performance) Function parameter 'm' should be passed by reference."
from cppchecker.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agosrc/mon/PGMonitor.cc: remove unused variable
Danny Al-Gaaf [Thu, 7 Feb 2013 19:09:23 +0000 (20:09 +0100)]
src/mon/PGMonitor.cc: remove unused variable

Remove unused variable to fix:

mon/PGMonitor.cc:170:11: warning: unused variable 'now'
  [-Wunused-variable]

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agosrc/log/Entry.h: pass function parameter by reference
Danny Al-Gaaf [Thu, 7 Feb 2013 19:07:52 +0000 (20:07 +0100)]
src/log/Entry.h: pass function parameter by reference

Fix "(performance) Function parameter 's' should be passed by reference."
from cppchecker.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocommon/WorkQueue.h: use empty() instead of size()
Danny Al-Gaaf [Thu, 7 Feb 2013 19:04:39 +0000 (20:04 +0100)]
common/WorkQueue.h: use empty() instead of size()

Fix warning for usage of out->size() in _void_dequeue(). Use empty()
since it should be prefered as it has, following the standard, a
constant time complexity regardless of the containter type. The
same is not guaranteed for size().

warning from cppchecker was:
[common/WorkQueue.h:97]: (performance) Possible inefficient
  checking for 'queue' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocommon/AsyncReserver.h: use empty() instead of size()
Danny Al-Gaaf [Thu, 7 Feb 2013 18:55:52 +0000 (19:55 +0100)]
common/AsyncReserver.h: use empty() instead of size()

Fix warning for usage of queue.size() in do_queues(). Use empty()
since it should be prefered as it has, following the standard, a
constant time complexity regardless of the containter type. The
same is not guaranteed for size().

warning from cppchecker was:
[common/AsyncReserver.h:40]: (performance) Possible inefficient
  checking for 'queue' emptiness.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agosrc/msg/msg_types.h: pass function parameter by reference
Danny Al-Gaaf [Thu, 7 Feb 2013 16:04:18 +0000 (17:04 +0100)]
src/msg/msg_types.h: pass function parameter by reference

Fix "Function parameter 'm' should be passed by reference." from cppchecker.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agocommon/config.h: declaration of config_option as struct
Danny Al-Gaaf [Wed, 6 Feb 2013 15:03:09 +0000 (16:03 +0100)]
common/config.h: declaration of config_option as struct

Change declaration of config_option from 'class' to 'struct' since
it's defined as struct and used this way (access members). The declaration
as class doesn't change the behaviour.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoMerge pull request #44 from dachary/wip-4070
Sage Weil [Mon, 11 Feb 2013 02:08:55 +0000 (18:08 -0800)]
Merge pull request #44 from dachary/wip-4070

buffer::ptr self assignment bug + patch

Reviewed-by: Sage Weil <sage@inktank.com>
12 years agoMerge remote-tracking branch 'danny/wip-da-sca-memleaks'
Sage Weil [Mon, 11 Feb 2013 02:04:02 +0000 (18:04 -0800)]
Merge remote-tracking branch 'danny/wip-da-sca-memleaks'

Reviewed-by: Sage Weil <sage@inktank.com>
12 years ago.gitignore: cleanup and sort entries 45/head
Danny Al-Gaaf [Sun, 10 Feb 2013 19:52:21 +0000 (20:52 +0100)]
.gitignore: cleanup and sort entries

Cleanup old entries and sort the existing entries. Remove no longer
existing entries/files. Move some entries from top level .gitignore
files down to the correct subdir .gitignore file.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph-test.install: updated filelist
Danny Al-Gaaf [Sun, 10 Feb 2013 18:00:40 +0000 (19:00 +0100)]
ceph-test.install: updated filelist

Add some files which are part of the ceph-test package on RPM based
distributions already: ceph_test_mon_workloadgen, ceph_rgw_jsonparser,
ceph_test_objectcacher_stress.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agospec/debian: don't install rest-bench twice
Danny Al-Gaaf [Sun, 10 Feb 2013 17:56:47 +0000 (18:56 +0100)]
spec/debian: don't install rest-bench twice

Don't install rest-bench in ceph.spec.in section for ceph-test and
ceph-test.install twice. This file is already part of the rest-bench
package.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoceph-test: give binaries from ceph-test package useful names
Danny Al-Gaaf [Sun, 10 Feb 2013 17:33:56 +0000 (18:33 +0100)]
ceph-test: give binaries from ceph-test package useful  names

The files from the ceph-test subpackage are installed to /usr/bin,
give them more useful names to make sure that the user know they
belong to ceph. add a 'ceph_' prefix and change some test* binaries
to ceph_test_*.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agobuffer::ptr self assignment bug + patch 44/head
Loic Dachary [Sun, 10 Feb 2013 13:23:36 +0000 (14:23 +0100)]
buffer::ptr self assignment bug + patch

After

buffer::ptr a(1);
a = a;

a call to a.get_raw() will return a null pointer and there will be
no pointer referencing the original buffer::raw object although its
reference count is 1.

buffer::ptr& buffer::ptr::operator= (const ptr& p) is modified to use
a local buffer::raw pointer to fix the memory leak. a = a
is a noop instead of loosing the original raw buffer.

A set of unit tests is added src/test/bufferlist.cc to demonstrate
that the proposed change works as expected. It is checked with
valgrind that reports no memory leak. The same test can be run against
the original code to show that it leaks.

http://tracker.ceph.com/issues/4070 refs #4070

Signed-off-by: Loic Dachary <loic@dachary.org>
12 years agorgw/rgw_rest.cc: fix 4K memory leak 42/head
Danny Al-Gaaf [Fri, 8 Feb 2013 16:17:59 +0000 (17:17 +0100)]
rgw/rgw_rest.cc: fix 4K memory leak

Fix 4K memory leak in case RGWClientIO::read() fails in
read_all_chunked_input().

Error from cppcheck was:
Checking src/rgw/rgw_rest.cc...
[src/rgw/rgw_rest.cc:688]: (error) Memory leak: data

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
12 years agoSyntheticClient.cc: fix some memory leaks in the error handling
Danny Al-Gaaf [Fri, 8 Feb 2013 16:14:19 +0000 (17:14 +0100)]
SyntheticClient.cc: fix some memory leaks in the error handling

Fix some memory leaks in case of error handling due to failed
client->open() calls.

Error from cppcheck was:
[src/client/SyntheticClient.cc:1980]: (error) Memory leak: buf
[src/client/SyntheticClient.cc:2040]: (error) Memory leak: buf
[src/client/SyntheticClient.cc:2090]: (error) Memory leak: buf