Bug 1287829 - Unable to kickstart with duplicate packages in child channels
Summary: Unable to kickstart with duplicate packages in child channels
Keywords:
Status: CLOSED EOL
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.4
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-12-02 18:53 UTC by jeff
Modified: 2019-10-21 12:27 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2019-10-21 12:27:31 UTC
Embargoed:


Attachments (Terms of Use)

Description jeff 2015-12-02 18:53:38 UTC
Description of problem:

Unable to Kickstart system when same name-version rpm package exists in multiple child channels when they have different checksum and base channel is empty.

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


How reproducible:
Create an empty base channel for CentOS6-x86_64 and child channels for 6.4 and 6.6. Select CentOS6 + CentOS-X.Y child channel appropriate for each KS profile. Point each KS profile to respective X.Y distro tree.


Steps to Reproduce:
1. Create an empty base channel for CentOS6-x86_64
2. Create child channels for CentOS 6.4 and 6.6 and load packages from respective iso into each child channel.
3. Create 2 distribution trees: one for 6.4 and one for 6.6.
4. Create 2 KS profiles: one for 6.4 and one for 6.6
5. Choose Centos6-x86_64 Base channel and respective X.Y Child channel for each KS file.


Actual results:
Only the KS profile with the most recently pushed packages will kickstart. Error from console of non-working KS session:

10:30:41,320 WARNING : Try 5/10 for http://Server1.fqdn/ks/dist/centos-6.4-x86_64-x86_64-distro/Packages/mailcap-2.1.31-2.el6.noarch.rpm failed: [Errno -1] Package does not match intended download. Suggestion: run yum --enablerepo=anaconda-CentOS-201303020151.x86_64 clean metadata


Expected results:
Each system should be able to kickstart normally.

Additional info:
sql-query name="Channel.packageByFileName" in Channel.hbm.xml seems like it gets list of rpms from base + all child channels and returns the last result if there are multiple.

Comment 1 Tomas Lestach 2015-12-04 16:36:28 UTC
Thank you for the report.
I did following change ...

spacewalk.git: 79ff841198754e507a207ea23913c9fadb4822dd

With the patch I'm able to wget the correct file from:
 http://<spacewalk>/ks/dist/centos-6.4/Packages/mailcap-2.1.31-2.el6.noarch.rpm
 http://<spacewalk>/ks/dist/centos-6.6/Packages/mailcap-2.1.31-2.el6.noarch.rpm

Comment 2 jeff 2015-12-07 20:53:39 UTC
Thanks Tomas! Hope this got it..

If you have rhn.jar from 2.4 + your changes, I can try it out. Compiling spacewalk something I'm not familiar with.

Comment 3 Tomas Lestach 2015-12-11 09:00:32 UTC
jeff, there's a whole package built, available in Spacewalk Koji. But nightly spacewalk-java isn't usable with 2.4 any more.

Comment 4 Tomas Lestach 2015-12-18 14:41:41 UTC
one more commit (due to failed junit tests) ...

spacewalk.git: 737c7837889591ffe3e8d1412da3a39eb777c462

Comment 5 Tomas Lestach 2016-01-27 14:58:13 UTC
I'm sorry, I had to revert the commits in Spacewalk.
I originally named the kickstart trees/distributions the same as the channel labels and that was the only reason, the changes worked for me.
Unfortunately the current design does not allow your use case.

For more information, please, check https://github.com/spacewalkproject/spacewalk/commit/737c7837889591ffe3e8d1412da3a39eb777c462#commitcomment-15241302

Revert commit ...
spacewalk.git: 090753281cb902459982e83b9592d8f970d9db84

Comment 6 Michael Mráka 2019-10-21 12:27:31 UTC
Spacewalk 2.8 (and older) has already reached it's End Of Life.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before end of life. If you would still like
to see this bug fixed and are able to reproduce it against current version
of Spacewalk 2.9, you are encouraged change the 'version' and re-open it.


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