Description of problem: <sector_size> is equivalent to <phys_sector_size>. It should not be, <sector_size> is documented (see https://beaker-project.org/docs/_downloads/beaker-job.rng) to be the logical sector size, which is different from physical. In the web interface this is correct, querying Disk/SectorSize yields different results than Disk/PhysicalSectorSize. Version-Release number of selected component (if applicable): 24.5 Steps to Reproduce: 1. bkr system-list --xml-filter='<hostRequires><and><disk><sector_size op=">" value="512" /></disk></and></hostRequires>' 2. bkr system-list --xml-filter='<hostRequires><and><disk><phys_sector_size op=">" value="512" /></disk></and></hostRequires>' Actual results: the list is exactly identical and e.g. aarch64-7s-m1.ss.eng.rdu.redhat.com is in both, while it has Logical sector size = 512 bytes (check the web interface). Expected results: there are much fewer machines with logical sector size > 512 than with physical sector size > 512. Additional info: patch diff --git a/Server/bkr/server/needpropertyxml.py b/Server/bkr/server/needpropertyxml.py index 179711684..af233105b 100644 --- a/Server/bkr/server/needpropertyxml.py +++ b/Server/bkr/server/needpropertyxml.py @@ -1088,7 +1088,7 @@ def filter_disk(self): value = self.get_xml_attr('value', int, None) units = self.get_xml_attr('units', unicode, 'bytes') if value: - return getattr(Disk.phys_sector_size, op)( + return getattr(Disk.sector_size, op)( value * bytes_multiplier(units)) return None IntegrationTests/src/bkr/inttest/server/test_needpropertyxml.py also needs updating. It contains small_disk.disks[:] = [Disk(size=8000000000, sector_size=512, phys_sector_size=512)] big_disk = data_setup.create_system() big_disk.disks[:] = [Disk(size=2000000000000, sector_size=4096, phys_sector_size=4096)] two_disks = data_setup.create_system() two_disks.disks[:] = [ Disk(size=500000000000, sector_size=512, phys_sector_size=512), Disk(size=8000000000, sector_size=4096, phys_sector_size=4096)] it is not surprising that the bug was not discovered when the test uses disks with sector_size==phys_sector_size.
Pavel contributed a patch to fix this.
This has been released with Beaker 25.6. Release Notes: https://beaker-project.org/docs/whats-new/release-25.html#beaker-25-6