Description of problem: Typo in XmlCpuSpeed class (bkr.server.needpropertyxml): value = self.get_xml_attr('value', int, None) where 'int' should be float. mysql> describe cpu speed; +-------+-------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+-------+------+-----+---------+-------+ | speed | float | YES | | NULL | | +-------+-------+------+-----+---------+-------+ Traceback while using float value in cpu speed filtering: Traceback (most recent call last): File "/root/devel/beaker/IntegrationTests/src/bkr/inttest/server/test_model.py", line 53, in test_cpu_speed """)) File "/root/devel/beaker/Server/bkr/server/model.py", line 3056, in systems_filter systems = apply_system_filter(filter, systems) File "/root/devel/beaker/Server/bkr/server/needpropertyxml.py", line 907, in apply_system_filter (query, clause) = child.filter(query) File "/root/devel/beaker/Server/bkr/server/needpropertyxml.py", line 105, in filter (joins, query) = child.filter(joins) File "/root/devel/beaker/Server/bkr/server/needpropertyxml.py", line 667, in filter value = self.get_xml_attr('value', int, None) File "/root/devel/beaker/Server/bkr/server/needpropertyxml.py", line 81, in get_xml_attr return typeCast(attributes[attr]) ValueError: invalid literal for int() with base 10: '1500.0' Version-Release number of selected component (if applicable): beaker-0.10 How reproducible: 100% Steps to Reproduce: 1. submit a job with float value of cpu speed in hostRequires, like <hostRequires> <cpu> <speed value="1500.0"/> </cpu> </hostRequires> Actual results: error message: Failed to import job because of: "Error in hostRequires: invalid literal for int() with base 10: '1500.0'" Expected results: float value in cpu speed filtering should work. Additional info:
patch post: http://gerrit.beaker-project.org/1534
Verified that <hostRequires> <system_type value="Machine"/> <cpu> <speed op=">=" value="1198.5"/> </cpu> </hostRequires> includes a system with CPU speed 1199.0 and that <hostRequires> <system_type value="Machine"/> <cpu> <speed op=">=" value="1199.5"/> </cpu> </hostRequires> excludes it.
Beaker 0.11.0 has been released.