The procedure can_entitle_server does not check that max_members of a server group is greater than current_members, so if you have filled all of your entitlement slots and therefore cannot entitle another server, the procedure will still answer that you can. It seems that the solution here would be to add an AND clause to find_compatible_sg such that max_members > current_members. When executing something like this: if (rhn_entitlements.can_entitle_server) rhn_entitlements.entitle_server It is possible that you will get a stacktrace like this: ORA-20220: (servergroup_max_members) - Server group membership cannot exceed maximum membership ORA-06512: at "RHN.RHN_EXCEPTION", line 27 ORA-06512: at "RHN.RHN_SERVER", line 470 ORA-06512: at "RHN.RHN_ENTITLEMENTS", line 264 ORA-06512: at line 1
when i wrote can_entitle_server (at rnorwood's request) I wrote it so that it intentionally didn't check for available slots. Is there an actual bug in the UI right now? I don't see one. I setup an account with 1 system slot and registered 2 systems. The system entitlements page always seems to do the right thing. I would say, don't right code that uses the function incorrectly.
I guess I misjudged the purpose of this function then. There is a bug in some 'enable config management' wizardish code. I guess I don't understand why not check for available slots. In what case would you ask the question 'can entitle server for provisioning?' without wanting to check for available provisioning slots?
i have no idea. Robin asked for it when he was coding the system entitlements page, so that's how i wrote it. there may be ui elements on that page that make use of the "compatibility" server with a system slot, and not if you actually have slots left.
i would prefer not to change this procedure without knowing the implications on the backend code (i haven't looked to be honest). if there is code that assumes can_entitle_server is checking for available slots, please change it not to assume that.
This assumption is currently made in the SystemHandler.upgradeEntitlement xmlrpc api call and the wizardish enable config management code.
Passing on my config management bugs to ggainey
Moved from ON_DEV to ON_QA with push #6
Verified. Satellite-5.3.0-RHEL4-re20090529.0-x86_64 Enable Configuration Management Summary Configuration Management Enablement has been attempted on the following systems. To complete enablement on successful systems (indicated by the Status column below), perform the following two actions: 1. Run rhn_check to complete pending rhncfg-* package installs. 2. Run the following command: rhn-actions-control --enable-all 1 - 1 of 1 Status System Name Error Condition error xen84-5 Could not grant provisioning entitlement.
Verified with final 5.3.0 iso, same results as in previous comment. RELEASE_PENDING
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHEA-2009-1434.html