Skip to content

Commit

Permalink
Merge pull request #11411 from dachary/wip-17245-jewel
Browse files Browse the repository at this point in the history
jewel: tests: scsi_debug fails /dev/disk/by-partuuid

Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
Loic Dachary committed Oct 19, 2016
2 parents f8055a9 + d205b74 commit 7496388
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
29 changes: 29 additions & 0 deletions qa/workunits/ceph-disk/60-ceph-by-partuuid.rules
@@ -0,0 +1,29 @@
#
# Make sure /dev/disk/by-partuuid is populated
#

# forward scsi device event to corresponding block device
ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change"

ACTION=="remove", GOTO="persistent_storage_end_two"

SUBSYSTEM!="block", GOTO="persistent_storage_end_two"

# skip rules for inappropriate block devices
KERNEL=="fd*|mtd*|nbd*|gnbd*|btibm*|md*", GOTO="persistent_storage_end_two"

# ignore partitions that span the entire disk
TEST=="whole_disk", GOTO="persistent_storage_end_two"

# for partitions import parent information
ENV{DEVTYPE}=="partition", IMPORT{parent}="ID_*"

# skip unpartitioned removable media devices from drivers which do not send "change" events
ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end_two"

# probe filesystem metadata of disks
KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"

ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_UUID}=="?*", SYMLINK+="disk/by-partuuid/$env{ID_PART_ENTRY_UUID}"

LABEL="persistent_storage_end_two"
4 changes: 4 additions & 0 deletions qa/workunits/ceph-disk/ceph-disk.sh
Expand Up @@ -20,6 +20,9 @@ fi
sudo ceph osd crush rm osd.0 || true
sudo ceph osd crush rm osd.1 || true

sudo cp $(dirname $0)/60-ceph-by-partuuid.rules /lib/udev/rules.d
sudo udevadm control --reload

perl -pi -e 's|pid file.*|pid file = /var/run/ceph/\$cluster-\$name.pid|' /etc/ceph/ceph.conf

PATH=$(dirname $0):$(dirname $0)/..:$PATH
Expand All @@ -32,6 +35,7 @@ fi
sudo env PATH=$(dirname $0):$(dirname $0)/..:$PATH py.test -s -v $(dirname $0)/ceph-disk-test.py
result=$?

sudo rm -f /lib/udev/rules.d/60-ceph-by-partuuid.rules
# own whatever was created as a side effect of the py.test run
# so that it can successfully be removed later on by a non privileged
# process
Expand Down

0 comments on commit 7496388

Please sign in to comment.