]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
Merge branch 'wip-shraddhaag-crimson-cephadm-raw' of https://github.com/shraddhaag...
authorAdam King <adking@redhat.com>
Fri, 20 Feb 2026 01:01:11 +0000 (20:01 -0500)
committerAdam King <adking@redhat.com>
Fri, 20 Feb 2026 01:01:11 +0000 (20:01 -0500)
1  2 
src/pybind/mgr/cephadm/tests/test_cephadm.py
src/python-common/ceph/tests/test_drive_group.py

index 7507d2379766fc367d1d02ec7bc4d8bab6adbaa7,9bcc07be93a273ff91f7a899f73606e3475c17cf..528ec24880533f3ce5a98cb9132564e53601eaf1
@@@ -607,59 -607,11 +607,59 @@@ def test_raw_ceph_volume_command_4(test
      drive = drive_selection.DriveSelection(spec, spec.data_devices.paths)
      cmds = translate.to_ceph_volume(drive, []).run()
  
-     assert cmds[0] == 'raw prepare --bluestore --data /dev/sda --block.db /dev/sdd --block.wal /dev/sdg --crush-device-class hdd'
-     assert cmds[1] == 'raw prepare --bluestore --data /dev/sdb --block.db /dev/sdf --block.wal /dev/sdi --crush-device-class nvme'
-     assert cmds[2] == 'raw prepare --bluestore --data /dev/sdc --block.db /dev/sde --block.wal /dev/sdh --crush-device-class ssd'
+     assert cmds[0] == 'raw prepare --bluestore --data /dev/sda --block.db /dev/sdd --block.wal /dev/sdg --crush-device-class hdd --osd-type classic'
+     assert cmds[1] == 'raw prepare --bluestore --data /dev/sdb --block.db /dev/sdf --block.wal /dev/sdi --crush-device-class nvme --osd-type classic'
+     assert cmds[2] == 'raw prepare --bluestore --data /dev/sdc --block.db /dev/sde --block.wal /dev/sdh --crush-device-class ssd --osd-type classic'
  
  
 +def test_ceph_volume_command_seastore():
 +    spec = DriveGroupSpec(placement=PlacementSpec(host_pattern='*'),
 +                          service_id='foobar',
 +                          data_devices=DeviceSelection(all=True),
 +                          objectstore='seastore',
 +                          osd_type='crimson',
 +                          )
 +    spec.validate()
 +    inventory = _mk_inventory(_mk_device()*2)
 +    sel = drive_selection.DriveSelection(spec, inventory)
 +    cmds = translate.to_ceph_volume(sel, []).run()
 +    assert all(cmd == 'lvm batch --no-auto /dev/sda /dev/sdb --objectstore seastore --osd-type crimson --yes --no-systemd' for cmd in cmds), f'Expected {cmd} in {cmds}'
 +
 +
 +def test_drive_group_objectstore_invalid():
 +    spec = DriveGroupSpec(
 +        placement=PlacementSpec(host_pattern='*'),
 +        service_id='foobar',
 +        data_devices=DeviceSelection(all=True),
 +        objectstore='invalid',
 +    )
 +    with pytest.raises(DriveGroupValidationError, match='is not supported'):
 +        spec.validate()
 +
 +
 +def test_drive_group_seastore_requires_crimson():
 +    spec = DriveGroupSpec(
 +        placement=PlacementSpec(host_pattern='*'),
 +        service_id='foobar',
 +        data_devices=DeviceSelection(all=True),
 +        objectstore='seastore',
 +        osd_type='classic',
 +    )
 +    with pytest.raises(DriveGroupValidationError, match='seastore only supports osd type crimson'):
 +        spec.validate()
 +
 +
 +def test_drive_group_seastore_with_crimson_valid():
 +    spec = DriveGroupSpec(
 +        placement=PlacementSpec(host_pattern='*'),
 +        service_id='foobar',
 +        data_devices=DeviceSelection(all=True),
 +        objectstore='seastore',
 +        osd_type='crimson',
 +    )
 +    spec.validate()
 +
 +
  def test_drive_group_osd_type_invalid():
      spec = DriveGroupSpec(
          placement=PlacementSpec(host_pattern='*'),