Bug 784312

Summary: different arch format for different API calls
Product: Red Hat Satellite 5 Reporter: Jan Hutař <jhutar>
Component: APIAssignee: Gennadii Altukhov <galtukho>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: low Docs Contact:
Priority: low    
Version: 541CC: aupadhye, dyordano, galtukho, jhutar, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-03 19:22:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 462714, 1309768    

Description Jan Hutař 2012-01-24 14:40:42 UTC
Description of problem:
API call system.listPackages returns packages with arch like "AMD64", but packages.findByNvrea consumes arch like "x86_64".


Version-Release number of selected component (if applicable):
spacewalk-java-1.2.39-108.el6sat.noarch


How reproducible:
1 of 1 attempt


Steps to Reproduce:
1. get list of packages from x86_64 channel/packages with "system.listPackages", observe "arch" field
2. try to find that package "packages.findByNvrea"


Actual results:
"AMD64" vs. "x86_64"


Expected results:
Arches should be consistent across API calls or API calls documentation should mention this.

Comment 2 Gennadii Altukhov 2016-04-01 13:54:56 UTC
Taking...

Comment 3 Gennadii Altukhov 2016-04-01 15:10:36 UTC
I cannot reproduce the bug.

I've verified system.listPackages() system call, it just makes a selection in a database on rhnServerPackage table and returns the result. Actually, table rhnPackageArch contains a lot of architectures, including x86_64 and amd64.

We cannot create a channel with architecture amd64 on Sat 5.7. ( but can with "AMD64 Debian" on Spacewalk and, in this case, can upload only amd64 packages, otherwise will be an error: "Package arch x86_64 incompatible with channel mychan-amd64")


Jan, how is it possible to reproduce the bug?

Comment 4 Jan Hutař 2016-04-03 19:22:27 UTC
Indeed, seems OK now - both calls now can work with arch like "x86_64":

>>> import xmlrpclib
>>> client = xmlrpclib.Server('http://<fqdn>/rpc/api')
>>> key = client.auth.login('<user>','<pass>')
>>> xxx=client.system.listPackages(key,1000050278)
>>> print xxx[0]
{'installtime': <DateTime '20160328T12:01:27' at 7f52351f4b90>, 'epoch': ' ', 'version': '2.2.51', 'release': '12.el7', 'arch': 'x86_64', 'name': 'acl'}
>>> print client.packages.findByNvrea(key, 'acl', '2.2.51', '12.el7', '', 'x86_64')
[{'arch_label': 'x86_64', 'epoch': '', 'version': '2.2.51', 'last_modified': <DateTime '20140516T01:14:13' at 7f52351f4518>, 'provider': 'Red Hat Inc.', 'release': '12.el7', 'path': 'redhat/NULL/096/acl/2.2.51-12.el7/x86_64/096baa24b3c30abf0f838725f94c9d2fe0e4b1724bc00ec8a4ffc910b2fba1d4/acl-2.2.51-12.el7.x86_64.rpm', 'id': 36619, 'name': 'acl'}]