Bug 644880

Summary: Possibility to assign 64 package into 32 channel by channel.software.addPackages
Product: Red Hat Satellite 5 Reporter: Šimon Lukašík <slukasik>
Component: APIAssignee: Tomas Lestach <tlestach>
Status: CLOSED ERRATA QA Contact: Jan Hutař <jhutar>
Severity: high Docs Contact:
Priority: medium    
Version: 540CC: cperry, jhutar, psklenar
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause Not checking for arch compatibility, when adding a package to channel using channel.software.addPackages API Consequence A package of non-compatible arch may land in a channel Result Arch non-compatible packages won't be added into a channel when using channel.software.addPackages API
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-17 14:12:37 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: 646488    

Description Šimon Lukašík 2010-10-20 14:27:59 UTC
Description of problem:
See steps.

Version-Release number of selected component (if applicable):
Satellite540

How reproducible:
Always

Steps to Reproduce:
1. take 32b channel (I have clone of rhel-i386-server-5)
2. push 64b package to the satellite
3. client.channel.software.addPackages(key, chan, [pkgId])

  
Actual results:
package is assigned to the channel

Expected results:
64b package should not be allowed in 32b. channel.

Additional info:

Comment 1 Šimon Lukašík 2010-10-20 14:37:44 UTC
This is not a regression against Sat530.

Comment 3 Šimon Lukašík 2010-10-20 14:44:29 UTC
Note to QA: (nice to test)

After the reproducer from comment 0, when there is 64b package
in the 32. channel. Errata.create api call will fail with strange

<Fault -1: 'redstone.xmlrpc.XmlRpcFault: unhandled internal
exception: The server architecture (AMD64) is incompatible
with the channel architecture (IA-32)'>

when attempting to create new errata containing that package
in that channel.

Comment 5 Tomas Lestach 2010-11-01 18:48:26 UTC
Adding an arch compatibility check.

spacewalk.git: 449992ea7b46ae47ff47cdd922789a09d4b38a37

Comment 9 Tomas Lestach 2011-02-14 14:40:25 UTC
    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
Not checking for arch compatibility, when adding a package to channel using channel.software.addPackages API

Consequence
A package of non-compatible arch may land in a channel

Result
Arch non-compatible packages won't be added into a channel when using channel.software.addPackages API

Comment 11 Tomas Lestach 2011-03-10 17:05:21 UTC
speeding up of the API call:
spacewalk.git: 1c9e62430720a088fbda5e433d3d57897ba182f6
saetllite.git: cf6f64b248835df1d20e6a02514855acacad81be

Comment 12 Tomas Lestach 2011-03-11 10:26:26 UTC
fix permission check to packages:
spacewalk.git: 422e43146ee29c4afaeb20819fee2ce1ce124d71
satellite.git: a5ae4d1c84044c207716d09f30a1bb56679476b1

Comment 14 Tomas Lestach 2011-03-11 15:42:36 UTC
Not a good day ...

another fix:
spacewalk.git: 
 ad01b27ae671336e99be355cf8b9155b1789b624
 bcebdb8abb77ab0f9dd955bbf51005c24587a2bf
satellite.git (equivalent):
 a8573b1de514b2a0e8ab388bf0813426695ac751

Comment 17 errata-xmlrpc 2011-03-17 14:12:37 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 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-0362.html