[Spacewalk-list] Invalid entitlement when registering KVM guests

Michael Morgan mmorgan at dca.net
Tue Aug 30 17:40:20 UTC 2011


>  On the client side I get a simple "Internal Error" message when
>  running rhnreg_ks. Browsing through the traceback I see:
> 
> InternalError: -20287 : (invalid_entitlement) - The server can not be
> entitled to the specified level
> 

 Some more information and strangeness I came across. I have four KVM
hosts with the same profile. Registering guest VMs works on one of them
but the other three get the invalid_intitlement exception. I turned up
PostgreSQL logging and noticed a difference. All servers log the same
queries until the entries below.

The one working server logs the following then continues along happily:

LOG:  statement: select server_id, label from rhnServerEntitlementView where server_id = 1000010003
LOG:  statement: select server_id, label from rhnServerEntitlementView where server_id = 1000010124
LOG:  statement: SELECT rhn_entitlements.entitle_server(1000010124, E'enterprise_entitled')

The failing servers are trying a different entitlement and failing:

LOG:  statement: select server_id, label from rhnServerEntitlementView where server_id = 1000010103
LOG:  statement: select server_id, label from rhnServerEntitlementView where server_id = 1000010123
LOG:  statement: SELECT rhn_entitlements.entitle_server(1000010123, E'monitoring_entitled')
ERROR:  -20287 : (invalid_entitlement) - The server can not be entitled to the specified level
CONTEXT:  SQL statement "SELECT  rhn_exception.raise_exception ('invalid_entitlement')"
    PL/pgSQL function "entitle_server" line 49 at PERFORM
STATEMENT:  SELECT rhn_entitlements.entitle_server(1000010123, E'monitoring_entitled')
LOG:  statement: rollback to save_server
LOG:  statement: ROLLBACK

 The host server entitlements seem to match:

spaceschema=# select server_id, label from rhnServerEntitlementView where server_id = 1000010003;
 server_id  |            label             
------------+------------------------------
 1000010003 | enterprise_entitled
 1000010003 | provisioning_entitled
 1000010003 | monitoring_entitled
 1000010003 | virtualization_host_platform
(4 rows)

spaceschema=# select server_id, label from rhnServerEntitlementView where server_id = 1000010103;
 server_id  |            label             
------------+------------------------------
 1000010103 | enterprise_entitled
 1000010103 | provisioning_entitled
 1000010103 | monitoring_entitled
 1000010103 | virtualization_host_platform
(4 rows)

 So now I think I have found where it's going wrong but I have no idea
why this would be happening. Any suggestions would be appreciated.

-Mike




More information about the Spacewalk-list mailing list