Bug 461796 - ISE when cloning rhel4 or rhel5 channel
Summary: ISE when cloning rhel4 or rhel5 channel
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 0.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jesus M. Rodriguez
QA Contact: John Matthews
URL:
Whiteboard:
: 474724 (view as bug list)
Depends On:
Blocks: space04
TreeView+ depends on / blocked
 
Reported: 2008-09-10 17:11 UTC by John Matthews
Modified: 2009-01-22 16:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-01-22 16:29:58 UTC
Embargoed:


Attachments (Terms of Use)
full errata description of the errata in question in this bug. (2.00 KB, text/plain)
2009-01-13 18:05 UTC, Jesus M. Rodriguez
no flags Details

Description John Matthews 2008-09-10 17:11:51 UTC
Description of problem:

When cloning a Red Hat channel, I'm seeing an ISE:

[Wed Sep 10 09:30:25 2008] [error] Execution of /var/www/html/network/software/channels/manage/edit.pxt failed at Wed Sep 10 09:30:25 2008: RHN::Exception: DBD::Oracle::st exec
ute failed: ORA-01461: can bind a LONG value only for insert into a LONG column (DBD ERROR: OCIStmtExecute) [for Statement "INSERT INTO rhnErrataTmp E\n (E.ID, E.ADVISORY, E.AD
VISORY_TYPE, E.PRODUCT, E.DESCRIPTION, E.SYNOPSIS, E.TOPIC, E.SOLUTION, E.ISSUE_DATE, E.REFERS_TO, E.CREATED, E.MODIFIED, E.UPDATE_DATE, E.NOTES, E.ORG_ID, E.ADVISORY_NAME, E.A
DVISORY_REL, E.LOCALLY_MODIFIED, E.LAST_MODIFIED) VALUES (?, ?, ?, ?, ?, ?, ?, ?, TO_DATE(?, 'YYYY-MM-DD'), ?, TO_DATE(?, 'YYYY-MM-DD'), TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS'), TO
_DATE(?, 'YYYY-MM-DD'), ?, ?, ?, ?, ?, TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS'))" with ParamValues: :p5="Mozilla Firefox is an open source Web browser.\n\nFlaws were found in the wa
y Firefox executed malformed JavaScript code. A\nmalicious web page could cause Firefox to crash or allow arbitrary code \nto be executed as the user running Firefox. (CVE-2007
-0775, CVE-2007-0777)\n\nCross-site scripting (XSS) flaws were found in Firefox.  A malicious web\npage could display misleading information, allowing...", :p12="2008-09-08 22:
59:32", :p8="Before applying this update, make sure that all previously-released\nerrata relevant to your system have been applied.  \n\nThis update is available via Red Hat Ne
twork.  Details on how to use \nthe Red Hat Network to apply this update are available at\nhttp://kbase.redhat.com/faq/FAQ_58_10188", :p14=undef, :p15="1", :p19="2007-03-14 11:
01:34", :p4="Red Hat Enterprise Linux", :p18=undef, :p10="http://www.redhat.com/security/updates/classification/#critical", :p13="2007-03-14", :p2="CLSA-2007:0097-5", :p16="CLS
A-2007:0097", :p6="Critical: firefox security update", :p3="Security Advisory", :p7="Updated firefox packages that fix several security bugs are now available\nfor Red Hat Ente
rprise Linux 5.\n\nThis update has been rated as having critical security impact by the Red\nHat Security Response Team.", :p1="2066", :p17="5", :p9="2007-03-14", :p11="2008-09
-08"]\n  RHN::DB /usr/lib/perl5/site_perl/5.8.8/RHN/DB.pm 233 RHN::Exception::DB::throw\n  RHN::DB::Errata /usr/lib/perl5/site_perl/5.8.8/RHN/DB/Errata.pm 1026 RHN::DB::handle_
error\n  RHN::DB::ErrataEditor /usr/lib/perl5/site_perl/5.8.8/RHN/DB/ErrataEditor.pm 348 RHN::DB::Errata::commit\n  RHN::DB::ChannelEditor /usr/lib/perl5/site_perl/5.8.8/RHN/DB
/ChannelEditor.pm 462 RHN::DB::ErrataEditor::clone_into_org\n  RHN::DB::ChannelEditor /usr/lib/perl5/site_perl/5.8.8/RHN/DB/ChannelEditor.pm 405 RHN::DB::ChannelEditor::clone_e
rrata_into_channel\n  Sniglets::ChannelEditor /usr/lib/perl5/site_perl/5.8.8/Sniglets/ChannelEditor.pm 324 RHN::DB::ChannelEditor::clone_all_errata\n  Sniglets::ChannelEditor /
usr/lib/perl5/site_perl/5.8.8/Sniglets/ChannelEditor.pm 290 (eval)\n  PXT::ApacheHandler /usr/lib/perl5/site_perl/5.8.8/PXT/ApacheHandler.pm 625 Sniglets::ChannelEditor::channe
l_edit_cb\n  PXT::Request /usr/lib/perl5/site_perl/5.8.8/PXT/Request.pm 747 PXT::ApacheHandler::pxt_parse_data\n  PXT::Handlers /usr/lib/perl5/site_perl/5.8.8/PXT/Handlers.pm 1
12 PXT::Request::include\n  PXT::Parser /usr/lib/perl5/site_perl/5.8.8/PXT/Parser.pm 152 PXT::Handlers::pxt_include_handler\n  PXT::Parser /usr/lib/perl5/site_perl/5.8.8/PXT/Pa
rser.pm 83 PXT::Parser::expand_tag\n  PXT::ApacheHandler /usr/lib/perl5/site_perl/5.8.8/PXT/ApacheHandler.pm 521 PXT::Parser::expand_tags\n  PXT::ApacheHandler /usr/lib/perl5/s
ite_perl/5.8.8/PXT/ApacheHandler.pm 123 PXT::ApacheHandler::pxt_parse_data\n  PXT::ApacheHandler /usr/lib/perl5/site_perl/5.8.8/PXT/ApacheHandler.pm 123 (eval)\n  main -e 0 PXT
::ApacheHandler::handler\n  main -e 0 (eval)\n\nOffending Query: INSERT INTO rhnErrataTmp E\n (E.ID, E.ADVISORY, E.ADVISORY_TYPE, E.PRODUCT, E.DESCRIPTION, E.SYNOPSIS, E.TOPIC,
 E.SOLUTION, E.ISSUE_DATE, E.REFERS_TO, E.CREATED, E.MODIFIED, E.UPDATE_DATE, E.NOTES, E.ORG_ID, E.ADVISORY_NAME, E.ADVISORY_REL, E.LOCALLY_MODIFIED, E.LAST_MODIFIED) VALUES (?
, ?, ?, ?, ?, ?, ?, ?, TO_DATE(?, 'YYYY-MM-DD'), ?, TO_DATE(?, 'YYYY-MM-DD'), TO_DATE(?, 'YYYY-MM-DD HH24:MI:SS'), TO_DATE(?, 'YYYY-MM-DD'), ?, ?, ?, ?, ?, TO_DATE(?, 'YYYY-MM-
DD HH24:MI:SS'))

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


How reproducible:
Always

Steps to Reproduce:
Requires a spacewalk 0.2 install with rhel5 content synced.
1. Go to manage software channels (/network/software/channels/manage/index.pxt)
2. Click "clone channel"
3. Select to clone from "Red Hat Enterprise (v. 5 for 32-bit x86)"
  
Actual results:
ISE, look at /var/log/httpd/error_log see an exception relating to an insertion into rhnErrataTmp

Expected results:
Successful clone of channel

Additional info:
This was seen on rlx-0-24.rhndev.redhat.com (sw 0.2) and repeated on fjs-0-03.rhndev.redhat.com (sw 0.2).  Both of these machines were initially synced with webqa channel dumps and NFS mounting /var/satellite.  This resulted in installs that yielded 404 errors when attempting to execute yum installs from a registered client.  Both machines were then synced with a fresh rhn-satellite-export output from rlx-0-16 to fix that problem.  Possibly the issue seen here is related to bad content.

Comment 1 John Matthews 2008-09-10 22:28:20 UTC
I don't think this is related to bad content.

I wiped out the DB and deleted /var/satellite, then imported a rhel5 channel from a rhn-channel-export.   I'm seeing the same exact ISE and error.

Note: If I create a custom channel, add an errata, and clone it works fine.  I'm seeing the ISE when cloning a rhel5 channel.

This is on rlx-0-24.rhndev.redhat.com

Comment 2 John Matthews 2008-09-11 17:35:12 UTC
More info:

Created a centos5 channel, added all centos 5.2 packages.
Cloned channel, no problems.

Cloned rhel5 channel, but selected 'Original state of the channel (no errata)', clone worked fine.

Cloned rhel5 channel, selected "Select errata", cloned worked fine.

Attempted to clone rhel5 channel, selecting "Current state of the channel (all errata)" and I get ISE.


When doing the channel clone with all errata, I see the ISE when it gets to this errata: "RHSA-2007:0097 - Security Advisory", that's the errata in the ISE above.  

I was able to selectively clone just this errata, when I did the channel clone with "Select errata" option.

Comment 3 Devan Goodwin 2008-12-10 21:20:55 UTC
Still not clear what's going on but for curiosities sake attempted to reconstruct the query and run it on spacewalk 0.3 database. Final query looks like:

INSERT INTO rhnErrataTmp E (E.ID,
E.ADVISORY, E.ADVISORY_TYPE, E.PRODUCT, E.DESCRIPTION, E.SYNOPSIS, E.TOPIC, E.SOLUTION,
E.ISSUE_DATE, E.REFERS_TO, E.CREATED, E.MODIFIED, E.UPDATE_DATE, E.NOTES,
E.ORG_ID, E.ADVISORY_NAME, E.ADVISORY_REL, E.LOCALLY_MODIFIED, E.LAST_MODIFIED) VALUES (2066, 'CLSA-2007:0097-5', 'Security Advisory', 'Red Hat Enterprise Linux', 'Mozilla Firefox is an open source Web browser.\n\nFlaws were found in the way Firefox executed malformed JavaScript code. A\nmalicious web page could cause Firefox to crash or allow arbitrary code \nto be executed as the user running Firefox. (CVE-2007-0775, CVE-2007-0777)\n\nCross-site scripting (XSS) flaws were found in Firefox.  A malicious web\npage could display misleading information, allowing...', 'Critical: firefox security update', 'Updated firefox packages that fix several security bugs are now available\nfor Red Hat Enterprise Linux 5.\n\nThis update has been rated as having critical security impact by the Red\nHat Security Response Team.', 'Before applying this update, make sure that all previously-released\nerrata relevant to your system have been applied. \n\nThis update is available via Red Hat Network.  Details on how to use \nthe Red Hat Network to apply this update are available at\nhttp://kbase.redhat.com/faq/FAQ_58_10188', TO_DATE('2007-03-14', 'YYYY-MM-DD'), 'http://www.redhat.com/security/updates/classification/#critical', TO_DATE('2008-09-08', 'YYYY-MM-DD'), TO_DATE('2008-09-08 22:59:32', 'YYYY-MM-DD HH24:MI:SS'), TO_DATE('2007-03-14', 'YYYY-MM-DD'), NULL, 1, 'CLSA-2007:0097', 5, NULL, TO_DATE('2007-03-14 11:01:34', 'YYYY-MM-DD HH24:MI:SS'))

And the query runs fine.

Going to verify on Satellite 5.3 devel build as soon as possible.

Comment 4 Jesus M. Rodriguez 2009-01-09 19:32:54 UTC
*** Bug 474724 has been marked as a duplicate of this bug. ***

Comment 5 Jesus M. Rodriguez 2009-01-13 18:04:06 UTC
There are several mentions of this oracle error which reference metalink: 241358.1

http://coding.derkeiler.com/Archive/Perl/perl.dbi.users/2004-09/0214.html

The actual text for the description 2050 characters. This *should* fit in a column
with length of 4000. So the question is something going on where the text is taking up more space in Oracle than it needs i.e. 6150 bytes vs 2050bytes.

Another resource states to check the data_length of the column.
http://forums.oracle.com/forums/thread.jspa?messageID=3172422&tstart=0

RHNERRATA and RHNERRATATMP look fine.

SQL> select column_name, data_type, data_length, char_length from user_tab_columns where table_name = 'RHNERRATA';

COLUMN_NAME	     DATA_TYPE	DATA_LENGTH CHAR_LENGTH
-------------------- ---------- ----------- -----------
ID		     NUMBER		 22	      0
ADVISORY	     VARCHAR2		 37	     37
ADVISORY_TYPE	     VARCHAR2		 32	     32
ADVISORY_NAME	     VARCHAR2		 32	     32
ADVISORY_REL	     NUMBER		 22	      0
PRODUCT 	     VARCHAR2		 64	     64
DESCRIPTION	     VARCHAR2	       4000	   4000
SYNOPSIS	     VARCHAR2	       4000	   4000
TOPIC		     VARCHAR2	       4000	   4000
SOLUTION	     VARCHAR2	       4000	   4000
ISSUE_DATE	     DATE		  7	      0
UPDATE_DATE	     DATE		  7	      0
REFERS_TO	     VARCHAR2	       4000	   4000
NOTES		     VARCHAR2	       4000	   4000
ORG_ID		     NUMBER		 22	      0
LOCALLY_MODIFIED     CHAR		  1	      1
CREATED 	     DATE		  7	      0
MODIFIED	     DATE		  7	      0
LAST_MODIFIED	     DATE		  7	      0
SEVERITY_ID	     NUMBER		 22	      0

20 rows selected.

SQL> select column_name, data_type, data_length, char_length from user_tab_columns where table_name = 'RHNERRATATMP';

COLUMN_NAME	     DATA_TYPE	DATA_LENGTH CHAR_LENGTH
-------------------- ---------- ----------- -----------
ID		     NUMBER		 22	      0
ADVISORY	     VARCHAR2		 37	     37
ADVISORY_TYPE	     VARCHAR2		 32	     32
ADVISORY_NAME	     VARCHAR2		 32	     32
ADVISORY_REL	     NUMBER		 22	      0
PRODUCT 	     VARCHAR2		 64	     64
DESCRIPTION	     VARCHAR2	       4000	   4000
SYNOPSIS	     VARCHAR2	       4000	   4000
TOPIC		     VARCHAR2	       4000	   4000
SOLUTION	     VARCHAR2	       4000	   4000
ISSUE_DATE	     DATE		  7	      0
UPDATE_DATE	     DATE		  7	      0
REFERS_TO	     VARCHAR2	       4000	   4000
NOTES		     VARCHAR2	       4000	   4000
ORG_ID		     NUMBER		 22	      0
LOCALLY_MODIFIED     CHAR		  1	      1
CREATED 	     DATE		  7	      0
MODIFIED	     DATE		  7	      0
LAST_MODIFIED	     DATE		  7	      0

19 rows selected.

Comment 6 Jesus M. Rodriguez 2009-01-13 18:05:11 UTC
Created attachment 328896 [details]
full errata description of the errata in question in this bug.

Comment 7 Jesus M. Rodriguez 2009-01-13 18:25:26 UTC
I can't reproduce this error at all. If we can get a reproducible case we need to know the database version and perl dbd driver version.

I'm using:

$ rpm -q perl-DBD-Oracle
perl-DBD-Oracle-1.19-8.el5.i386

$ rpm -qa | grep oracle-instantclient
oracle-instantclient-basic-10.2.0.4-1.i386
oracle-instantclient-devel-10.2.0.4-1.i386
oracle-instantclient-jdbc-10.2.0.4-1.i386

The external db I'm connecting to has the following:

# rpm -qa | grep oracle
oracle-server-i386-10.2.0.4-26.el5

Comment 8 Jesus M. Rodriguez 2009-01-15 03:48:13 UTC
# rpm -q perl-DBD-Oracle
perl-DBD-Oracle-1.22-5.el5

# rpm -qa | grep oracle-instantclient
oracle-instantclient-basic-10.2.0.4-1
oracle-instantclient-devel-10.2.0.4-1
oracle-instantclient-sqlplus-10.2.0.4-1
oracle-instantclient-selinux-10.2-6.el5
oracle-instantclient-jdbc-10.2.0.4-1

# rpm -q oracle-xe-univ
oracle-xe-univ-10.2.0.1-1.0

# rpm -q spacewalk
spacewalk-0.4.2-3.el5

# rpm -q spacewalk-html
spacewalk-html-0.4.17-1.el5

I was able to clone Red Hat Enterprise Linux (v. 5 for 32-bit x86) with
all 625 errata.

Barring a reproducer, I'm marking this as VERIFIED.


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