Commit Graph

32458 Commits

Author SHA1 Message Date
Loic Dachary
0a76aa5e70 Merge pull request #3872 from dachary/wip-7334-partx-test
ceph-disk: test activate on the second journal

Reviewed-by: Alfredo Deza <adeza@redhat.com>
2015-03-16 19:21:23 +01:00
John Spray
6417cf8b4e Merge pull request #3922 from ceph/wip-11053
mds: fix assertion caused by system clock backwards

Reviewed-by: John Spray <john.spray@redhat.com>
2015-03-16 13:32:29 -04:00
John Spray
c0e6227519 mds: give up replicas of a stopping mds's stuff
In order for an MDS to make it through stopping when
it had some strays, the other ranks that serviced
the migrate_stray renames must ensure that they
give up any cache objects that belonged to
the stopping MDS, so that the stopping MDS
can finish emptying its cache.

Fixes: #10744
Signed-off-by: John Spray <john.spray@redhat.com>
2015-03-16 17:05:46 +00:00
Kefu Chai
241a9d51c9 Merge pull request #4007 from dachary/wip-warnings
fix a few minor compilation warnings

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-03-16 15:33:53 +08:00
Loic Dachary
489bca16fb fix a few minor compilation warnings
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-16 08:13:44 +01:00
James Page
b2781fb563 Add support for PPC architecture, provide fallback
Add high precision cpu cycles support for powerpc and powerpc64.

Provide a fallback for other architectures and warn during
compilation.

Signed-off-by: James Page <james.page@ubuntu.com>
2015-03-13 19:47:00 +00:00
Kefu Chai
e3bbe4e02b Merge pull request #3957 from xinxinsh/wip-cleanup
os/{Level,Rocks}DBStore: cleanup in_prefix function

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-03-14 00:28:08 +08:00
Josh Durgin
6e56438b01 Merge pull request #3979 from ceph/wip-rbd-map-options
rbd: default map options, new options, misc

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2015-03-12 14:36:05 -07:00
Ilya Dryomov
6d9fbbe6f9 rbd: fix rw option skipping logic
We slip in an extraneous comma if { "rw": "rw" } happens to be the
first map_options pair:

    # ./rbd map -o rw,share foo
    /dev/rbd0

    -> 127.0.0.1:6789 name=admin,key=client.admin,,share rbd foo -

The kernel mount options parser can handle it, but fix it nonetheless.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-03-12 14:28:01 +03:00
Ilya Dryomov
2769da40d7 rbd: recognize cephx_require_signatures and tcp_nodelay options
Support for these went into 3.19 and 4.0 kernels respectively.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-03-12 14:27:32 +03:00
Ilya Dryomov
84adff4c74 rbd: add rbd default map options config option
Allow supplying rbd map -o / --options through 'rbd default map
options' config option.  Options specified on the command line take
precedence on a per-option basis, i.e. default and cli options are
merged with a preference for the latter.  For example:

    # grep 'rbd default map options' ceph.conf
            rbd default map options = "ro,nocrc"
    # ./rbd map -o noshare,rw foo
    /dev/rbd0

results in a rw mapping with nocrc,noshare.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-03-12 14:27:32 +03:00
Ilya Dryomov
cd761bb6d3 rbd: drop redefining map option warning
For example:

    # ./rbd map -o share,noshare foo
    rbd: warning: redefining map option share: 'share' -> 'noshare'
    /dev/rbd0

mount(8) doesn't do this and it's a bit silly to begin with.  Drop this
in preparation for adding rbd default map options config option.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2015-03-12 14:27:32 +03:00
Matt Benjamin
f5735b28d1 Fix XioLoopbackConnection Lifecycle.
Since XioLoopbackConnection is a RefCountedObject, it can't be
an expanded member of XioMessenger.

Fixes cleanup/shutdown errors.

Signed-off-by: Matt Benjamin <matt@cohortfs.com>
2015-03-11 14:14:28 -04:00
Matt Benjamin
76d4d4c6b7 Fix CMake build w/o RADOSGW.
Just fixes linkage of dencoder in test.  Fix the false assumption
that cls is only used if WITH_RADOSGW.

Signed-off-by: Matt Benjamin <matt@cohortfs.com>
2015-03-11 14:14:20 -04:00
Jason Dillaman
64d9e05d42 Merge pull request #3625 from majianpeng/objectcacher
Bugs fix about ObjectCacher

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2015-03-11 11:53:43 -04:00
Loic Dachary
f5acf6bb6a ceph-disk: more robust parted output parser
In some cases, depending on the implementation or the operating system,

   parted --machine -- /dev/sdh print

may contain empty lines. The current parsing code is fragile and highly
depends on output details. Replace it with code that basically does the
same sanity checks (output not empty, existence of units, existence of
the dev entry) but handles the entire output instead of checking line by
line.

http://tracker.ceph.com/issues/10983 Fixes: #10983

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-11 14:02:54 +01:00
Danny Al-Gaaf
faa7937f2f tools/rados/rados.cc: init some vars in constructor
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 14:00:08 +01:00
Danny Al-Gaaf
db175fb938 rgw_rados: don't assign value to parameter
Fix for cppcheck issue:
Assignment of function parameter has no effect outside the function.

Remove assignment to need_to_wait before exit.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 14:00:08 +01:00
Danny Al-Gaaf
778e0ef10d src/msg/xio/*: reduce scope of some vars
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 14:00:08 +01:00
Danny Al-Gaaf
6f79e4a616 rgw_quota.cc: init variables in constructor
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:42 +01:00
Danny Al-Gaaf
16c92378d1 TestErasureCodeShec_thread.cc: reduce scope of var
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:42 +01:00
Danny Al-Gaaf
ff760bee26 ObjectStoreTransactionBenchmark.cc: reduce scope of var
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:42 +01:00
Danny Al-Gaaf
828fc737f1 objectstore/store_test.cc: reduce scope of variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:42 +01:00
Danny Al-Gaaf
649f0f3e7e rgw_rados.cc: reduce scope of variable
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:42 +01:00
Danny Al-Gaaf
0a5e6af484 rgw_rados.cc: remove unused string vars
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:42 +01:00
Danny Al-Gaaf
e11f9d2c71 librbd/internal.cc: reduce scope of some variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:42 +01:00
Danny Al-Gaaf
0d78f4402f librbd/ObjectMap.cc: reduce scope of variable, prevent redef
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:42 +01:00
Danny Al-Gaaf
54aa23a699 ErasureCodeShec::minimum_to_decode: reduce scope of variables
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:42 +01:00
Danny Al-Gaaf
de7bcfd8d0 rgw/rgw_op.cc: fix potential null-deref in strcmp()
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:41 +01:00
Danny Al-Gaaf
921c08fce5 rgw_main.cc: fix null-deref in case get_storage() fails
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:41 +01:00
Danny Al-Gaaf
ab4e37f314 mds/MDS.cc: add missing asserts to check return values
Change existing asserts in set_up_admin_socket() to
check (VAR == 0).

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:41 +01:00
Danny Al-Gaaf
a3d0c80bda TestErasureCodeShec_all.cc: fix sprintf specifier
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:41 +01:00
Danny Al-Gaaf
51bec737d9 rgw: use static_cast instead of c-style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:41 +01:00
Danny Al-Gaaf
48d27ba1ed osd/ReplicatedPG.cc: use static_cast instead of c-style cast
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:41 +01:00
Danny Al-Gaaf
5393f32bbf TestErasureCodeShec_thread.cc: use static_cast instead of c-style
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:41 +01:00
Danny Al-Gaaf
bfe58833d4 itest/msgr/test_msgr.cc: prefer ++operator for non-primitive iter
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-11 13:58:41 +01:00
Loic Dachary
af3a37fb9d tests: ceph-disk.sh /dev/disk/by-partuuid and /dev/loop fixes
On CentOS 6.X and RHEL 6.X:

* /dev/disk/by-partuuid is not updated, support files must be installed
  to create them when udev notices a partition modification.

* /dev/loop is not configured to handle partition tables, the default
  2.6.32 kernel must be configured with loop.max_part=16

Sanity checks are added to verify the above, attempt to fix it and fail
if it cannot be fixed or if a machine reboot is necessary.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-11 13:55:10 +01:00
Yan, Zheng
07f5d7d316 Merge pull request #3666 from xroche/master
Added ceph_flock() to libcephfs.
2015-03-11 20:30:26 +08:00
Kefu Chai
ea7a127250 Merge pull request #3920 from rajukv/xio-bugfix
XIO: Handle requeue case of XIO messages

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-03-11 14:37:57 +08:00
Raju Kurunkad
dbb8c93d41 XIO: Handle requeue case of XIO messages
If we are not able to send the XIO message using xio_send_msg(),
remove the XIO message from the send Q, before queuing it to the resend
Q. Otherwise, boost will generate a assert.

Signed-off-by: Raju Kurunkad <raju.kurunkad@sandisk.com>
2015-03-11 12:00:36 +05:30
xinxin shu
af0986b4e0 cleanup in_prefix function
Signed-off-by: xinxin shu <xinxin.shu@intel.com>
2015-03-11 09:43:04 +08:00
Loic Dachary
af890731da tests: ceph-disk paritition creation and partition table in use
The kernel partition table notification (via partprobe, partx, etc.) may
behave differently when a partition is in use. Add a test case that
checks a new journal partition shows as expected, even if another
journal partition is in use.

http://tracker.ceph.com/issues/10987 Refs: #10987

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-10 17:50:29 +01:00
Loic Dachary
da22e22e7f tests: ceph-disk.sh test for second journal partition
Create an OSD with data on a disk, journal on another
This will add a new partition to $journal, the previous
one will remain.

Add 200MB to the file supporting the pseudo disk exposed via the loop
device: as we create more OSDs, more 100MB partitions will be created
for journals.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-10 17:50:29 +01:00
Loic Dachary
1e462a4520 tests: ceph-disk.sh cosmetic changes and reduced verbosity
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-10 17:50:29 +01:00
Loic Dachary
064a05e138 tests: do not use --journal-dio=true
Direct IO for the journal may cause subtle errors while running the
tests withing a container. Disable Direct IO for all ceph-disk.sh tests.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-10 17:50:29 +01:00
Loic Dachary
dda58cd4d8 tests: ceph-disk.sh may use uuidgen without PATH
Store the absolute path in a variable to find uuidgen even if PATH is
empty.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-10 17:50:29 +01:00
Loic Dachary
fbb6df525c tests: ceph-disk.sh can be confused if there are two OSDs
Replace the fragile extaction of the whoami file with an explicit uuid
set for a given OSD. It can conveniently be translated back into an osd
id with ceph osd create uuid if needed.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-10 17:50:29 +01:00
Loic Dachary
8d52dc185e tests: teardown on ceph-disk error
The activate_dev error must kill all process with teardown before
attempting to umount the devices when an error happens. Otherwise the
device fails to be unmounted and the loop devices are never freed.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-10 17:50:29 +01:00
Kefu Chai
d2057bd6d9 Merge pull request #3887 from stiopaa1/feature10891
mon: add "osd pool get $pool all" command

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-03-10 22:16:29 +08:00
Sage Weil
faa1f2741c Merge remote-tracking branch 'gh/hammer'
Conflicts:
	src/gmock
2015-03-10 06:24:59 -07:00