Description of problem:
There are cases during auto-attach, during pool prioritization, that the sockets (or cores, or RAM) attribute can have a higher impact than the support_level attribute (or usage, or other syspurpose attributes too). The syspurpose attributes (usage, support_level, roles, addons), should always have a higher impact than the sockets, cores and ram attributes on pool prioritization during auto-attach.
Version-Release number of selected component (if applicable):
All current versions of candlepin that support the syspurpose feature (2.3.11, 2.5.8, master).
Steps to Reproduce:
1. Have a system with an installed product 'my_product', the support_level_agreement syspurpose attribute is set to 'mysla', and its cpu.cpu_socket fact has value 1.
2. The server has subscriptions 'pool1' and 'pool2' that both can cover 'my_product'.
3. pool1 provides the support_level 'mysla', and covers 2 sockets.
4. pool2 has no support_level and no socket attributes specified.
5. Run an auto-attach.
The pool 'pool2' was attached, due to the fact that pool1's socket mismatch (2 vs 1) swayed its priority downwards more than how much its support_level match did upwards.
The pool 'pool1' should be attached, because it covers the system's product AND support_level, while any socket match/mismatch should have no effect here.
The Steps to Reproduce were not accurate on the description.
In order to reproduce the problem, pool1 must also provide a role and a usage (which the system has not specified), in addition to the sla and sockets.