Created attachment 1270716 [details] httpd error log Description of problem: In a quite specific situation registration of client could fail # rhnreg_ks --force --serverUrl=https://satellite-fqdn/XMLRPC --sslCACert=/usr/share/rhn/CERT-satellite --activationkey 9-0df21a937eca8263d6434b86a1e2fd6e rhn-plugin: Error communicating with server. The message was: Internal Server Error Server side traceback attached The conditions are: * registration to non-default organization using activation-key * client's RHEL version and ARCH are the same as Sat server's * client's default RHEL channel is synced no Sat server (--no-everything is good enough) * non-default organization has no software entitlements for client's default RHEL channel If you add software entitlements to organization, then the registration succeeds and client's system event history contains: Type Status Summary Time (n/a) Subscription via Token Tue Apr 11 05:08:33 EDT 2017 (n/a) added system entitlement Tue Apr 11 05:08:33 EDT 2017 (n/a) subscribed to channel channel-reg-test-channel-x86_64-label Tue Apr 11 05:08:33 EDT 2017 (n/a) unsubscribed from channel rhel-x86_64-server-6 Tue Apr 11 05:08:33 EDT 2017 (n/a) subscribed to channel rhel-x86_64-server-6 Tue Apr 11 05:08:33 EDT 2017 So it is registered to RHEL channel first and then switched to custom channel. Version-Release number of selected component (if applicable): spacewalk-java-2.5.14-70.el6sat.noarch spacewalk-backend-2.5.3-105.el6sat.noarch satellite-schema-5.8.0.25-1.el6sat.noarch How reproducible: always Steps to Reproduce: 1. register client to custom organization using activation key - see above Actual results: Internal Server Error Expected results: registration succeeds Additional info: could not reproduce on 5.7
spacewalk.git(master): b2e475fa333c309ef2f476fb38992ab897567668 caused by fix in BZ#1434471 in spacewalk.git(master): a3fab8dc969acea2a3c077b2e2e9a83d0bce8907
Verified on spacewalk-backend-2.5.3-131.el6sat.noarch satellite-schema-5.8.0.31-1.el6sat.noarch spacewalk-java-2.5.14-84.el6sat.noarch on both PG and Oracle backends using the reproducer from the initial report. Sample output from system's history: (n/a) Subscription via Token Wed May 17 05:07:34 EDT 2017 (n/a) added system entitlement Wed May 17 05:07:34 EDT 2017 (n/a) subscribed to channel channel-reg-test-channel-x86_64 Wed May 17 05:07:34 EDT 2017 Registration to a custom channel was successful, even with no sw entitlements assigned to the non-default org. VERIFIED