mirror of https://github.com/ceph/ceph-ansible.git
test: add test for device with 'by-path'
We now test devices to be passed like: /dev/disk/by-path/pci-0000:00:01.1-ata-1.0 Signed-off-by: Sébastien Han <seb@redhat.com>pull/1956/head
parent
30ce781c79
commit
39ee25637b
|
@ -71,7 +71,11 @@ def node(host, request):
|
|||
osd_ids = cmd.stdout.rstrip("\n").split("\n")
|
||||
osds = osd_ids
|
||||
if docker:
|
||||
osds = [device.split("/")[-1] for device in ansible_vars.get("devices", [])]
|
||||
osds = []
|
||||
for device in ansible_vars.get("devices", []):
|
||||
real_dev = host.run("sudo readlink -f %s" % device)
|
||||
real_dev_split = real_dev.stdout.split("/")[-1]
|
||||
osds.append(real_dev_split)
|
||||
|
||||
data = dict(
|
||||
address=address,
|
||||
|
|
|
@ -10,7 +10,7 @@ cluster_network: "192.168.2.0/24"
|
|||
journal_size: 100
|
||||
osd_objectstore: "bluestore"
|
||||
devices:
|
||||
- '/dev/sda'
|
||||
- '/dev/disk/by-path/pci-0000:00:01.1-ata-1.0'
|
||||
- '/dev/sdb'
|
||||
dedicated_devices:
|
||||
- '/dev/sdc'
|
||||
|
|
|
@ -11,7 +11,7 @@ osd_scenario: non-collocated
|
|||
dmcrypt: true
|
||||
osd_objectstore: "bluestore"
|
||||
devices:
|
||||
- '/dev/sda'
|
||||
- '/dev/disk/by-path/pci-0000:00:01.1-ata-1.0'
|
||||
- '/dev/sdb'
|
||||
dedicated_devices:
|
||||
- '/dev/sdc'
|
||||
|
|
|
@ -11,7 +11,7 @@ osd_scenario: collocated
|
|||
dmcrypt: true
|
||||
osd_objectstore: bluestore
|
||||
devices:
|
||||
- '/dev/sda'
|
||||
- '/dev/disk/by-path/pci-0000:00:01.1-ata-1.0'
|
||||
- '/dev/sdb'
|
||||
os_tuning_params:
|
||||
- { name: kernel.pid_max, value: 4194303 }
|
||||
|
|
|
@ -11,7 +11,7 @@ osd_scenario: collocated
|
|||
dmcrypt: true
|
||||
osd_objectstore: bluestore
|
||||
devices:
|
||||
- '/dev/sda'
|
||||
- '/dev/disk/by-path/pci-0000:00:01.1-ata-1.0'
|
||||
- '/dev/sdb'
|
||||
os_tuning_params:
|
||||
- { name: kernel.pid_max, value: 4194303 }
|
||||
|
|
|
@ -16,7 +16,7 @@ ceph_rgw_civetweb_port: 8080
|
|||
osd_scenario: non-collocated
|
||||
osd_objectstore: bluestore
|
||||
devices:
|
||||
- /dev/sda
|
||||
- '/dev/disk/by-path/pci-0000:00:01.1-ata-1.0'
|
||||
- /dev/sdb
|
||||
dedicated_devices:
|
||||
- /dev/sdc
|
||||
|
|
|
@ -9,7 +9,7 @@ public_network: "192.168.3.0/24"
|
|||
cluster_network: "192.168.4.0/24"
|
||||
journal_size: 100
|
||||
devices:
|
||||
- '/dev/sda'
|
||||
- '/dev/disk/by-path/pci-0000:00:01.1-ata-1.0'
|
||||
- '/dev/sdb'
|
||||
osd_scenario: collocated
|
||||
osd_objectstore: "bluestore"
|
||||
|
|
|
@ -9,7 +9,7 @@ journal_size: 100
|
|||
radosgw_interface: eth1
|
||||
osd_objectstore: filestore
|
||||
devices:
|
||||
- '/dev/sda'
|
||||
- '/dev/disk/by-path/pci-0000:00:01.1-ata-1.0'
|
||||
- '/dev/sdb'
|
||||
dedicated_devices:
|
||||
- '/dev/sdc'
|
||||
|
|
|
@ -11,7 +11,7 @@ osd_scenario: non-collocated
|
|||
dmcrypt: true
|
||||
osd_objectstore: filestore
|
||||
devices:
|
||||
- '/dev/sda'
|
||||
- '/dev/disk/by-path/pci-0000:00:01.1-ata-1.0'
|
||||
- '/dev/sdb'
|
||||
dedicated_devices:
|
||||
- '/dev/sdc'
|
||||
|
|
|
@ -11,7 +11,7 @@ osd_scenario: collocated
|
|||
osd_objectstore: filestore
|
||||
dmcrypt: true
|
||||
devices:
|
||||
- '/dev/sda'
|
||||
- '/dev/disk/by-path/pci-0000:00:01.1-ata-1.0'
|
||||
- '/dev/sdb'
|
||||
os_tuning_params:
|
||||
- { name: kernel.pid_max, value: 4194303 }
|
||||
|
|
|
@ -17,6 +17,6 @@ osd_objectstore: filestore
|
|||
dmcrypt: true
|
||||
ceph_rgw_civetweb_port: 8080
|
||||
devices:
|
||||
- /dev/sda
|
||||
- '/dev/disk/by-path/pci-0000:00:01.1-ata-1.0'
|
||||
- /dev/sdb
|
||||
ceph_osd_docker_prepare_env: -e OSD_JOURNAL_SIZE={{ journal_size }} -e OSD_FORCE_ZAP=1
|
||||
|
|
|
@ -16,7 +16,7 @@ ceph_rgw_civetweb_port: 8080
|
|||
osd_objectstore: filestore
|
||||
osd_scenario: non-collocated
|
||||
devices:
|
||||
- /dev/sda
|
||||
- '/dev/disk/by-path/pci-0000:00:01.1-ata-1.0'
|
||||
- /dev/sdb
|
||||
dedicated_devices:
|
||||
- /dev/sdc
|
||||
|
|
|
@ -17,7 +17,7 @@ ceph_rgw_civetweb_port: 8080
|
|||
osd_objectstore: filestore
|
||||
ceph_osd_docker_prepare_env: -e OSD_JOURNAL_SIZE={{ journal_size }} -e OSD_FORCE_ZAP=1
|
||||
devices:
|
||||
- /dev/sda
|
||||
- '/dev/disk/by-path/pci-0000:00:01.1-ata-1.0'
|
||||
- /dev/sdb
|
||||
ceph_osd_docker_run_script_path: /var/tmp
|
||||
rgw_override_bucket_index_max_shards: 16
|
||||
|
|
|
@ -10,7 +10,7 @@ radosgw_interface: eth1
|
|||
journal_size: 100
|
||||
osd_objectstore: filestore
|
||||
devices:
|
||||
- '/dev/sda'
|
||||
- '/dev/disk/by-path/pci-0000:00:01.1-ata-1.0'
|
||||
- '/dev/sdb'
|
||||
osd_scenario: collocated
|
||||
os_tuning_params:
|
||||
|
|
|
@ -7,4 +7,4 @@ class TestOSD(object):
|
|||
if osd_auto_discovery:
|
||||
node["vars"]["devices"] = ["/dev/sda", "/dev/sdb", "/dev/sdc"] # Hardcoded since we can't retrieve the devices list generated during playbook run
|
||||
for device in node["vars"]["devices"]:
|
||||
assert host.check_output("sudo blkid -s PARTLABEL -o value %s2" % device) in ["ceph journal", "ceph block"]
|
||||
assert host.check_output("sudo blkid -s PARTLABEL -o value $(readlink -f %s)2" % device) in ["ceph journal", "ceph block"]
|
||||
|
|
|
@ -9,7 +9,7 @@ monitor_interface: eth1
|
|||
radosgw_interface: eth1
|
||||
journal_size: 100
|
||||
devices:
|
||||
- '/dev/sda'
|
||||
- '/dev/disk/by-path/pci-0000:00:01.1-ata-1.0'
|
||||
- '/dev/sdb'
|
||||
dedicated_devices:
|
||||
- '/dev/sdc'
|
||||
|
|
Loading…
Reference in New Issue