I ran into an issue earlier this week where I synced my centos 6 repo
with the mirrors and received a traceback when I tried to merge it
with my centos 6 test channel that my client systems use. I could get
all the way to the confirmation stage of the merge but when I clicked
confirm I would get a "500 Internal Server Error" and the traceback.
The traceback looked like this:

    Error message:
    RHN::Exception: DBD::Pg::st execute failed: ERROR: missing
FROM-clause entry for table "rhn_repo_regen_queue_id_seq" at character
141

    RHN::DB /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm 228
RHN::Exception::DB::throw
    RHN::DB::st /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm 564
RHN::DB::handle_error
    RHN::DB::ChannelEditor
/usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/ChannelEditor.pm 221
RHN::DB::st::execute_h
    Sniglets::ListView::PackageList
/usr/lib/perl5/vendor_perl/5.8.8/Sniglets/ListView/PackageList.pm 1917
RHN::DB::ChannelEditor::add_channel_packages
    Sniglets::ListView::PackageList
/usr/lib/perl5/vendor_perl/5.8.8/Sniglets/ListView/PackageList.pm 274
Sniglets::ListView::PackageList::sync_packages_to_channel_cb
    Sniglets::ListView::List
/usr/lib/perl5/vendor_perl/5.8.8/Sniglets/ListView/List.pm 374
Sniglets::ListView::PackageList::default_callback
    Sniglets::Lists /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/Lists.pm
135 Sniglets::ListView::List::callback
    PXT::ApacheHandler
/usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 499
Sniglets::Lists::listview_cb
    PXT::ApacheHandler
/usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 113
PXT::ApacheHandler::pxt_parse_data
    PXT::ApacheHandler
/usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 113 (eval)
    main -e 0 PXT::ApacheHandler::handler
    main -e 0 (eval)

To address that I changed instances of "VALUES
(rhn_repo_regen_queue_id_seq.nextval," to "VALUES
(sequence_nextval('rhn_repo_regen_queue_id_seq')," in
/usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/ChannelEditor.pm

Once that was addressed it led to another traceback that looked like this:

  Error message:
  RHN::Exception: DBD::Pg::st execute failed: ERROR:  column "sysdate"
does not exist at character 252

  RHN::DB /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm 228
RHN::Exception::DB::throw
  RHN::DB::st /usr/lib/perl5/vendor_perl/5.8.8/RHN/DB.pm 564
RHN::DB::handle_error
  RHN::DB::ChannelEditor
/usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/ChannelEditor.pm 222
RHN::DB::st::execute_h
  Sniglets::ListView::PackageList
/usr/lib/perl5/vendor_perl/5.8.8/Sniglets/ListView/PackageList.pm 1917
RHN::DB::ChannelEditor::add_channel_packages
  Sniglets::ListView::PackageList
/usr/lib/perl5/vendor_perl/5.8.8/Sniglets/ListView/PackageList.pm 274
Sniglets::ListView::PackageList::sync_packages_to_channel_cb
  Sniglets::ListView::List
/usr/lib/perl5/vendor_perl/5.8.8/Sniglets/ListView/List.pm 374
Sniglets::ListView::PackageList::default_callback
  Sniglets::Lists /usr/lib/perl5/vendor_perl/5.8.8/Sniglets/Lists.pm
135 Sniglets::ListView::List::callback
  PXT::ApacheHandler
/usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 499
Sniglets::Lists::listview_cb
  PXT::ApacheHandler
/usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 113
PXT::ApacheHandler::pxt_parse_data
  PXT::ApacheHandler
/usr/lib/perl5/vendor_perl/5.8.8/PXT/ApacheHandler.pm 113 (eval)
  main -e 0 PXT::ApacheHandler::handler
  main -e 0 (eval)

This one seems to work if instances of sysdate are replaced with
current_timestamp in
/usr/lib/perl5/vendor_perl/5.8.8/RHN/DB/ChannelEditor.pm like this:

  $sth = $dbh->prepare(<<EOQ);
INSERT
  INTO rhnRepoRegenQueue
        (id, channel_label, client, reason, force, bypass_filters,
next_action, created, modified)
VALUES (sequence_nextval('rhn_repo_regen_queue_id_seq'),
        :label, 'perl-web::remove_errata_from_channel', NULL, 'N',
'N', current_timestamp, current_timestamp, current_timestamp)
EOQ

instead of

  $sth = $dbh->prepare(<<EOQ);
INSERT
  INTO rhnRepoRegenQueue
        (id, channel_label, client, reason, force, bypass_filters,
next_action, created, modified)
VALUES (sequence_nextval('rhn_repo_regen_queue_id_seq'),
        :label, 'perl-web::remove_errata_from_channel', NULL, 'N',
'N', sysdate, sysdate, sysdate)
EOQ

I would try to submit a patch but right now I am trying to see how to
do fix it so that it will work for both postgresql and oracle-xe.
-- 
Thanks,

Eric Lake
O: 859-232-5080

_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel

Reply via email to