I created a maas tag with
$ maas-cli maas tags new name='5-disks' comment='A machine that has at least 5 hard disks' definition='count(//node[starts-with(@id,"disk") and @class="disk"]) >= 5'
But at least one node does not get tagged.
$ sudo lshw -xml > /tmp/lshw.xml
$ xmlstarlet sel -T -t -v 'count(//node[starts-with(@id,"disk") and @class="disk"]) >= 5' /tmp/lshw.xml
true
It looks like maas is out of sync with lshw output.
MAAS server is running Ubuntu 13.04, one of the nodes that work is 12.04.3 and one of the nodes that doesn't is 12.04.2. Re'deploying or re-provisioning may not be an option at this point, so I am not sure how to debug it.