Description of problem: Using common sense (and also a little bit of Beaker XML description grammar [0]), the following three commands should behave precisely in the same way, i.e. list all the systems whose disks begin with "AIX": $ bkr list-systems --available --xml='<hostRequires><disk><model op="like" value="AIX%" /></disk></hostRequires>' $ bkr list-systems --available --xml='<hostRequires><disk><or><model op="like" value="AIX%" /></or></disk></hostRequires>' $ bkr list-systems --available --xml='<hostRequires><disk><and><model op="like" value="AIX%" /></and></disk></hostRequires>' In fact, only the first command does what it should. In the latter two cases, the whole <and>...</and>, resp. <or>...</or> block seems to have been completely ignored: $ bkr list-systems --available --xml='<hostRequires><disk><model op="like" value="AIX%" /></disk></hostRequires>' | wc -l 95 $ bkr list-systems --available --xml='<hostRequires><disk><and><model op="like" value="AIX%" /></and></disk></hostRequires>' | wc -l 624 $ bkr list-systems --available --xml='<hostRequires><disk><or><model op="like" value="AIX%" /></or></disk></hostRequires>' | wc -l 624 What's inside the <and>/<or> block doesn't matter; replacing <model> with <size> produced analogous results. On the other hand, the same does not hold for other tags in place of <disk>; for instance, the outputs of the following three commands were identical: $ bkr list-systems --available --xml='<hostRequires><cpu><model_name op="like" value="AMD%"/></cpu></hostRequires>' | wc -l 27 $ bkr list-systems --available --xml='<hostRequires><cpu><and><model_name op="like" value="AMD%"/></and></cpu></hostRequires>' | wc -l 27 $ bkr list-systems --available --xml='<hostRequires><cpu><or><model_name op="like" value="AMD%"/></or></cpu></hostRequires>' | wc -l 27 External links: [0] https://beaker-project.org/docs/_downloads/beaker-job.rng
I don't think we ever considered this scenario before (using <and/> and <or/> inside <disk/> and <cpu/>). It should be easy enough to implement.
(In reply to Dan Callaghan from comment #1) > I don't think we ever considered this scenario before (using <and/> and > <or/> inside <disk/> and <cpu/>). It should be easy enough to implement. We have this scenario in <cpu/> but not in <disk/>. On gerrit: http://gerrit.beaker-project.org/#/c/4208/
Verified steps: As shown in comment 0, use the following commands to check if logical operators are working inside <disk> hostrequires. $ bkr list-systems --available --xml='<hostRequires><disk><model op="like" value="Mega%" /></disk></hostRequires>' | wc -l 3 $ bkr list-systems --available --xml='<hostRequires><disk><and><model op="like" value="Mega%" /></and></disk></hostRequires>' | wc -l 3 $ bkr list-systems --available --xml='<hostRequires><disk><or><model op="like" value="Mega%" /></or></disk></hostRequires>' | wc -l 3
Beaker 20.2 has been released.