Commit Graph

67926 Commits

Author SHA1 Message Date
Kefu Chai
d54f75d244 Merge pull request #12828 from donglinpeng/dlppull
common/buffer: close pipe fd if set nonblocking fails.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-01-23 19:42:14 +08:00
Wido den Hollander
e73eb8cc1e
systemd: Restart Mon after 10s in case of failure
In some situations the IP address the Monitor wants to bind to
might not be available yet.

This might for example be a IPv6 Address which is still performing
DAD or waiting for a Router Advertisement to be send by the Router(s).

Have systemd wait for 10s before starting the Mon and increase the amount
of times it does so to 5.

This allows the system to bring up IP Addresses in the mean time while
systemd waits with restarting the Mon.

Fixes: #18635

Signed-off-by: Wido den Hollander <wido@42on.com>
2017-01-23 08:50:08 +01:00
optimistyzy
edb0e7d4c6 NVMEDevice.cc: cleanup the logic in data_buf_next_sge
Signed-off-by: optimistyzy <optimistyzy@gmail.com>
2017-01-23 11:00:02 +08:00
Sage Weil
65f5187e42 Merge pull request #12980 from liewegas/wip-osdop-printer
osd/osd_types: clean up OSDOp printers

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-01-22 10:45:37 -06:00
Sage Weil
1bda01736f osd/osd_types: clean up OSDOp printers
Specify which ones get offset~length instead of blacklisting those that
don't.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-01-22 11:44:46 -05:00
Sage Weil
55b96a3b65 Merge pull request #12950 from liewegas/wip-omap-getkeys
osd: extend OMAP_GETKEYS and GETVALS to include a 'more' output field

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2017-01-22 10:44:04 -06:00
Sage Weil
9a6a276aa2 Merge pull request #12961 from songbaisen/s10
crush:  when osd_location_hook does not exist, we should exit error.


Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2017-01-22 10:43:27 -06:00
Sage Weil
5dccac8697 Merge pull request #12975 from wonzhq/fix-pgstats-down
mon: don't set last_osd_report when the pg stats msg is ignored

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-01-22 10:43:00 -06:00
Sage Weil
c0b4ced7b1 Merge pull request #12976 from LiumxNL/wip-170118
osd/OSDMap: get_previous_up_osd_before() may run into endless loop

Reviewed-by: Sage Weil <sage@redhat.com>
2017-01-22 10:42:33 -06:00
Sage Weil
4bad4bd86a Merge pull request #12981 from liewegas/wip-crush-move-osd
mon/OSDMonitor: make 'osd crush move ...' work on osds

Reviewed-by: Kefu Chai <kchai@redhat.com>
2017-01-22 10:42:08 -06:00
Sage Weil
7495487e56 Merge pull request #13008 from athanatos/wip-clone-range
osd,librados: remove clone_range and associated multi-object cruft

Reviewed-by: Sage Weil <sage@redhat.com>
2017-01-22 10:41:55 -06:00
Mykola Golub
fce69f6348 Merge pull request #13033 from dillaman/wip-18618
journal: don't hold future lock during assignment

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-01-22 14:52:32 +02:00
Hongtong Liu
97aa6ec290 bluestore: Release segs before delete task when write fails
Fix assert failure in ~Task().

Signed-off-by: Hongtong Liu <hongtong.liu@istuary.com>
2017-01-22 17:26:33 +08:00
Hongtong Liu
9caff5e455 os/bluestore: fix NVMEDevice::open failure if serial number ends with a number
buf in effect is the serial number in ceph.conf and
the serial number consists of 16 hexadecimal characters.
1. In order to avoid ignoring the numbers, scan buf
with isxdigit.
2. In order to ignore all the potential garbage,
scan buf from the beginning.

Signed-off-by: Hongtong Liu <hongtong.liu@istuary.com>
2017-01-22 17:25:04 +08:00
Kefu Chai
5647d5ee8e common/BackTrace: demangle on FreeBSD also
the output on FreeBSD/clang looks like:

1: 0x44bfb3 <_Z3foov+0x413> at /usr/srcs/Ceph/work/ceph/build/bin/unittest_back_trace
2: 0x44c23e <_ZN20BackTrace_Basic_Test8TestBodyEv+0x1e> at /usr/srcs/Ceph/work/ceph/build/bin/unittest_back_trace
3: 0x4d068a <_ZN7testing8internal38HandleSehExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc+0x7a> at /usr/srcs/Ceph/work/ceph/build/bin/unittest_back_trace
4: 0x4b5977 <_ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc+0x77> at /usr/srcs/Ceph/work/ceph/build/bin/unittest_back_trace
...

and update the test accordingly, as FreeBSD/clang uses '<>' to enclose
the mangled function and offset.

also, only demangle the C++ mangled names. those names always start with
"_Z". on FreeBSD, after demangling, "main" is turned into "unsigned
long", which does not make sense.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-01-22 16:14:56 +08:00
Yan, Zheng
fb0bb07b2f mds: don't modify inode that is not projected
In the slave rename prep case (rename inode to different auth mds), the
rename inode is not projected. CDir::check_rstat() gets confused if
MDCache::_project_rstat_inode_to_frag() updates inode's accounted rstat
in that case.

Fixes: http://tracker.ceph.com/issues/16768
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
2017-01-22 14:52:32 +08:00
Xie Xingguo
24413051d6 Merge pull request #13051 from chuanhong-wang/dev_conf_clean
common: delete unused conf "filestore_debug_disable_sharded_check"

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-01-22 13:35:50 +08:00
chuanhong.wang
57c1542ed4 common: delete unused conf "filestore_debug_disable_sharded_check"
Signed-off-by: Chuanhong Wang <chuanhong.wang@163.com>
2017-01-22 12:23:40 +08:00
Mingxin Liu
0de7ac79b5 test: cannot create pool snap on tier
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2017-01-22 01:26:43 +08:00
Mingxin Liu
4ea68a4bf3 OSDMonitor: make pool snaps on cache tier should be not allowed
Signed-off-by: Mingxin Liu <mingxin@xsky.com>
2017-01-22 01:26:34 +08:00
Mykola Golub
11dce465f0 Merge pull request #13042 from dillaman/wip-librbd-compile-warning
librbd: fixed initializer list ordering

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-01-21 17:52:42 +02:00
Jason Dillaman
0f21ceef83 journal: don't hold future lock during assignment
It's possible that the future raced with its owner and reaches
an empty reference count. This was resulting in the future being
destructed while its lock was still held.

Fixes: http://tracker.ceph.com/issues/18618
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-01-21 09:48:14 -05:00
Jason Dillaman
4da2326252 librbd: fixed initializer list ordering
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2017-01-21 09:17:36 -05:00
Venky Shankar
ac4e6cc2b6 test / librbd: create few empty objects during flatten
Fixes: http://tracker.ceph.com/issues/15028
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2017-01-21 16:29:27 +05:30
Venky Shankar
8419036659 test / librbd: Write ones instead of zeroes to test images
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2017-01-21 16:29:27 +05:30
Venky Shankar
c455711c2f librbd: Create few empty objects during copyup
This is based out of Doug's (@fullerdj) work (PR #9329)
as an attempt to avoid creating empty objects when
flattening an image and otherwise whenever unnecessary.

This gives good optimization benefit when a parent image
is sparsely populated. Moreover, this change is required
for correct behavior when checking disk usage of a clone
(which used to report fully allocated image due to all,
including empty objects being created during flatten).

Signed-off-by: Douglas Fuller dfuller@redhat.com
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2017-01-21 16:29:27 +05:30
Venky Shankar
ad0dcff47f librbd: make has_parent() prone to callers from copyup
This is required when CopyupRequest would need to invoke
pre_object_map_update() as part of upcoming changes to
create fewer child image objects whenever possible.

CopyupRequest constructor accepts image extents as an
rvalue forcing the caller to transfer ownership to it
and leaving the original variable in an unspecified
stated making has_parent() return incorrect state when
invoked from CopyupRequest. Therefore, introduce a
private tracking state that can be used in place of
checking emptiness of parent image extents.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
2017-01-21 16:29:27 +05:30
Sage Weil
1f150f8a52 PendingReleaseNotes: mention old clients vs new OSDs
Signed-off-by: Sage Weil <sage@redhat.com>
2017-01-20 17:52:18 -05:00
Sage Weil
2d9cfadf71 rados: use bare omap_get_keys op
This handles the client-side looping on 'more' if the OSD limits
the response size.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-01-20 17:52:18 -05:00
Sage Weil
faec324f64 ceph_test_rados: pass nullptr for pmore for omap fetch
Assume OSD limits are hugh enough.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-01-20 17:52:18 -05:00
Sage Weil
35671cedb2 rados: omap bench: pass null for pmore for omap fetch
Assume OSD limits are high enough for us.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-01-20 17:52:18 -05:00
Sage Weil
b9f4194306 ceph_test_rados_*: use new omap methods
Make these tests pass nullptr for pmore.  This codifies our
assumption that the OSD limits are high enough.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-01-20 17:52:18 -05:00
Sage Weil
fbebd83537 librados: add omap_get_{keys,vals}2 with pmore output arg
Expose public methods that include a new output argument to indicate
whether there are more keys to fetch or not.

Mark the old interfaces deprecated.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-01-20 17:52:17 -05:00
Sage Weil
cfa6f7932e osdc/Objecter: infer ptruncated on old OSDs via max_entries
If we do not get an explicit 'more' value from the OSD, infer it by
checking whether we got the max requested entries.  On old OSDs, which
don't enforce a limit, this will work.  On new OSDs, we will get the
explicit result.

Signed-off-by: Sage Weil <sage@redhat.com>
2017-01-20 17:52:17 -05:00
Michal Koutný
4e1318f4dc rgw: Use decoded URI when verifying TempURL
Instead of calliing url_decode directly, we reuse s->decoded_uri that is
initialized in RGWREST::preprocess().

Fixes: http://tracker.ceph.com/issues/18590
Signed-off-by: Michal Koutný <mkoutny@suse.com>
2017-01-20 23:28:21 +01:00
Nathan Cutler
82704068ab doc: Michal Koutny affiliation
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2017-01-20 22:35:43 +01:00
Willem Jan Withagen
2c4010b331 PendingReleaseNotes: Specify the change in behaviour of assigning to public_netw
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2017-01-20 21:53:27 +01:00
Willem Jan Withagen
7cf7be726e common/pick_address.cc: Copy public_netw to cluset_netw if cluster empty
- When public network is set, but cluster network is not, then
   the cluster-bindings would be on 0.0.0.0 which could be unexpeted.

 In this commit we copy the public network into the cluster network
 to make sure that the cluster backend is not bound on 0.0.0.0
 Which could be consideren an insecure, or unexpected, action.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
2017-01-20 21:51:43 +01:00
David Zafman
8423bc4075 osd: Calculate degraded and misplaced more accurately
Calculate num_object_copies based on the larger of pool size,
up set size and acting set size.

Calculate num_objects_degraded as the difference between num_object_copies
and all copies found on acting set and backfilling up set OSDs.

Calculate num_objects_misplaced as all copies on acting set OSDs not in up set
less copies that have been backfilled to up set OSDs.

Fixes: http://tracker.ceph.com/issues/18619

Signed-off-by: David Zafman <dzafman@redhat.com>
2017-01-20 11:06:08 -08:00
Mykola Golub
af9152f34a Merge pull request #12991 from dillaman/wip-17447
librbd: avoid possible recursive lock when racing acquire lock

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-01-20 19:50:02 +02:00
Mykola Golub
709198ae02 Merge pull request #12982 from dillaman/wip-18524
librbd: remove unnecessary dependencies of ManagedLock

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
2017-01-20 19:49:36 +02:00
Sage Weil
4b7258a8ad Merge pull request #13010 from liewegas/wip-bluestore-allocator
os/bluestore: fix Allocator::allocate() int truncation

Reviewed-by: Igor Fedotov <ifedotov@mirantis.com>
Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2017-01-20 11:13:47 -06:00
Kefu Chai
d8e4a2c204 Merge pull request #12908 from tchaikov/wip-rocksdb
rocksdb: build with ppc64

Reviewed-by: Nathan Cutler <ncutler@suse.com>
2017-01-20 22:41:04 +08:00
John Spray
2d253c30d8 Merge pull request #12830 from renhwztetecs/renhw-wip-libcephfs-misc
libcephfs: cleanups

Reviewed-by: John Spray <john.spray@redhat.com>
2017-01-20 15:29:30 +01:00
John Spray
abb2608b6b Merge pull request #12994 from ukernel/wip-18487
mds: add authority check for delay dirfrag split

Reviewed-by: John Spray <john.spray@redhat.com>
2017-01-20 15:28:12 +01:00
Kefu Chai
90a1f752e8 cmake: remove unnecessary linkages
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-01-20 17:56:29 +08:00
Kefu Chai
7084b7f9b1 key_value_store: remove unneeded #include
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-01-20 17:56:29 +08:00
Kefu Chai
2c7958ff7a debian: remove xml2 from ceph-test's Depends
as we are not using any of the binaries offered by xml2. and ceph.spec
does not reference xml2 either.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-01-20 17:56:28 +08:00
Kefu Chai
4ea38df656 cmake: link ceph-{mds,mgr,mon,osd} against libcommon
add a static library named global-static, which does not link with
libceph-common. so the executables which does not link against
lib{rados,cephfs,rbd} can be linked against global-static instead if
they want to access the symbols previously available from libglobal.
and libglobal is now linked against libceph-common. and it is supposed
to be used by executables packaged by ceph-test. these exectuables can
safely depend on libceph-common offered by package of "librados2".

Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-01-20 17:56:28 +08:00
Kefu Chai
77a7a1ebb4 cmake: always build a static libceph-common
Signed-off-by: Kefu Chai <kchai@redhat.com>
2017-01-20 16:48:36 +08:00