Commit Graph

12 Commits

Author SHA1 Message Date
Mykola Golub
6a57358add rbd: unified way to map images using different drivers
Instead of "rbd map|unmap|showmapped", "rbd ndb map|unmap|list",
"rbd ggate map|unmap|list" commands, provide:

 rbd device -t krbd|nbd|ggate|... map|unmap|list

which gives interface consistent between drivers.

Signed-off-by: Mykola Golub <mgolub@suse.com>
2018-01-29 09:34:11 +02: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
Ilya Dryomov
6bddef8ecf qa: rbd: don't modprobe, chown sysfs files or udevadm settle
This is a followup to 38a572011d ("qa: rbd/map-snapshot-io.sh: don't
chown sysfs files") for the rest of the workunits:

- /sys/bus/rbd/add_single_major is used if present, so chown'ing
  /sys/bus/rbd/add doesn't help.  Use sudo on rbd map instead.

- Don't modprobe or udevadm settle - rbd CLI tool takes care of that.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2016-05-13 17:51:45 +02:00
Sage Weil
d423cf8c4f qa/workunits/rbd/kernel.sh: move modprobe up
Needs to happen before cleanup.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-08 09:58:16 -07:00
Sage Weil
54aa797acd qa/workunits/rbd/kernel.sh: modprobe rbd
Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-05 11:20:43 -07:00
Alex Elder
6bac8ac06c rbd/kernel.sh: quit looking for snapshot sysfs entries
The sysfs entries for snapshots went away a while ago, and this
script used them to verify sizes matched what was expected.

Instead, look at the mapped size of the snapshot in the places
that used to look for the image's snapshot sysfs files.

Also, switch over to using "udevadm settle" rather than a delay to
wait for udev to do its thing.  Insert them at more appropriate
places--right after "rmd map" commands and before and after the
"rbd unmap" calls.

Stop doing the manual refresh calls as well.  The osd will trigger
refreshes whenever the image size or shapshot context changes.

Finally, the cleanup routine is called initially, when there really
isn't expected to be anything to clean up.  Change the rbd commands
to run there conditionally, only if the target of the command
already exists.

Signed-off-by: Alex Elder <elder@inktank.com>
2013-05-30 18:38:53 -05:00
Sage Weil
fe9d326099 rbd: fix qa tests to use --allow-shrink
Fixes: #4763
Signed-off-by: Sage Weil <sage@inktank.com>
2013-04-19 14:37:21 -07:00
Dan Mick
37ffb278c8 qa scripts: Replace cut -f 1 with awk '{print $1;}'
This is to handle TextTable output, which doesn't use tabs

Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
2012-10-04 17:04:09 -07:00
Josh Durgin
b6c43d2aff rbd: add a command to delete all snapshots of an image
This makes deleting images with many snapshots easier.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2012-01-05 10:19:17 -08:00
Josh Durgin
8afa5a5d9e workunits: fix secret file and temp file removal for kernel rbd
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-12-06 14:20:31 -08:00
Josh Durgin
bcd26fca71 workunits: make rbd kernel workunit executable
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-12-06 13:36:51 -08:00
Josh Durgin
66b6b1bff8 workunits: add some tests for kernel rbd
This covers some snapshot and resize functions that aren't tested by fs benchmarks.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-12-06 10:31:17 -08:00