Bug 591291
Summary: | Satellite 5.3: mergeErrata API call does not copy/add packages, it will also associate (instead of clone) non-custom errata to a custom channel (should not be allowed) | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite 5 | Reporter: | Xixi <xdmoon> | ||||
Component: | API | Assignee: | Tomas Lestach <tlestach> | ||||
Status: | CLOSED ERRATA | QA Contact: | Šimon Lukašík <slukasik> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 530 | CC: | aparsons, clasohm, cperry, jsherril, mzazrivec, schlegel, slukasik, stanislav.polasek, stephan.duehr, tao, xdmoon | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2010-11-18 08:28:50 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: | 518253 | ||||||
Attachments: |
|
Description
Xixi
2010-05-11 19:47:49 UTC
Point 2 is correct. The fix is available in spacewalk.git: 5c14ba73da7e5f19bdc73092bbfa51f632cb536a Regarding point 1, I'd say the behavior is correct. For adding packages there's another api call: channel.software.mergePackages. Please, ignore my previous comment regarding point 1. It makes sense to associate packages, when merging errata. spacewalk.git: ee10f6731672b225976fdb70a5123f40f6d8cf89 Fix also for mergeErrata with given start and end date spacewalk.git: bc0f1dfe1ca5c7c9910e8c44a2711570f90bb6ae Just wanted to mention that mergeErrata (without given start and end date) in Satellite 5.3 with all updates installed is still broken. The following is logged in /var/log/tomcat5/catalina.out: 2010-07-09 16:40:44,308 [TP-Processor2] WARN org.hibernate.util.JDBCExceptionReporter - SQL Error: 1, SQLState: 23000 2010-07-09 16:40:44,308 [TP-Processor2] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-00001: unique constraint (RHNSAT.RHN_CE_CE_UQ) violated 2010-07-09 16:40:44,308 [TP-Processor2] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: could not insert collection rows: [com.redhat.rhn.domain.channel.Channel.erratas#596] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71) ... via XMLRPC you just get a "500 Internal Server Error" When cloning a channel using API call channel.software.clone with original_state=False, the Errata are linked/associated (same errata id), so mergeErrata should do the same. As a workaround, it works to determine the latest update_date of source and target channel and then use mergeErrata with start and end date (each +1), which works fine. Anyway, mergeErrata should work as fine as mergePackages. And yes, the other problem is that when cloning via Webinterface, all Errata are cloned (CLA-nnnn:nnnn), see also #568962. When using mergeErrata on such a channel, you get all the original errata, too, so that it would be necesary to use the errata.clone API call on each missing erratum. Hey Stephan, you're right. The bug is fixed in the upstream and wasn't released as an erratum for sat530 yet (MODIFIED state). However the traceback you're getting looks like another problem than this BZ. If you're able to reproduce it, please file another BZ. Yes, it's reproducable. https://bugzilla.redhat.com/show_bug.cgi?id=613773 Note if a customer requests a hotfix for this bug, available packages are found here: RHEL4: https://brewweb.devel.redhat.com/buildinfo?buildID=137465 RHEL5: https://brewweb.devel.redhat.com/buildinfo?buildID=137464 Created attachment 445978 [details]
catalina.out
This is the traceback I get, while deleting the cloned channel.
The behavior is expected. Because we really clone the errata now, the merge process takes much longer than just the original assigning of errata to another channel. For channels with bigger amount of errata the process takes longer than the tomcat timeout, so we were forced just to trigger the merge process within the api call and to continue with the process after the api call is finished. This is the reason, why the cloned errata are not visible right after the api call is finished. The errata get visible after the whole merge process is finished. Thanks Tomas for clarification. Changing to VERIFIED: Testing procedure: Merging errata between multiple channels. Verified against: spacewalk-java*-0.5.44-9 Approving bug 642287 - this bug needs to be re-QA'd once bug 642287 is ON_QA. Retested on sat530 and Sat540. And behaviour is the same. I just want to add a comment regarding #1 2.: client.channel.software.clone() does link orginal errata, that's where you already allow ist. mergeErrata should behave consistently. If mergeErrata would change in this way, some API scripts used by customer would probably break. I would not consider channels cloned from RH Channels as "custom". They are often used for staging purposes without any custom content. 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-2010-0897.html |