Bug 150675 - Deleting a package from a custom channel causes a 500 Error
Deleting a package from a custom channel causes a 500 Error
Status: CLOSED CURRENTRELEASE
Product: Red Hat Network
Classification: Red Hat
Component: RHN/Web Site (Show other bugs)
rhn370
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike McCune
Max Spevack
https://rhn.webdev.redhat.com/network...
:
Depends On:
Blocks: 145821
  Show dependency treegraph
 
Reported: 2005-03-09 10:35 EST by John Wregglesworth
Modified: 2007-04-18 13:20 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-04-08 12:31:34 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Wregglesworth 2005-03-09 10:35:02 EST
Description of problem: I have a channel I've made called
testchannel1. When I try to delete a package from the packages tab of
the channel by clicking on the Remove Packages button, I get a 500
error. Here's the traceback:

The following exception occured while executing this request:
 GET
/network/software/channels/manage/packages/remove_confirm.pxt?cid=11267&set_label=packages_to_remove
HTTP/1.1 (from browser)
 /network/software/channels/manage/packages/remove_confirm.pxt (from
Apache)

Date:
  Wed Mar  9 10:21:51 2005

Headers:
  Accept:
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
  Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
  Accept-Encoding: gzip,deflate
  Accept-Language: en-us,en;q=0.5
  Connection: close
  Cookie:
rh_auth_token=3909105:1110381710x3f0b78f65cf100ae2b77b6cd26124834;
pxt-session-cookie=1010602222x9fd75bcf8a3a5727c6fd9cab3c9e60c0
  Host: rhnweb.back-webdev.redhat.com
  Referer:
https://rhn.webdev.redhat.com/network/software/channels/manage/packages/package_list.pxt?cid=11267
  User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041107 Firefox/1.0
  Via: 1.1 rhn.webdev.redhat.com
  X-ENV-HTTPS: on
  X-Forwarded-For: 172.16.59.61
  X-Host: rhn.webdev.redhat.com
  X-Proxy-Forwarded-For: 172.16.59.61
  X-Proxy-Forwarded-Host: rhn.webdev.redhat.com
  X-Proxy-Forwarded-Server: rhn.webdev.redhat.com
  X-Replace-Content-Active: 1
  X-Server-Hostname: rhn.webdev.redhat.com

Form variables:
  cid => 11267
  set_label => packages_to_remove

User Information:
  User wregglej (id 3909105, org_id 4459246)

Error notes:
  (none)

Initial Request:
  Yes

Error message:
  RHN::Exception: Provider for 'package_ids_in_set' failed to provide
column 'NVRE'
Row data:  $VAR1 = {
          'NVREA' => 'neon-0.24.7-1.i386',
          'ID' => '290536'
        };

  Sniglets::ListView::List /var/www/lib/Sniglets/ListView/List.pm 1049
RHN::Exception::throw
  Sniglets::Lists /var/www/lib/Sniglets/Lists.pm 117
Sniglets::ListView::List::render
  PXT::Parser /var/cvs/rhn/web/modules/pxt/PXT/Parser.pm 160
Sniglets::Lists::listview
  PXT::Parser /var/cvs/rhn/web/modules/pxt/PXT/Parser.pm 72
PXT::Parser::expand_tag
  PXT::ApacheHandler /var/cvs/rhn/web/modules/pxt/PXT/ApacheHandler.pm
618 PXT::Parser::expand_tags
  PXT::ApacheHandler /var/cvs/rhn/web/modules/pxt/PXT/ApacheHandler.pm
110 PXT::ApacheHandler::pxt_parse_data
  PXT::ApacheHandler /var/cvs/rhn/web/modules/pxt/PXT/ApacheHandler.pm
110 (eval)
  main /dev/null 0 PXT::ApacheHandler::handler
  main /dev/null 0 (eval)
Comment 1 Bret McMillan 2005-03-09 15:56:15 EST
Mike, nvre vs nvrea again.  Can we fire up grep and see if we're exposed
anywhere else?

One possible solution would be to have both nvre and nvrea the affected
datasource queries...
Comment 2 Mike McCune 2005-03-09 18:21:55 EST
TEST PLAN:

1) Nav to the Channels tab
2) Pick a channel with packages
3) Click the packages tab
4) Click List/Remove Packages
5) Select a few packages
6) Click remove packages
7) Verify that the next page comes up OK
8) Verify that the items under that list end with the arch value:

4Suite-1.0-3.i386
a2ps-4.13b-41.i386
acl-2.2.23-5.i386 

9) Verify that the column header says: "Package" instead of the old "Package
Name" value.
Comment 3 Mike McCune 2005-03-09 18:26:59 EST
Bret, 
I grepped through the code again this time looking for all places where we use
"nvre" and verified that none are in the Channels set of pages.  Before my fix
the below list included the file I checked in but now if you scan the list you
will see that nvre is being used only in places outside the scope of a channel
package list.

./network/errata/manage/packages/add.pxt:37:<rhn-listview
class="Sniglets::ListView::PackageList" mode="packages_available_to_errata"
alphabar_column="package_nvre">
./network/errata/manage/packages/add.pxt:46:  <column name="Package"
label="package_nvre" sort_by="1">
./network/errata/manage/packages/package_list.pxt:30:<rhn-listview
class="Sniglets::ListView::PackageList" mode="packages_in_errata"
alphabar_column="package_nvre">
./network/errata/manage/packages/package_list.pxt:38:  <column name="Package
Name" label="package_nvre" sort_by="1">
./network/profiles/package-list.pxt:20:<rhn-listview
class="Sniglets::ListView::ProfileList" mode="profile_package_overview"
alphabar_column="package_nvre">
./network/profiles/package-list.pxt:25:    <column name="Package"
label="package_nvre" align="left" sort_by="1" />
./network/schedule/package_list.pxt:30:  <column name="Package Name" label="nvre" />
./network/software/packages/manage/delete_confirm.pxt:28:    <column
name="Package Name" label="nvre" align="left">
./network/software/packages/manage/index.pxt:42:<rhn-listview
class="Sniglets::ListView::PackageList" mode="packages_owned_by_org"
alphabar_column="package_nvre">
./network/software/packages/manage/index.pxt:50:  <column name="Package"
label="package_nvre" width="50%" sort_by="1">
./network/software/packages/name_overview.pxt:28:      <column name="Name"
label="nvre" align="left">
./network/systems/details/history/snapshots/unservable_packages.pxt:38:<rhn-listview
class="Sniglets::ListView::PackageList" mode="snapshot_unservable_package_list"
alphabar_column="nvre">
./network/systems/details/history/snapshots/unservable_packages.pxt:46:   
<column name="Package" label="nvre" align="left" width="100%" sort_by="1"/>
./network/systems/details/kickstart/missing_packages.pxt:41:<rhn-listview
class="Sniglets::ListView::PackageList" mode="missing_packages_for_session"
alphabar_column="nvre">
./network/systems/details/kickstart/missing_packages.pxt:46:    <column
name="Package" label="nvre" sort_by="1">
./network/systems/details/packages/profiles/missing_packages.pxt:42:    <column
name="Package" label="nvre">
./network/systems/details/packages/profiles/schedule_sync.pxt:39:    <column
name="Package" label="nvre" align="left" width="30%"/>
./network/systems/details/packages/download.pxt:39:<rhn-listview
class="Sniglets::ListView::PackageList"
mode="package_download_for_system_arch_select" alphabar_column="nvre"
style="package_download">
./network/systems/details/packages/download.pxt:51:    <column name="Package"
label="nvre" align="left" sort_by="1">
./network/systems/details/packages/install.pxt:41:    <column name="Package
Name" label="nvre" sort_by="1" align="left">
./network/systems/details/packages/install_confirm.pxt:57:    <column
name="Package For Answer File" label="nvre" align="left">
./network/systems/details/packages/install_confirm.pxt:62:    <column
name="Package Name" label="nvre" align="left">
./network/systems/details/packages/package_list.pxt:47:<rhn-listview
class="Sniglets::ListView::PackageList" mode="system_package_list"
alphabar_column="nvre">
./network/systems/details/packages/package_list.pxt:50:    <column name="Package
Name" label="nvre" align="left" width="95%" sort_by="1">
./network/systems/details/packages/remove_confirm.pxt:37:    <column
name="Package Name" label="nvre" align="left">
./network/systems/details/packages/upgrade.pxt:32:<rhn-listview
class="Sniglets::ListView::PackageList" mode="system_upgradable_package_list"
alphabar_column="nvre">
./network/systems/details/packages/upgrade.pxt:42:    <column name="Latest
Package" label="nvre" align="left" sort_by="1">
./network/systems/details/packages/upgrade.pxt:46:    <column name="Installed
Package" label="installed_package_nvre" align="left" />
./network/systems/details/packages/upgrade_confirm.pxt:52:    <column
name="Package Name" label="nvre" align="left">
./network/systems/details/packages/verify.pxt:41:    <column name="Package Name"
label="nvre" sort_by="1" align="left">
./network/systems/details/packages/verify_confirm.pxt:43:    <column
name="Package For Answer File" label="nvre" align="left">
./network/systems/details/packages/verify_confirm.pxt:48:    <column
name="Package Name" label="nvre" align="left">
./network/systems/ssm/packages/choose_answer_files.pxt:40:    <column
name="Package For Answer File" label="nvre" align="left">
./network/systems/ssm/packages/remove.pxt:25:	<column name="Name" label="nvre"
sort_by="1" align="left" width="80%" />
./network/systems/ssm/packages/upgrade.pxt:24:  <column name="Name" label="nvre"
sort_by="1" width="50%" align="left" />
./network/systems/ssm/packages/upgrade_conf.pxt:28:  <column name="Package"
label="nvre" align="left" />
./network/systems/ssm/packages/verify.pxt:25:	<column name="Name" label="nvre"
sort_by="1" align="left" width="80%" />
./network/systems/ssm/provisioning/missing_packages.pxt:30:    <column
name="Package" label="nvre" />
Comment 4 Fanny Augustin 2005-03-15 10:04:04 EST
Your test plan is not clear:

Every time you click on a channel->packages, you are presented with the list of
packages on that channel.  Not with a list/remove packages option as described
by your test plan.  Could you please revisit you test plan and fix accordingly?
 Thanks.
Comment 5 Mike McCune 2005-03-15 12:28:55 EST
Fanny, sorry for the confusion, new TEST PLAN:

0) Nav to the Channels tab 
1) Click Manage Software Channels on the left nav
2) Pick a custom channel with packages
3) Click the packages tab
4) Click List/Remove Packages
5) Select a few packages
6) Click remove packages
7) Verify that the next page comes up OK
8) Verify that the items under that list end with the arch value:

4Suite-1.0-3.i386
a2ps-4.13b-41.i386
acl-2.2.23-5.i386 

9) Verify that the column header says: "Package" instead of the old "Package
Name" value.
Comment 6 Max Spevack 2005-03-15 17:00:00 EST
Mike, I ran through this testplan and it worked fine against a
satellite running all the most recent code.  You can go into a managed
software channel, remove some packages, and not get any errors. 
Furthermore, the labesls on the columns are correct, and the package
names that are about to be removed end with the arch.

PROD_READY
Comment 7 Todd Warner 2005-04-08 12:31:34 EDT
mass move: PROD_READY --> CLOSED:CURRENTRELEASE

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