Bug 802688

Summary: registration on Solaris won't set Management entitlement when registering to PostgreSQL SW
Product: Red Hat Satellite 5 Reporter: Martin Minar <mminar>
Component: RegistrationAssignee: Jan Pazdziora <jpazdziora>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Minar <mminar>
Severity: medium Docs Contact:
Priority: medium    
Version: 550CC: cperry, jhutar, jpazdziora, mkoci, mmraka
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-backend-1.7.38-3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-10-02 10:53:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 818987, 819024    
Attachments:
Description Flags
Tomcat6 catalina.out part for ISE none

Description Martin Minar 2012-03-13 09:49:14 UTC
Created attachment 569615 [details]
Tomcat6 catalina.out part for ISE

Description of problem:
rhnreg_ks run on Solaris 10 will return Error Code: 31 - Service not enabled for system profile. System will not get Management entitlement and following attempt to set it via UI ends in ISE with database error.

Version-Release number of selected component (if applicable):
Solaris 10 client with latest rhn-solaris-bootstrap-5.4.1-7-sparc-sol10.tar.gz packages:
utility     RHATrhnc                     rhnclient 5.3.0
SW 1.7 PostgreSQL

How reproducible:
2 of 2

Steps to Reproduce:
1. Setup spacewalk with channel for solaris sparc
2. Create activation key 1-solaris
3. Prepare client - download certificate
4. Run: rhnreg_ks --serverUrl=https://<FQDN>/XMLRPC --sslCACert=/RHN-ORG-TRUSTED-SSL-CERT --activationkey=1-solaris --force
5. In webUI go into Systems > <FQDN> > Edit System Properties > set base entitlement to Management
  
Actual results:
Number 4 will end with:
Error code: -31
Error Message:
    Service not enabled for system profile: "<Client address>"
Error Class Code: 31
Error Class Info: 
     This system does not have a valid entitlement for Red Hat Network.
     Please visit https://<FQDN>/rhn/systems/SystemEntitlements.do
     or login at https://<FQDN>, and from the "Overview" tab,
     select "Subscription Management" to enable RHN service for this system.
Explanation: 
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.

Number 5 will end with ISE - catalina.out is added as attachement. Notable error is:
Caused by: org.postgresql.util.PSQLException: ERROR: -20287 : (invalid_entitlement) - The server can not be entitled to the specified level
  Where: SQL statement "SELECT  rhn_exception.raise_exception ('invalid_entitlement')"
PL/pgSQL function "entitle_server" line 49 at PERFORM


Expected results:
System is registered into channel with base entitlement Management.

Additional info:

Comment 3 Jan Pazdziora 2012-03-16 13:49:29 UTC
I could not reproduce the rhnreg_ks Service not enabled for system profile error message.

However, I've seen rhnreg_ks fail and traceback during the package refresh stage and I've fixed these in Spacewalk master, 
788ed1011b832297571ea5f41f37cb2797eb7f5d and b7d8b3172eb76cc3ed03f2adba43e5b8f00d8658.