Bug 447271 - yum dies when using an http config url
yum dies when using an http config url
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: yum (Show other bugs)
5.2
All Linux
high Severity high
: rc
: ---
Assigned To: James Antill
: ZStream
Depends On:
Blocks: 391501 447398
  Show dependency treegraph
 
Reported: 2008-05-19 04:20 EDT by Issue Tracker
Modified: 2010-10-22 21:05 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 16:43:48 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Issue Tracker 2008-05-19 04:20:28 EDT
Escalated to Bugzilla from IssueTracker
Comment 1 Issue Tracker 2008-05-19 04:20:31 EDT
Description of problem:

Any yum commands using "-c http://server/yumconfigfile" fails with ENOENT error.

How reproducible:

100%

Steps to Reproduce:

Create a valid yum config url.  Use it like this:

yum -c http://server/yumconfigfile search foobar

(or any yum subcommand).

Actual results:

Loading "security" plugin
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 85, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 163, in getOptionsConfig
    disabled_plugins=self.optparser._splitArg(opts.disableplugins))
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 164, in _getConfig
    self._conf = config.readMainConfig(startupconf)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 703, in readMainConfig
    yumconf.config_file_age = os.stat(startupconf.config_file_path)[8]
OSError: [Errno 2] No such file or directory: 'http://server/yumconfigfile'

Expected results:

Proper yum execution of subcommands

Additional info:
==========================================
-bash-3.2# rpm -qi redhat-release
Name        : redhat-release               Relocations: (not relocatable)
Version     : 5Server                           Vendor: Red Hat, Inc.
Release     : 5.2.0.3                       Build Date: Mon 14 Jan 2008 04:26:42 PM UTC
Install Date: Fri 16 May 2008 04:22:42 PM UTC      Build Host: ls20-bc1-14.build.redhat.com
Group       : System Environment/Base       Source RPM: redhat-release-5Server-5.2.0.3.src.rpm
Size        : 150160                           License: GPL
Signature   : DSA/SHA1, Thu 17 Jan 2008 11:08:35 PM UTC, Key ID fd372689897da07a
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary     : Red Hat Enterprise Linux release file
Description :
Red Hat Enterprise Linux release files
==========================================

I have also verified that yum is treating the http url as a regular unix file.  That is, it's stat'ing it, and it will actually open and use a file at the relative path http://server/yumconfigfile within the unix filesystem.
This event sent from IssueTracker by mpoole  [Support Engineering Group]
 issue 180836
Comment 2 Issue Tracker 2008-05-19 04:20:32 EDT
John, I had a few spare cycles over the weekend and duplicated this. Looks
like this was broken in the rebase somewhere between 3.0.1-5 available in
RHEL5.1 and 3.2.8-4 in RHEL5.2beta. I don't see an existing BZ on this
and am sending it up to engineering straight away. 

- James


Category set to: Applications::Bug Fix
Status set to: Waiting on Tech

This event sent from IssueTracker by mpoole  [Support Engineering Group]
 issue 180836
Comment 3 Issue Tracker 2008-05-19 04:20:34 EDT
1. Provide time and date of the problem: N/A

   2. Provide clear and concise problem description as it is understood at
the time of escalation
          * Observed behavior: yum -c http://server/yum.conf produces the
following traceback.
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.main(sys.argv[1:])
  File "/usr/share/yum-cli/yummain.py", line 85, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 163, in getOptionsConfig
    disabled_plugins=self.optparser._splitArg(opts.disableplugins))
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 164, in
_getConfig
    self._conf = config.readMainConfig(startupconf)
  File "/usr/lib/python2.4/site-packages/yum/config.py", line 703, in
readMainConfig
    yumconf.config_file_age = os.stat(startupconf.config_file_path)[8]
OSError: [Errno 2] No such file or directory:
'http://erin.usersys.redhat.com/yum.conf'

          * Desired behavior: yum -c http://server/yum.conf should work 

   3. State specific action requested of SEG:
Identify where this is broken and patch

   4. State whether or not a defect in the product is suspected
          * Provide Bugzilla if one already exists: No known BZ

   1. State other actions already taken in working the problem:
          Searched all resources and unable to find an existing bug or
workaround.

   3. Attach other supporting data
Found in yum-3.2.8-7.el5.noarch.rpm (5.2 beta channel). Note that this
works in yum-3.0.1-5.el5.noarch.rpm (RHEL 5.1 channel).

   4. Provide issue repro information:
         Simply mv /etc/yum.conf to a server running a http and try
running with -c argument, "yum -c http://erin.usersys.redhat.com/yum.conf
update"

You can use erin.usersys.redhat.com for quick verification.

- James


Issue escalated to Support Engineering Group by: jabrown.
Internal Status set to 'Waiting on SEG'

This event sent from IssueTracker by mpoole  [Support Engineering Group]
 issue 180836
Comment 4 Issue Tracker 2008-05-19 04:20:35 EDT
This may be of some help
https://lists.dulug.duke.edu/pipermail/yum-cvs-commits/2007-July/001801.html


This event sent from IssueTracker by mpoole  [Support Engineering Group]
 issue 180836
Comment 5 RHEL Product and Program Management 2008-05-19 04:36:37 EDT
This bugzilla has Keywords: Regression.  

Since no regressions are allowed between releases, 
it is also being proposed as a blocker for this release.  

Please resolve ASAP.
Comment 6 James Antill 2008-05-19 08:58:23 EDT
 This fixes it for me (config.py):

-    yumconf.config_file_age = os.stat(startupconf.config_file_path)[8]
+    if os.path.exists(startupconf.config_file_path):
+        yumconf.config_file_age = os.stat(startupconf.config_file_path)[8]
+    else:
+        yumconf.config_file_age = 0

...I'm just not sure what we do at this point in the 5.2 release, esp. as we are
going to do a big update for 5.3.
Comment 29 errata-xmlrpc 2009-01-20 16:43:48 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0176.html

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