Bug 125790 - client needs to use registration.delta_packages or something
Summary: client needs to use registration.delta_packages or something
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: up2date
Version: 4.0
Hardware: All
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: Adrian Likins
QA Contact: Beth Nackashi
URL:
Whiteboard: aide
Depends On: 162967
Blocks: 115040 155571 156320
TreeView+ depends on / blocked
 
Reported: 2004-06-11 14:15 UTC by Bret McMillan
Modified: 2007-11-30 22:07 UTC (History)
3 users (show)

Fixed In Version: RHBA-2005-712
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-28 17:09:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:712 0 qe-ready SHIPPED_LIVE up2date bug fix update 2005-09-28 04:00:00 UTC

Description Bret McMillan 2004-06-11 14:15:57 UTC
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.

Comment 1 Adrian Likins 2004-06-11 19:43:07 UTC
this is going to need server changes (schema changes maybe?) 
and caps changes, so should probabaly be protospeced first

Comment 2 Bret McMillan 2004-06-11 20:02:50 UTC
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.

Comment 3 Mihai Ibanescu 2004-12-03 20:57:39 UTC
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.

Comment 4 Adrian Likins 2004-12-03 22:20:18 UTC
client code done, seems to work. need a test
plan of some sort to verify...

Comment 5 Mihai Ibanescu 2005-01-19 14:51:59 UTC
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.

Comment 6 Debbie McGrath 2005-06-08 14:19:49 UTC
This bug is considered MustFix for RHEL 3 U6 by RHN Engineering.

Comment 9 Beth Nackashi 2005-07-01 13:54:46 UTC
need a test plan

Comment 10 Adrian Likins 2005-07-07 18:18:36 UTC
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 


Comment 11 Adrian Likins 2005-07-07 18:27:59 UTC
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. 


  

Comment 12 Beth Nackashi 2005-07-08 17:39:04 UTC
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)', {})




Comment 13 Adrian Likins 2005-07-11 16:28:01 UTC
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

Comment 14 Beth Nackashi 2005-07-11 16:37:53 UTC
waiting for up2date-4.4.28

Comment 15 Beth Nackashi 2005-07-11 21:45:19 UTC
now waiting for fix to 162967

Comment 16 Beth Nackashi 2005-07-17 22:38:30 UTC
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 .....

Comment 18 Red Hat Bugzilla 2005-09-28 17:09:03 UTC
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



Note You need to log in before you can comment on or make changes to this bug.