Bug 207976 - rhnpush --force gives an ISE with --nullorg option as superuser
Summary: rhnpush --force gives an ISE with --nullorg option as superuser
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Network
Classification: Retired
Component: RHN/Backend
Version: rhn420
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Pradeep Kilambi
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks: 166615
TreeView+ depends on / blocked
 
Reported: 2006-09-25 16:46 UTC by Pradeep Kilambi
Modified: 2007-04-18 17:50 UTC (History)
1 user (show)

Fixed In Version: rhn500h
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-03-20 01:13:58 UTC
Embargoed:


Attachments (Terms of Use)

Description Pradeep Kilambi 2006-09-25 16:46:49 UTC
Description of problem:

Basically, rhnpush does'nt allow users to use --force on nullorg
channels, in other words as superusers. The problem for getting a 500
error was that  the client was not passing the force as true in some
initial call. This skipped the check on server and later throws a ISE
500 error as we saw in the push. ex:

[root@prad rpms]# rhnpush --server=scripts.back-webdev.redhat.com
--username=rhn-noc --password=xxx swig-1.3.21-6.i386.rpm --force
--nullorg -vvv --channel=test-push
Connecting to http://scripts.back-webdev.redhat.com/APP
url is http://scripts.back-webdev.redhat.com/PACKAGE-PUSH
Result codes: 200 OK
Computing md5sum and package Info .This may take sometime ...

Uploading package swig-1.3.21-6.i386.rpm
Using POST request
Internal server error 500 Internal Server Error

Waiting 1 seconds and trying again...
Uploading package swig-1.3.21-6.i386.rpm
Using POST request
Internal server error 500 Internal Server Error

Waiting 3 seconds and trying again...
Uploading package swig-1.3.21-6.i386.rpm
Using POST request
Internal server error 500 Internal Server Error

Waiting 4 seconds and trying again...
Giving up after 3 attempts 

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


How reproducible:

always

Steps to Reproduce:
1. push pkg with --force and --nullorg as a rhnsuperuser
2. should get an ISE 500 error

  
Actual results:

ISE 500 error. 

Expected results:

[root@prad rpms]# rhnpush --server=scripts.back-webdev.redhat.com
--username=rhn -noc --password=redhat swig-1.3.21-6.i386.rpm --force
--nullorg -vvv --channel=t est-push
Connecting to http://scripts.back-webdev.redhat.com/APP
url is http://scripts.back-webdev.redhat.com/PACKAGE-PUSH
Result codes: 200 OK
Computing md5sum and package Info .This may take sometime ...

Error Message:
    Cannot force push
Error Class Code: 4
Error Class Info: Permission denied.
Explanation:
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.

Comment 1 Pradeep Kilambi 2006-09-25 16:54:31 UTC
the fix for this is we are not passing in force as true even though we have
--force specified. On the server in the authenticate_session call will check 

if null_org:
    if force:
       raises the rhnfault that " cannot force push"

as we do not allow su to force push i.e nullorg channels.

with the fix we should see something like this:

[root@prad rpms]# rhnpush --server=scripts.back-webdev.redhat.com
--username=rhn -noc --password=xxx swig-1.3.21-6.i386.rpm --force
--nullorg -vvv --channel=test-push
Connecting to http://scripts.back-webdev.redhat.com/APP
url is http://scripts.back-webdev.redhat.com/PACKAGE-PUSH
Result codes: 200 OK
Computing md5sum and package Info .This may take sometime ...

Error Message:
    Cannot force push
Error Class Code: 4
Error Class Info: Permission denied.
Explanation:
     An error has occurred while processing your request. If this problem
     persists please enter a bug report at bugzilla.redhat.com.
     If you choose to submit the bug report, please be sure to include
     details of what you were trying to do when this error occurred and
     details on how to reproduce this problem.

Comment 2 Corey Welton 2007-01-24 16:59:13 UTC
QA Verified -- user is given perm denied (expected behaviour) and does not get a
500 ISE

Comment 3 Corey Welton 2007-03-08 15:51:53 UTC
Prad has confirmed this fix has made its way into stage, also.


Comment 4 Brandon Perkins 2007-03-13 14:18:56 UTC
Closed in rhn500h Release.

Comment 5 Brandon Perkins 2007-03-13 17:55:21 UTC
Closed in rhn500h release.

Comment 6 Brandon Perkins 2007-03-13 20:38:40 UTC
Closed in rhn500h Release.

Comment 7 Brandon Perkins 2007-03-13 20:55:30 UTC
Closed in rhn500h Release.


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