Bug 1076490
Summary: | Unable to kickstart when duplicate package with different checksum exists in child channel | |||
---|---|---|---|---|
Product: | [Community] Spacewalk | Reporter: | dave | |
Component: | Server | Assignee: | Tomas Lestach <tlestach> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Radovan Drazny <rdrazny> | |
Severity: | medium | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 2.3 | CC: | eherget, galtukho, jmacfarland, jochen, rdrazny, rhbz | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | Bug Fix | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1395886 (view as bug list) | Environment: | ||
Last Closed: | 2017-09-27 18:55:07 UTC | Type: | Bug | |
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: | 1395886, 1484117 |
Description
dave
2014-03-14 12:56:20 UTC
Having just upgraded to Spacewalk 2.3 - it appears that this bug still exists. The new SQL is: <sql-query name="Channel.packageByFileName"> <![CDATA[SELECT {p.*} FROM rhnPackage {p}, rhnChannelPackage CP, rhnChannel C WHERE (C.id = :channel_id OR C.parent_channel = :channel_id) AND (CP.channel_id = C.id OR CP.channel_id = C.parent_channel) AND CP.package_id = P.id AND P.path LIKE :pathlike ORDER BY CASE WHEN C.id = :channel_id THEN 1 ELSE 2 END ]]> Ver 2.4, still exists. The ORDER BY workaround does not work for me.
In my case right now, it is mailcap-2.1.31-2.el6.noarch.rpm which is in a 6.6 channel and also a 6.6 updates channel.
The only change is the package signature.
< Signature : RSA/SHA1, Sun 25 Sep 2011 11:12:20 PM CDT, Key ID 0946fca2c105b9de
---
> Signature : RSA/SHA1, Sun 25 Sep 2011 11:21:48 PM CDT, Key ID 0946fca2c105b9de
This one change stops the KS process. The only way I can see to proceed is to delete the pkg from the uddate repo and filter out this version in the updates repository.
Dave, you're right. I was able to reproduce your issue. Your patch fixes the issues and I like it. Accepting to Spacewalk as ... spacewalk.git: cd86e50291053f2fc2d6d8dc219f4429a5a0d04e Sorry, it took so long. If possible, we prefer a pull request. Anyway, thank you! jeff, I believe the provided patch is ok. Are you sure, you've applied it correctly? @Tomas - no problems, thanks for fixing this! Well, if all there is to do is add the ORDER BY, then I am not not sure why it wouldn't work here. -jar xf rhn.jar com/redhat/rhn/domain/channel/Channel.hbm.xml -Edit com/redhat/rhn/domain/channel/Channel.hbm.xml, adding ORDER BY to Channel.packageByFileName query -jar uf rhn.jar com/redhat/rhn/domain/channel/Channel.hbm.xml -spacewalk-service stop/start But if 2 people tested/confirmed, I'll chalk it up to an issue on my side. Looking again, more than likely the patch doesn't work for me as I use an empty base channel for Centos Major-Arch revisions and each Centos X.Y release has its own child channel under that. Kickstarting is done by selecting the base + X.Y child channel. Looks like the db query gets data returned from the all channels. The package with the highest package id is returned. jeff, this looks like a different (even if close related) problem. Would you describe, how you get kickstart trees to child channels? (Preferably in a new BZ.) I'd say, no one really used that before. Our default is to have ks trees in the base channel. https://bugzilla.redhat.com/show_bug.cgi?id=1287829 I'm not sure what you mean about the default. I didn't have to do anything the gui didnt allow. Distro tree is selected in the kickstart profile. So I can choose C6 base channel, 6.6 Child channel and 6.6 distro tree for example and it works. If I were to create a 6.4 KS profile, and choose C6 Base + 6.4 Child channel and 6.4 distro tree, the 6.6 version will no longer work. Thanks Reproduced on Spacewalk 2.4: 1. Create two RPMs with a same name and version, and different checksum (use rpmfluff for example and set different description for each package). 2. Have a software channel with one child channel. Both must have kickstart tree (Centos 6.7 and 6.8 can be used). 3. Using rhnpush push packages from step 1 into channels, one for each channel. Make sure you are pushing into child channel first, so this package gets lower ID. 4. Check both channels for pushed packages to make sure that each channel has a package with same name and different checksum. 5. Try to download packages using wget. #wget http://<spacewalk-fqdn>/ks/dist/centos67/Packages/moje-0.1-1.x86_64.rpm #wget http://<spacewalk-fqdn>/ks/dist/centos68/Packages/moje-0.1-1.x86_64.rpm 6. Check checksum for downloaded packages using the "sha256sum -b" command. 7. Both downloaded packages have checksum of package from the child channel. This is gonna cause problems described in the initial report - package from the parent channel (with different checksum) is expected during kickstarting. Verified on Spacewalk 2.6 - the package from the parent channel is always downloaded. VERIFIED Spacewalk 2.7 has been released. https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes27 |