Description of problem: If activating a cert that would require systems to be converted from regular entitlements to flex entitlements, things will go badly if this will need to be done for both a channel family of a base channel and a channel family of a child channel of the same system. I.e. if System A is subscribed to rhel-server and rhn-tools, and both of these would need to be converted to flex in order for activation to succeed, then things will go wrong. Technical details: when the rhn_entitlement.activate_channel_family procedure needs to convert a system's subscription to flex, it does not restrict the conversion to a channel family, but instead does it for all the system's subscriptions. So this seems to work correctly for the first channel family that is activated, but the second channel family does not work properly because it has already been converted and thus is not eligible to be and activation blows up. More concrete details with reproducer information to follow in next comment.
Reproducer Steps: 1. activate attached 5-0.cert 2. register 5 guests (without their hosts). Only these 5 guests should be registered to the satellite 3. Ensure they are subscribed to a rhel-server channel 4. Subscribe them to an rhn-tools channel 5. attempt to activate the attached 1-4.cert results: ERROR: unhandled exception occurred: Traceback (most recent call last): File "/usr/bin/rhn-satellite-activate", line 45, in ? sys.exit(abs(mod.main() or 0)) File "/usr/share/rhn/satellite_tools/rhn_satellite_activate.py", line 646, in main localUpdateChannels() File "/usr/share/rhn/satellite_tools/rhn_satellite_activate.py", line 238, in localUpdateChannels sync_handlers.populate_channel_family_permissions(sat_cert) File "/usr/share/rhn/satellite_tools/sync_handlers.py", line 704, in populate_channel_family_permissions importer.run() File "/usr/share/rhn/server/importlib/importLib.py", line 651, in run self.submit() File "/usr/share/rhn/server/importlib/channelImport.py", line 291, in submit self.backend.processChannelFamilyPermissions(self.batch) File "/usr/share/rhn/server/importlib/backend.py", line 1098, in processChannelFamilyPermissions (cfp['org_id'], cfp['channel_family'], cfp['max_members']), explain=0) common.rhnException.rhnFault: (23, 'ORA-20290: (not_enough_entitlements_in_base_org) - You do not have enough entitlements in the base org.: org_id [1] family [rhn-tools] max [1]', 'Could not update database entry.')
Fixed in spacewalk master: 091e18bc8ab86835904f72e530cec58c5230ec0e
Please be so kind and add a few key words to the Technical Notes of this Bugzilla entry using the following structure: Cause: Consequence: Fix: Result: For details, see: https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes Thanks
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: Consequence: Fix: Result:
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1,7 +1,8 @@ -Cause: +Cause: Satellite certificate activation logic involving conversion of regular entitlements to flex entitlements did not restrict the conversion to a channel family and was +converting all system's subscriptions. -Consequence: +Consequence: Satellite certificate activation would fail when converting regular system entitlements to flex entitlements for both the base and the child channels of the converted system. -Fix: +Fix: Satellite certificate activation logic was fixed to properly convert regular to flex entitlements in the critical cases. -Result:+Result: Activation of a new Satellite certificate will correctly convert regular entitlements to flex entitlements for base and child channels of a system.
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/RHBA-2011-0155.html