Bug 147989
Summary: | fix the csv module used by rhn-download-manager so it's compatible with csv module used in Python 2.3+ | ||
---|---|---|---|
Product: | [Retired] Red Hat Network | Reporter: | John Wregglesworth <wregglej> |
Component: | RHN/Backend | Assignee: | John Wregglesworth <wregglej> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Red Hat Satellite QA List <satqe-list> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | rhn370 | CC: | mihai.ibanescu, rhn-bugs |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | rhn370 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2005-09-29 20:51:53 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: |
Description
John Wregglesworth
2005-02-14 16:16:48 UTC
The csv module has changed considerably between the version used in rhn_csv and what's included in the Python distribution now. I modified rhn_csv to use the old stuff if it's being run on a system with a pre-2.3 version of Python, but otherwise it takes advantage of the new csv module in Python 2.3+. I modified rhn_csv again because misa pointed out that another version of it already exists in rhn/scripts. I copied the version in rhn/scripts over to client/download-manager and renamed it csv_lib.py. I modified rhn_csv.py to use the stuff in csv_lib.py, and in turn modified download_manager.py to use the new stuff in rhn_csv.py. I'm working on a test plan. NOTE: Steps 1-6 are the same as steps 1-6 in the test plan for 147991 and 147988. If you've already done either of those, 1-6 shouldn't need to be repeated. 1. If you don't already have the rhn_superuser role in the environment that you're testing in, ask someone to grant it to your user. Once you have the rhn_superuser role, you need to set up your user with the role through the web interface. 2. Now have chris or misa either create a new channel that you can associate downloads with. The new channel needs to be on whatever environment you're testing against. 3. Put together some tarballs with some random stuff in them. It shouldn't matter what the tarballs have in them. 4. Have someone create a new directory in whatever environment you will be testing in. This directory should be under the mount_point, which is defined in the rhn_server.conf file in /etc/rhn/defaults/. 5. Once you have the path to the new directory, get the file size and md5sum and create a csv file. You can get the format that the csv file needs to be in by running rhn-download-manager using the --list <channelName> option. It doesn't matter what channel you use, but I'd recommend one with a small number of packages in it. At least one of the files should have a download_type of "channel-xml-dump". 6. Next, have someone place the tarballs you made in step 2 in the directory that was made in step 3. 7. Now, using the csv file created in step 4, run the --upload, --delete, and --list commands on a machine using Python 2.2. There shouldn't be any problems. Examples: python download_manager.py --server=qa --username=foo --password=bar --list test-channel0 python download_manager.py --server=qa --username=foo --password=bar --upload downloads.csv --commit python download_manager.py --server=qa --username=foo --password=bar --delete downloads.csv --commit 8.Finally, using the csv file created in step 4, run the --upload, --delete, and --list commands on a machine using Python 2.3 or later. The commands look the same as the ones in the example above. There shouldn't be any errors. Note: If you run the --upload command more than once with the same .csv file you will need to use the --force option to avoid the file modified error. This change was for an internal tool and is already in use. |