For snapshotting purposes, the use of registration.add_packages and registration.remove_packages need to be atomic... i.e., if I snapshot at the end of those, it should make sense. Currently, runTransaction calls both of those functions, which would result in 2 invalid snapshots. The client needs to use a single atomic function for this purpose. It'll be more efficient, and we'll be able to sanely snapshot.
this is going to need server changes (schema changes maybe?) and caps changes, so should probabaly be protospeced first
there's already a bug against me for the backend bits, but yeah, we'll need to work out the calling convention. i'll send you an email for ACK/NACK'ing.
Server exposes a capability: registration.delta_packages Args for the XML-RPC call: registration.delta_packages(systemid, packages) where packages is a hash with 'added' and 'deleted' as keys. The values for those keys are lists of packages, just like for the add_packages and delete_packages calls. rhn/test/backend/checks/up2date.py has a delta_packages function to test this functionality too.
client code done, seems to work. need a test plan of some sort to verify...
Adrian, please work with Bret to define a test plan. We have to make sure that the client code will be part of U5/U7/U1.
This bug is considered MustFix for RHEL 3 U6 by RHN Engineering.
need a test plan
test plan A: 1. Verify that the proper capabilties info is being sent up to the server. There are couple ways to do this, none particular ideal. a) modify the client code to print out the list of caps it is sending to the server (modifying /usr/share/rhn/up2date_client/rpcServer.py around line
ignore comment #10, weird firefocus crap... 1. Register a rhel3u6 client (up2date-4.4.X or newer) against RHN/Sat 2. Schedule a package install action 3. on the client, run: /usr/sbin/rhn_check -v -v -v 4. client should pick up the action, install the package, then attempt to sync it's package list. If you see it attempt to sync the package list with registration.delta_packages, then it works.
I'm not seeing anything about registration.delta_packages when I do rhn_check -vvv (not syncing?): [root@test07 tmp]# rhn_check -vvv D: check_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>ddd</string></value>\n<value><string>3.3.1</string></value>\n<value><string>23</string></value>\n<value><string></string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 24283899} D: logininfo: {'X-RHN-Auth-Server-Time': '1120843826.66', 'X-RHN-Auth': '2pr/bmw7TUEO0YGWE/gkmg==', 'X-RHN-Server-Id': 1005476350, 'X-RHN-Auth-Channels': [['rhel-i386-as-3', '20050707152708', '1', '1']], 'X-RHN-Auth-User-Id': '', 'X-RHN-Auth-Expire-Offset': '3600.0'} D: handle_action {'action': "<?xml version='1.0'?>\n<methodCall>\n<methodName>packages.update</methodName>\n<params>\n<param>\n<value><array><data>\n<value><array><data>\n<value><string>ddd</string></value>\n<value><string>3.3.1</string></value>\n<value><string>23</string></value>\n<value><string></string></value>\n</data></array></value>\n</data></array></value>\n</param>\n</params>\n</methodCall>\n", 'version': 2, 'id': 24283899} D: handle_action actionid = 24283899, version = 2 packages.update ([['ddd', '3.3.1', '23', '']],) D: do_call packages.update ([['ddd', '3.3.1', '23', '']],) D: Called update_packages [['ddd', '3.3.1', '23', '']] D: availablePackageList::channels: <up2date_client.rhnChannel.rhnChannelList instance at 0x9ecc7cc> D: listPackages Fetched via: diskcache D: obsoletesList::channels: <up2date_client.rhnChannel.rhnChannelList instance at 0x9ecc7cc> D: getObsoletes Fetched via: diskcache D: archscore 4 Name Version Rel ---------------------------------------------------------- ddd 3.3.1 23 i386 No advisory information available D: Called dryRun [['ddd', '3.3.1', '23', '', 'i386', '3001329', 'rhel-i386-as-3']] D: obsoletesList::channels: <up2date_client.rhnChannel.rhnChannelList instance at 0x9ecc7cc> D: getObsoletes Fetched via: diskcache D: add instance class name up2date D: Removing package (['kernel', '2.4.21', '32.0.1.EL', '', 'athlon', '9069562', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel', '2.4.21', '32.0.1.EL', '', 'i686', '9172299', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-BOOT', '2.4.21', '32.0.1.EL', '', 'i386', '5996791', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-debuginfo', '2.4.21', '4.0.1.EL', '', 'athlon', '32466765', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-debuginfo', '2.4.21', '4.0.1.EL', '', 'i386', '14418394', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-debuginfo', '2.4.21', '4.0.1.EL', '', 'i686', '47619081', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-doc', '2.4.21', '32.0.1.EL', '', 'i386', '1886232', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-hugemem', '2.4.21', '32.0.1.EL', '', 'i686', '8044750', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-hugemem-unsupported', '2.4.21', '32.0.1.EL', '', 'i686', '7090148', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-pcmcia-cs', '3.1.31', '13', '1', 'i386', '308069', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-smp', '2.4.21', '32.0.1.EL', '', 'athlon', '9391756', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-smp', '2.4.21', '32.0.1.EL', '', 'i686', '9625060', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-smp-unsupported', '2.4.21', '32.0.1.EL', '', 'athlon', '5578184', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-smp-unsupported', '2.4.21', '32.0.1.EL', '', 'i686', '5662533', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-source', '2.4.21', '32.0.1.EL', '', 'i386', '43770274', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-unsupported', '2.4.21', '32.0.1.EL', '', 'athlon', '5441441', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-unsupported', '2.4.21', '32.0.1.EL', '', 'i686', '5522114', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Removing package (['kernel-utils', '2.4', '8.37.12', '1', 'i386', '400057', 'rhel-i386-as-3'], 'Pkg name/pattern') D: Candidates for the selected list: [['ddd', '3.3.1', '23', '', 'i386', '3001329', 'rhel-i386-as-3']] D: Adding to transaction set ['ddd', '3.3.1', '23', '', 'i386', '3001329', 'rhel-i386-as-3'] D: Checking for dependencies D: RPM returned 2 deps. D: Processing dependency (('ddd', '3.3.1', '23'), ('libXm.so.3', None), 0, None, 0) D: Processing dependency (('ddd', '3.3.1', '23'), ('openmotif', None), 0, None, 0) D: Dependencies: [('ddd', 'libXm.so.3'), ('ddd', 'openmotif')] D: Dep ['libXm.so.3', 'openmotif'] Fetched via: [['openmotif', '2.2.3', '5.RHEL3.2', '', 'i386', '1396360', 'rhel-i386-as-3'], ['openmotif', '2.2.3', '5.RHEL3.2', '', 'i386', '1396360', 'rhel-i386-as-3']] D: Got back response: [['openmotif', '2.2.3', '5.RHEL3.2', '', 'i386', '1396360', 'rhel-i386-as-3'], ['openmotif', '2.2.3', '5.RHEL3.2', '', 'i386', '1396360', 'rhel-i386-as-3']] D: Candidates for the selected list: [['openmotif', '2.2.3', '5.RHEL3.2', '', 'i386', '1396360', 'rhel-i386-as-3'], ['openmotif', '2.2.3', '5.RHEL3.2', '', 'i386', '1396360', 'rhel-i386-as-3']] D: Adding to transaction set ['openmotif', '2.2.3', '5.RHEL3.2', '', 'i386', '1396360', 'rhel-i386-as-3'] D: Checking for dependencies D: Running transaction (final step)... D: getPackage ['ddd', '3.3.1', '23', '', 'i386', '3001329', 'rhel-i386-as-3'] ddd-3.3.1-23.i386.rpm: ########################## Done. D: Package ['ddd', '3.3.1', '23', '', 'i386', '3001329', 'rhel-i386-as-3'] Fetched via: get D: getPackage ['openmotif', '2.2.3', '5.RHEL3.2', '', 'i386', '1396360', 'rhel-i386-as-3'] openmotif-2.2.3-5.RHEL3.2.i ########################## Done. D: Package ['openmotif', '2.2.3', '5.RHEL3.2', '', 'i386', '1396360', 'rhel-i386-as-3'] Fetched via: get Preparing ########################################### [100%] Installing... 1:openmotif ########################################### [100%] 2:ddd ########################################### [100%] The following packages were added to your selection to satisfy dependencies: Name Version Release -------------------------------------------------------------- openmotif 2.2.3 5.RHEL3.2 D: Sending back response (0, 'Packages were installed successfully', {}) D: do_call packages.checkNeedUpdate ('rhnsd=1',) D: local action status: (0, 'rpm database not modified since last update (or package list recently updated)', {})
D: do_call packages.checkNeedUpdate ('rhnsd=1',) D: local action status: (0, 'rpm database not modified since last update (or package list recently updated)', {}) The above is kind of the root cause here, and that should be fixed in up2date-4.4.28. But it's also kind of unrelated. Sorta. But, you won't see the "packages.delta*" as I mentioned before. That action is actually pretty quite. Instead, see the test plan for #115040, as it should incorporate the client/web/backend parts of this together
waiting for up2date-4.4.28
now waiting for fix to 162967
Verified against x86_64, i386, and ia64. Would have verified against i/p/z-series machines but due to a power outage they cannot currently ping webqa. Moving on to the next bug .....
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 the 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-2005-712.html