Commit Graph

31 Commits

Author SHA1 Message Date
Ilya Dryomov
4fe245cc2f qa: update krbd tests for python3
There is no /usr/bin/python symlink in CentOS 8 even if python2 is
installed.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-12-02 21:13:19 +01:00
Ilya Dryomov
80528fcb6c qa: add krbd_get_features.t test
Run it together with krbd_blkroset.t.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-11-21 14:40:41 +01:00
Ilya Dryomov
366a369c8d qa: krbd_blkroset.t: update for read-only changes
If an image is mapped read-only, setting its partition(s) to read-write
via BLKROSET is no longer allowed.

Add read-only OSD caps test cases.

Fixes: https://tracker.ceph.com/issues/42915
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-11-20 19:53:23 +01:00
Ilya Dryomov
286bdbfe24 krbd: modprobe before calling build_map_buf()
Otherwise add_key() in set_kernel_secret() fails as if running against
an ancient kernel and we fall back to secret= in options for the first
image being mapped on the machine.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-10-17 16:52:43 +02:00
Ilya Dryomov
7bbd290de3
Merge pull request #30502 from idryomov/wip-krbd-avoid-hexdump-s
qa: avoid hexdump skip and length options

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2019-09-21 11:12:28 +02:00
Ilya Dryomov
d1b69136b0 qa: avoid hexdump skip and length options
On Debian-based distros, hexdump(1) comes from FreeBSD in bsdmainutils
package (other distros ship a Linux version from util-linux).  It turns
out that '-s skip' for anything but a regular file has been broken for
ages in FreeBSD -- instead of calling fseek(), it consumed the input
byte by byte with getchar().  This was fixed in commit 7cd5ae492557
"hexdump(1): Speed up -s flag on devices" last year, but it hasn't made
it to the Debian world yet.

bsdmainutils_9.0.6ubuntu3 in xenial had a custom patch for that, but
it's no longer there in bsdmainutils_11.1.2ubuntu1 in bionic.  hexdump
-s <large offset> is now a fancy infinite loop!

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-09-20 21:43:49 +02:00
Ilya Dryomov
a9ed8d3279 qa: avoid page cache for krbd discard round off tests
rbd rounds off and ignores discards that are smaller than alloc_size,
but the page cache is invalidated according to the original offset and
length, before calling into the driver.  For a 512~4193792 discard, all
pages except for the first will be invalidated, but the first page may
remain cached after being partially zeroed out.  This results in an
inconsistency when alloc_size != 512.  E.g. for 64k:

                0       512     4k      64k             4M
                |       |       |       |               |
  page cache:   xxxxxxxx00000000xxxxxxxx0000000000000000
       RADOS:   xxxxxxxxxxxxxxxxxxxxxxxx0000000000000000

Given that these tests asserts on-disk state, we need to read directly
from disk.  krbd_discard_512b.t and krbd_zeroout.t are fine -- there is
no rounding there.

Fixes: https://tracker.ceph.com/issues/41753
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-09-17 22:20:27 +02:00
Ilya Dryomov
f47e953420 qa: krbd_parent_overlap.t: fix read test
It turns out this test has not been triggering the right code path for
a while now (krbd_parent_overlap.t was added just over a year ago, but
the original test goes back a few years).

To do its job it needs an empty clone with the overlap set to somewhere
in the middle of an object.  The test relied on shrinking for this, but
shrinking no longer fits the bill because a copyup is now performed for
the object with the overlap -- we never go to the parent after that.

Let's size the parent so that it ends in the middle of an object and
then grow an empty clone instead.  Also, while reading from page cache
does seem to trigger a read that straddles the overlap, it's not very
reliable, so supplement it with a direct read.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-08-28 17:07:07 +02:00
Ilya Dryomov
a337cc58cd qa: add krbd_discard_granularity.t test
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-03-19 11:49:19 +01:00
Ilya Dryomov
481b6c2146 qa: update and rename krbd_discard_1b.t
Passing 1 for alloc_size is no longer allowed.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-03-18 19:17:44 +01:00
Ilya Dryomov
6892da1c0b qa: krbd deep-flatten test
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-03-08 18:14:37 +01:00
Ilya Dryomov
04f5b343f9 qa: update krbd tests for zeroout
Discard no longer guarantees zeroing, use BLKZEROOUT and "fallocate -z"
instead (blkdiscard(8) in xenial doesn't support -z).

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-02-03 10:57:07 +01:00
Ilya Dryomov
031bbea739 qa: krbd discard with alloc_size vs zeroout tests
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-02-02 18:33:32 +01:00
Ilya Dryomov
645252d732 qa: krbd_msgr_segments.t: filter lvcreate output
Some versions of lvm emit a log message

  Using default stripesize 64.00 KiB.

which fails the test.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2018-06-21 20:51:23 +02:00
Ilya Dryomov
8d8390ff95 qa: krbd whole-object-discard test
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2018-03-07 12:06:33 +01:00
Ilya Dryomov
c13d196256
Merge pull request #20721 from idryomov/wip-krbd-parent-overlap-test
qa: krbd parent-overlap test

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2018-03-05 18:39:35 +01:00
Ilya Dryomov
5224a218bb qa: krbd parent-overlap test
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2018-03-05 14:26:42 +01:00
Ilya Dryomov
392fab6919 qa: krbd msgr-segments test
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2018-03-05 11:51:08 +01:00
Ilya Dryomov
6828641e72 qa: krbd huge-image test
We've had multiple overflows in ceph_calc_file_object_mapping().
It wasn't being used by rbd, but it now is.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2018-03-02 19:41:11 +01:00
Ilya Dryomov
153af6b90a qa: krbd_blkroset.t: attempt discards in addition to writes
The block layer used to not enforce ioctl(BLKROSET) and set_disk_ro().
This has been fixed in 4.16-rc1.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2018-02-20 15:54:41 +01:00
Ilya Dryomov
2275381286 qa/suites/krbd: add krbd BLKROSET test
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2017-10-31 13:40:16 +01:00
Alan Somers
3aae5ca6fd scripts: fix bash path in shebangs
/bin/bash is a Linuxism.  Other operating systems install bash to
different paths.  Use /usr/bin/env in shebangs to find bash.

Signed-off-by: Alan Somers <asomers@gmail.com>
2017-07-27 13:24:26 -06:00
Sage Weil
3e9a936062 doc: more c* -> ceph-* renames
Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-22 16:18:37 -07:00
Sage Weil
6f8f140350 c* -> ceph-*
Hopefully I didn't miss too much...

Signed-off-by: Sage Weil <sage@newdream.net>
2011-09-22 15:08:25 -07:00
Colin Patrick McCabe
13e8507b73 auth: make g_conf.keyring a plain old string
Make g_conf.keyring a plain old string rather than an array of strings.
Don't do substitution using the user's HOME variable-- this could lead
to security holes for setuid processes.

Get rid of AuthMonitor::read_keyfile because there is already a Keyring
member function, Keyring::load, that does the same thing.

qa/rbd/common.sh: we can now use cconf to figure out what the keyring
is.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2011-01-02 12:19:35 -08:00
Colin Patrick McCabe
c846615d8b qa: rbd: small optimization to script
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-30 10:38:36 -08:00
Colin Patrick McCabe
634cca9530 qa: rbd: Update rbd test to use the new rbd sysfs
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-30 10:38:36 -08:00
Colin Patrick McCabe
323ac1a72d qa: rbd: disable automatic keyring discovery
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-30 10:38:36 -08:00
Colin Patrick McCabe
de8f021204 qa/rbd: minor fixes
* qa/rbd/common: create tempdir for script

* qa/rbd/common: try harder to find monhost (try "mon addr" and also
"mon.a addr")

* qa/rbd/rbd.sh: honor $mnt parameter

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
2010-12-29 15:36:22 -08:00
Yehuda Sadeh
10466c5263 qa: add rbd test 2010-10-28 15:49:21 -07:00
Yehuda Sadeh
b6ffdf18f2 qa: add basic rbd test 2010-10-28 14:32:06 -07:00