Commit Graph

50096 Commits

Author SHA1 Message Date
Sage Weil
6aa9a4735a Merge pull request #7677 from xiexingguo/xxg-wip-14786
osd: fix fusestore hanging during stop/quit

Reviewed-by: Sage Weil <sage@redhat.com>
2016-02-24 10:39:27 -08:00
Sage Weil
4229cd436d Merge pull request #7680 from ceph/wip-da-SCA-20160203
common: various fixes from SCA runs

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Jason Dillaman <jdillama@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2016-02-24 10:38:06 -08:00
Sage Weil
b3141ce1d0 Merge pull request #7681 from jjhuo/kstore-updates
osd: kstore: sync up kstore with recent bluestore updates

Reviewed-by: Sage Weil <sage@redhat.com>
2016-02-24 10:37:13 -08:00
Jason Dillaman
8ff1a8df1c Merge pull request #7759 from trociny/wip-rbd-mirror-image-replayer-improvements
rbd-mirror: ImageReplayer improvements

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-02-24 11:40:43 -05:00
Jason Dillaman
53d87e1775 Merge pull request #7736 from trociny/fix-librbd-asok-empty-name
librbd: retrieve image name when opening by id

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-02-24 11:07:22 -05:00
Jason Dillaman
f0e428ad45 Merge pull request #7620 from jdurgin/wip-14419
cls_rbd: mirroring directory

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-02-24 10:35:28 -05:00
Josh Durgin
28e2d1bc55 cls_rbd: add methods for keeping track of mirrored images
These will track whether local images should be mirrored, and map them
to a unique global id. There's a state field for safely disabling
mirroring while operating on multiple objects.

Fixes: #14419
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2016-02-24 10:34:28 -05:00
Josh Durgin
da9b36a70d librbd: rename rbd_pool_settings object to rbd_mirroring
We'll use this object only for mirroring-related purposes, not generic
settings on a pool.

Refs: #14419
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2016-02-24 10:34:28 -05:00
Loic Dachary
894b3b7cf4 Merge pull request #7762 from ErwanAliasr1/evelu-check
Improving 'make check' for ceph-disk

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2016-02-24 21:42:02 +07:00
Mykola Golub
5360d8612d librbd: init asok_hook on open so name is always known
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-02-24 16:28:05 +02:00
Mykola Golub
80656b1131 librbd: get image name on open if it is opened by id
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-02-24 16:28:05 +02:00
Kefu Chai
1ee8c13f9c Merge pull request #7743 from JiYou/open-test-for-bug-2339
test: enable test for bug #2339 which has been resolved.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-02-24 21:57:05 +08:00
Haomai Wang
281b1e37bb Merge pull request #7773 from roidayan/xio_remove_redundant_magic_methods
xio: remove redundant magic methods

Reviewed-by: Haomai Wang<haomai@xsky.com>
2016-02-24 21:49:21 +08:00
Jason Dillaman
5c5ca11b74 Merge pull request #7771 from xiexingguo/xxg-wip-fixawatch
librados: do not clear handle for aio_watch()

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-02-24 08:35:06 -05:00
Roi Dayan
af12582b35 xio: remove redundant magic methods
The same methods are inherited from Messenger.

Signed-off-by: Roi Dayan <roid@mellanox.com>
2016-02-24 14:00:59 +02:00
xie xingguo
3cfb83d1d5 librados: remove unused local variables
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-02-24 16:59:33 +08:00
xie xingguo
8caa2e455c librados: do not clear handle for aio_watch()
which is needed for aio_unwatch() to work.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
2016-02-24 16:56:23 +08:00
Erwan Velu
48af4bec8b tests/ceph-disk: Let teardown clearing data
When running the ceph-disk check suite, 'test_mark_init' & 'test_activate_dir' had a
permission denied of the freshly created stuff like in :

tests/ceph-disk.sh:237: test_mark_init:  /bin/rm -fr /ceph/src/ceph-disk/test-ceph-disk/dir
/bin/rm: cannot remove « /ceph/src/ceph-disk/test-ceph-disk/dir/snap_1 »: Permission denied
/bin/rm: cannot remove « /ceph/src/ceph-disk/test-ceph-disk/dir/current »: Permission denied
/bin/rm: cannot remove « /ceph/src/ceph-disk/test-ceph-disk/dir/snap_2 »: Permission denied

Those two tests are starting a mon with run_mon.
Trying to delete the files while the daemon are still alive is impossible.
This patch removes the explicit 'rm' and let the teardown doing the cleaning
stuff by stopping daemons & cleaning content.

By using this patch, make check is now sucessful on ceph-disk.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-02-24 09:56:01 +01:00
Erwan Velu
57f31e9536 tests/ceph-disk: Using dummy device mappers
When doing a make test, if your local setup was running a "dm-0" or "dm-1",
the make check was failing.

The detection of the local "dm-x" were leading to a wrong comparaison with
the expected simulated values.

The fix is using a dummy name for that "dm" to prevent any collision with the local setup.

Prior that patch, a typical output of that error looked like :

>               assert expect == main.list_devices()
E               assert [{'partitions...: '/dev/Xda'}] == [{'partitions'...: '/dev/Xda'}]
E                 At index 0 diff: {'partitions': [{'dmcrypt': {'holders': ['dm-0'], 'type': 'plain'}, 'ptype': '4fbd7e29-9d25-41b8-afd0-5ec00ceff05d', 'path': '/dev/Xda1', 'is_partition': True, 'mount': None, 'uuid': '56244cf5-83ef-4984-888a-2d8b8e0e04b2', 'type': 'data', 'state': 'unprepared', 'fs_type': None}], 'path': '/dev/Xda'} != {'partitions': [{'ptype': '4fbd7e29-9d25-41b8-afd0-5ec00ceff05d', 'whoami': None, 'path': '/dev/Xda1', 'is_partition': True, 'mount': '/var/cache/ccache', 'uuid': '56244cf5-83ef-4984-888a-2d8b8e0e04b2', 'ceph_fsid': None, 'fs_type': 'btrfs', 'dmcrypt': {'holders': ['dm-0'], 'type': 'plain'}, 'type': 'data', 'state': 'active'}], 'path': '/dev/Xda'}
E                 Full diff:
E                 - [{'partitions': [{'dmcrypt': {'holders': ['dm-0'], 'type': 'plain'},
E                 + [{'partitions': [{'ceph_fsid': None,
E                 +                   'dmcrypt': {'holders': ['dm-0'], 'type': 'plain'},
E                 -                   'fs_type': None,
E                 ?                              ^^^^
E                 +                   'fs_type': 'btrfs',
E                 ?                              ^^^^^^^
E                 'is_partition': True,
E                 -                   'mount': None,
E                 +                   'mount': '/var/cache/ccache',
E                 'path': '/dev/Xda1',
E                 'ptype': '4fbd7e29-9d25-41b8-afd0-5ec00ceff05d',
E                 -                   'state': 'unprepared',
E                 ?                             ^^^^ -----
E                 +                   'state': 'active',
E                 ?                             ^^^^^
E                 'type': 'data',
E                 -                   'uuid': '56244cf5-83ef-4984-888a-2d8b8e0e04b2'}],
E                 ?                                                                 --
E                 +                   'uuid': '56244cf5-83ef-4984-888a-2d8b8e0e04b2',
E                 +                   'whoami': None}],
E                 'path': '/dev/Xda'}]

tests/test_main.py:342: AssertionError

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-02-24 09:55:57 +01:00
Erwan Velu
ba05b7e700 tests/ceph-disk: Creating missing working dir
When running run-tox.sh in a very simple env,
the test will fail if '/var/lib/ceph/tmp' doesn't exist.

This patch adds a check to create this directory if required as mkdtemp doesn't do it for you.

Prior this patch, the following behavior was seen :

tests/test_main.py:342:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
ceph_disk/main.py:3753: in list_devices
    fstype=fs_type, options='')
ceph_disk/main.py:1217: in mount
    dir=STATEDIR + '/tmp',
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

suffix = '', prefix = 'mnt.', dir = '/var/lib/ceph/tmp'

    def mkdtemp(suffix="", prefix=template, dir=None):
        """User-callable function to create and return a unique temporary
        directory.  The return value is the pathname of the directory.

        Arguments are as for mkstemp, except that the 'text' argument is
        not accepted.

        The directory is readable, writable, and searchable only by the
        creating user.

        Caller is responsible for deleting the directory when done with it.
        """

        if dir is None:
            dir = gettempdir()

        names = _get_candidate_names()

        for seq in xrange(TMP_MAX):
            name = names.next()
            file = _os.path.join(dir, prefix + name + suffix)
            try:
>               _os.mkdir(file, 0700)
E               OSError: [Errno 2] No such file or directory: '/var/lib/ceph/tmp/mnt.KoAV85'

/usr/lib64/python2.7/tempfile.py:333: OSError

Signed-off-by: Erwan Velu <erwan@redhat.com>
2016-02-24 09:55:46 +01:00
Jason Dillaman
dc5a9053ce Merge pull request #7649 from yuyuyu101/wip-async-watch
librados: implement async watch/unwatch

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-02-23 23:41:03 -05:00
You Ji
f59c872d4c test: enable test for bug #2339 which has been resolved.
Signed-off-by: You Ji <jiyou09@gmail.com>
2016-02-23 20:36:37 -07:00
Josh Durgin
0b56c5e550 Merge pull request #7761 from dillaman/wip-14847
librbd: fix state machine race conditions during shut down

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2016-02-23 18:07:12 -08:00
Haomai Wang
7109de7b80 RadosClient: call watch_flush before finisher stop
Signed-off-by: Haomai Wang <haomai@xsky.com>
2016-02-24 09:29:05 +08:00
Mykola Golub
e688a44e35 cls_rbd: async version of dir_get_name
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-02-23 22:23:21 +02:00
Yehuda Sadeh
635ae88a19 Merge pull request #7632 from zaitcev/cleanup-dead-code-3
rgw: Drop unused usage_exit from rgw_admin.cc

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
2016-02-23 11:44:50 -08:00
Yehuda Sadeh
06681eddc9 Merge pull request #7285 from magicrobotmonkey/patch-1
Increase verbosity level on RGWObjManifest line

Reviewed-by: Yehuda Saeh <yehuda@redhat.com>
2016-02-23 11:25:38 -08:00
Yehuda Sadeh
a6538d40f9 Merge pull request #7618 from zaitcev/wip-5073-subuser-bis
rgw: Fix subuser harder with tenants

Reviewed-y: Yehuda Sadeh <yehuda@redhat.com>
2016-02-23 11:23:16 -08:00
Sage Weil
933ae4ca9e Merge pull request #7763 from dachary/wip-releases
doc: fix 0.94.4 and 0.94.5 ordering
2016-02-23 13:18:00 -05:00
Jason Dillaman
a1a0e96c3d Merge pull request #7364 from javenwu/master
common: default cluster name to config file prefix

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-02-23 13:17:52 -05:00
Jason Dillaman
89878e8f2d Merge pull request #7548 from yuyuyu101/librbd-avoid-memcpy
librbd: reduce mem copies to user-buffer during read

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-02-23 13:15:29 -05:00
Jason Dillaman
76dc44713d Merge pull request #7667 from jdurgin/wip-14780
Revert "librbd: use task finisher per CephContext"

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2016-02-23 13:14:23 -05:00
Haomai Wang
7b3334ac68 Merge pull request #7625 from branch-predictor/bp-async-more
msg/async: smarter MSG_MORE

Reviewed-by: Haomai Wang <haomai@xsky.com>
2016-02-24 01:30:34 +08:00
Loic Dachary
dafe0d9773 doc: fix 0.94.4 and 0.94.5 ordering
Signed-off-by: Loic Dachary <loic@dachary.org>
2016-02-24 00:13:53 +07:00
Casey Bodley
479366a584 Merge pull request #7760 from theanalyst/fix/rgw-fcgi-build
rgw: fcgi should include acconfig
2016-02-23 11:02:03 -05:00
Jason Dillaman
e67099d036 librbd: deterministically unblock writes on snap set
Previously this was handled in the state machine's destructor,
but that can lead to nondeterministic behavior due to interactions
between threads.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-02-23 10:59:09 -05:00
Jason Dillaman
514519a69f librbd: avoid close race-condition within ImageState
The lock was previously unlocked/locked to avoid lock cycles. This
creates an issue when closing the image because the another thread
might have already deleted the ImageState before the lock could be
re-locked.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2016-02-23 10:53:13 -05:00
Abhishek Lekshmanan
f3fc6b15fd rgw: fcgi should include acconfig
As it references FASTCGI_INCLUDE_DIR which is referenced from it

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
2016-02-23 16:39:06 +01:00
Sage Weil
c7c1d281db doc/release-notes: v0.94.6 final notes
Signed-off-by: Sage Weil <sage@redhat.com>
2016-02-23 10:35:34 -05:00
Sage Weil
de0be8af45 Merge pull request #7689 from dachary/wip-release-notes
release-notes: draft v0.94.6 release notes
2016-02-23 10:29:53 -05:00
Piotr Dałek
c5a6b6a5ae msg/async: cut the middle-man
Get rid of complete_bl and let messenger write directly to outcoming_bl of
a connection. Also, if message bufferlist is small enough, append its
contents to outcoming_bl directly, so we'll use less iovecs and in best
case, pack entire message (together with header and footer added in
write_message()) in single bufferptr.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
2016-02-23 15:52:42 +01:00
Haomai Wang
bd89343865 Merge pull request #7725 from ceph/wip-fix-async-valgrind
AsyncMessenger: fix valgrind leak
2016-02-23 22:19:34 +08:00
Kefu Chai
dd17b51367 Merge pull request #7758 from dachary/wip-ceph-disk-prepare-help
ceph-disk: fix prepare --help

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-02-23 21:11:18 +08:00
Loic Dachary
4a61793c5b ceph-disk: fix prepare --help
Signed-off-by: Loic Dachary <loic@dachary.org>
2016-02-23 18:56:07 +07:00
Kefu Chai
0ae120dbd0 Merge pull request #7756 from dachary/wip-ceph-disk-args
ceph-disk: deactivate / destroy PATH arg are optional

Reviewed-by: Kefu Chai <kchai@redhat.com>
2016-02-23 19:12:08 +08:00
Loic Dachary
ac241ab441 ceph-disk: deactivate / destroy PATH arg are optional
And the mandatory positional arguments need not be == 1, it is enough to
leave the nargs parameter out.

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-02-23 16:16:47 +07:00
Mykola Golub
103eee4d13 test: image_replay: use flush to speedup commit position update
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-02-23 09:25:53 +02:00
Mykola Golub
9572d27a52 rbd-mirror: add asok commands to get image replyer status and flush
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-02-23 09:25:45 +02:00
Mykola Golub
1a6dfa4621 rbd-mirror: store sync snapshot name in registered client
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-02-23 09:25:37 +02:00
Mykola Golub
79dcef2794 librbd: add field to MirrorPeerClientMeta to store snap name
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-02-23 09:25:31 +02:00