Bug 835608

Summary: cloning channel with same label as source channel produces ISE on PostgreSQL
Product: [Community] Spacewalk Reporter: Jan Hutař <jhutar>
Component: ServerAssignee: Michael Mráka <mmraka>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.8   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-web-1.8.21-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 835796 (view as bug list) Environment:
Last Closed: 2012-11-01 16:19:45 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: 835796, 871344    

Description Jan Hutař 2012-06-26 15:13:23 UTC
Description of problem:
When I attempt to clone a channel and set label of new channel same as original channel have, I get an ISE. On Oracle DB backend I get nice error message, on PostgreSQL I get ISE.


Version-Release number of selected component (if applicable):
spacewalk-html-1.8.19-1.el5


How reproducible:
always


Steps to Reproduce:
1. Clone channel, set label to label of original channel


Actual results:
[Tue Jun 26 11:08:14 2012] [error] Execution of /var/www/html/network/software/channels/manage/edit.pxt failed at Tue Jun 26 11:08:14 2012: RHN::Exception: DBD::Pg::st execute failed: ERROR:  duplicate key value violates unique constraint "rhn_channel_label_uq"\n\n  RHN::DB /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm 121 RHN::Exception::DB::throw\n  RHN::DB::Channel /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/Channel.pm 111 RHN::DB::handle_error\n  Sniglets::ChannelEditor /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/ChannelEditor.pm 256 RHN::DB::Channel::commit\n  Sniglets::ChannelEditor /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/ChannelEditor.pm 227 (eval)\n  PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 482 Sniglets::ChannelEditor::channel_edit_cb\n  PXT::Request /usr/lib/perl5/vendor_perl/5.8.8/PXT/Request.pm 548 PXT::ApacheHandler::pxt_parse_data\n  PXT::Handlers /usr/lib/perl5/vendor_perl/5.8.8/PXT/Handlers.pm 115 PXT::Request::include\n  PXT::Parser /usr/lib/perl5/vendor_perl/5.8.8/PXT/Parser.pm 141 PXT::Handlers::pxt_include_handler\n  PXT::Parser /usr/lib/perl5/vendor_perl/5.8.8/PXT/Parser.pm 72 PXT::Parser::expand_tag\n  PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 456 PXT::Parser::expand_tags\n  PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 103 PXT::ApacheHandler::pxt_parse_data\n  PXT::ApacheHandler /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 103 (eval)\n  main -e 0 PXT::ApacheHandler::handler\n  main -e 0 (eval)
[Tue Jun 26 11:08:15 2012] [error] Traceback sent to root@localhost at /usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm line 563.


Expected results:
Nice error message saying I should use label which is not used.


Additional info:
Discovered by:
From: Patrick Hurrelmann <patrick.hurrelmann>
To: spacewalk-list
Subject: [Spacewalk-list] Clone of channel with identical label fails with error 500
Date: Fri, 22 Jun 2012 11:14:08 +0200

Comment 1 Michael Mráka 2012-06-27 07:51:08 UTC
Fixed in spacewalk nightly by
commit 132014256505817da37019a1f21c787177dfdc36
    835608 - error messages in PostgreSQL have different pattern

Comment 2 Jan Pazdziora 2012-10-30 19:24:26 UTC
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/

Comment 3 Jan Pazdziora 2012-11-01 16:19:45 UTC
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18