Bug 180347
Summary: | Link for packages pushed with rhnpush does not show up sometimes. | ||
---|---|---|---|
Product: | [Retired] Red Hat Network | Reporter: | John Wregglesworth <wregglej> |
Component: | RHN/Backend | Assignee: | Pradeep Kilambi <pkilambi> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Max Spevack <mspevack> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rhn400 | CC: | bretm, rhn-bugs, tsanders, wregglej |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | rhn406 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-03-15 19:07:26 UTC | Type: | --- |
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: | 178198, 185091, 185572 |
Description
John Wregglesworth
2006-02-07 14:44:23 UTC
Bug reproduced and fixed as follows: before fix: eg: - rhnpush -vvvv -cpushstuffhere --server=localhost --nosig zip-2.3-16.i386.rpm --header - on web UI package details page link appears without download links(expected) - rhnpush -vvvv -cpushstuffhere --server=localhost --nosig zip-2.3-16.i386.rpm - package details page does'nt show the download link. bug is that first when we run rhnpush with --header it puts the metadata info on to the db . But next time when rhnpush without --header in step two it thinks the package already exists based on metadata info.This is wrong. The desired behaviour here should be that it should check the path of the package on the db and also that the path exists on the file system. this additional condition is included in file: svn/rhn/eng/backend/server/rhnPackage/upload in push_package method as a fix. there are four cases here: case 1:checks if the path exists in the db and also on the file system. if it does then no need to copy anything just do the usual. case2: file exists on file system but path not in db.then add the relative path to the db 'path' field quering based on md5sum of the pkg case3: if no file on file system but path exists.then we write the file to file system case4: file does'nt exists on File System and no path in db .then we write both. this fixed the problem. after the fix: eg: - rhnpush -vvvv -cpushstuffhere --server=localhost --nosig zip-2.3-16.i386.rpm --header - on web UI package details page link appears without download links(expected) - rhnpush -vvvv -cpushstuffhere --server=localhost --nosig zip-2.3-16.i386.rpm - package details page shows the download link(expected). this fixes the bug. the fix checked into HEAD and RELEASE 4.0 oops the file path above is:
>file: svn/rhn/eng/backend/server/rhnPackage/upload in push_package method as a
>fix.
file: svn/rhn/eng/backend/server/rhnPackageUpload.py in push_package method as a
fix.
upload with --header (no download link, as expected) upload again, package download is available rhnpush-4.0.5-70.rhel4 PASSES_QA RELEASE_PENDING Apparently the bug is tested for binary rpms but not the source.. added a fix to see that the following works .. The problem is when the uploadPackages is called on the server it does a query to get the packagepath from the db .It was quering thet from rhnpackages.this works fine if its a binary rpm .but for source rpms it has to query a different table rhnpackagesource ..that why its erring off saying unscriptable object as follows ... Exception Handler Information Traceback (most recent call last): File "/usr/share/rhn/server/apacheUploadServer.py", line 93, in _wrapper ret = function(req) File "/usr/share/rhn/upload_server/handlers/package_push/package_push.py", line 133, in handler relative_path=self.rel_package_path, org_id=self.org_id) File "/usr/share/rhn/server/rhnPackageUpload.py", line 258, in push_package path_dict = rs_path[0] TypeError: unsubscriptable object Test Plan: - take a bunch of src.rpms of rhel-3 and push as follows: [root@fjs-0-08 ~]# rhnpush -vvv -cpush-pkg-3 -cpush-pkgs --server=http://rlx-2-20.rhndev.redhat.com --dir test/ --source --nosig - now take a similar set of packages but now (may be different version) and do the same: [root@fjs-0-08 ~]# rhnpush -vvv -cpush-pkg-3 -cpush-pkgs --server=http://rlx-2-20.rhndev.redhat.com --dir test2/ --source --nosig now it should not error off ..similarly i tested it for binaries and works fine ..
> Test Plan:
>
> - take a bunch of src.rpms of rhel-3 and push as follows:
>
sorry! does'nt have to be rhel 3 any two packages that differ to enable
packages.diff on the server
comment #6 and comment #7 do not apply to this bug any more, see 185091 Closing upon release of RHN 406 |