Bug 1303982 - PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: redhat-upgrade-tool (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Michal Bocek
Release Test Team
: Extras
Depends On:
  Show dependency treegraph
Reported: 2016-02-02 10:40 EST by Jaroslav Škarvada
Modified: 2016-11-04 05:02 EDT (History)
6 users (show)

See Also:
Fixed In Version: redhat-upgrade-tool-0.7.45-1.el6
Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-11-04 05:02:47 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Debug data (4.17 MB, application/x-gzip)
2016-02-02 10:40 EST, Jaroslav Škarvada
no flags Details
Log (1.03 MB, application/x-gzip)
2016-02-02 11:01 EST, Jaroslav Škarvada
no flags Details
/usr/bin/redhat-upgrade-tool with logging fix (18.04 KB, text/plain)
2016-02-04 10:06 EST, David Shea
no flags Details
Logs (4.63 MB, application/x-gzip)
2016-02-05 10:47 EST, Jaroslav Škarvada
no flags Details
Logs (4.62 MB, application/x-gzip)
2016-02-05 11:48 EST, Jaroslav Škarvada
no flags Details

  None (edit)
Description Jaroslav Škarvada 2016-02-02 10:40:43 EST
Created attachment 1120476 [details]
Debug data

Description of problem:
I was trying to upgrade from RHEL-6.7 to RHEL-7.2, but the upgrade process failed.

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

How reproducible:

Steps to Reproduce:
1. cd /etc/yum.repos.d
2. wget 'http://git.app.eng.bos.redhat.com/git/preupgrade-assistant.git/plain/repo-files/preupgrade-el6.repo'
3. yum install redhat-upgrade-tool preupgrade-assistant-contents
4. preupg --force -s RHEL6_7
5. redhat-upgrade-tool-cli --cleanup-post --addrepo optional=http://download.devel.redhat.com/released/RHEL-7/7.2/Server-optional/x86_64/os/ --instrepo=http://download.devel.redhat.com/released/RHEL-7/7.2/Server/x86_64/os --network 7.2

Actual results:
Downloading failed: Při stahování balíčků došlo k chybě.
  crash-7.0.2-6.el7.x86_64: failure: Packages/crash-7.0.2-6.el7.x86_64.rpm from cmdline-instrepo: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
  perl-Test-Harness-3.28-2.el7.noarch: failure: Packages/perl-Test-Harness-3.28-2.el7.noarch.rpm from cmdline-instrepo: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
  ttmkfdir-3.0.9-41.el7.x86_64: failure: Packages/ttmkfdir-3.0.9-41.el7.x86_64.rpm from cmdline-instrepo: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
  7:lvm2-2.02.105-14.el7.x86_64: failure: Packages/lvm2-2.02.105-14.el7.x86_64.rpm from cmdline-instrepo: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
  gtk3-3.8.8-5.el7.x86_64: failure: Packages/gtk3-3.8.8-5.el7.x86_64.rpm from cmdline-instrepo: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
  pulseaudio-libs-3.0-22.el7.x86_64: failure: Packages/pulseaudio-libs-3.0-22.el7.x86_64.rpm from cmdline-instrepo: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"

Expected results:
No errors

Additional info:
Comment 2 David Shea 2016-02-02 10:57:45 EST
Please attach /var/log/redhat_upgrade_tool.log.

The versions of the packages in the errors are from RHEL 7.1, so it looks like something went wrong in the repo setup.
Comment 3 Jaroslav Škarvada 2016-02-02 11:01 EST
Created attachment 1120486 [details]
Comment 4 David Shea 2016-02-04 10:06 EST
Created attachment 1121125 [details]
/usr/bin/redhat-upgrade-tool with logging fix

There's a bug in the logging in the main script. I've attached a new version of the main redhat-upgrade-tool script. Can you replace the script in /usr/bin with the attachment, run redhat-upgrade-tool again, and attach the /var/log/redhat_upgrade_tool.log from that?

The diff is just this:

diff --git a/redhat-upgrade-tool.py b/redhat-upgrade-tool.py
index 0a614ee..28caef2 100755
--- a/redhat-upgrade-tool.py
+++ b/redhat-upgrade-tool.py
@@ -46,7 +46,7 @@ from preup import xccdf
 from preup import settings
 import logging
-log = logging.getLogger("redhat-upgrade-tool")
+log = logging.getLogger("redhat_upgrade_tool.main")
 def message(m):
     print m
Comment 5 Jaroslav Škarvada 2016-02-04 10:25:30 EST
Ups, I have just returned the machine. I will take another, but it may take some time.
Comment 6 Jaroslav Škarvada 2016-02-05 10:47 EST
Created attachment 1121424 [details]

Different machine, different error:
getting boot images...
.treeinfo                                                | 2.2 kB     00:00     
setting up update...
verify local files 100% [======================================================]
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Importing GPG key 0xFD431D51:
 Userid : Red Hat, Inc. (release key 2) <security@redhat.com>
 Package: redhat-release-server-6Server- (@anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
Importing GPG key 0x2FA658E0:
 Userid : Red Hat, Inc. (auxiliary key) <security@redhat.com>
 Package: redhat-release-server-6Server- (@anaconda-RedHatEnterpriseLinux-201507020259.x86_64/6.7)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Downloading failed: Didn't install any keys
Comment 7 David Shea 2016-02-05 10:52:55 EST
The key error is normal. redhat-upgrade-tool attempts to check gpg signatures by default, and the packages on download.devel are not signed. You can add --nogpgcheck to the command line for that.

Obviously this isn't the most friendly failure mode. I think there's a bug open to ask the user whether to add the keys, like yum does, instead of just failing.
Comment 8 Jaroslav Škarvada 2016-02-05 11:06:58 EST
Thanks, it finished OK. I will retry on another machine and will try to exactly reproduce the steps that lead to the failure.
Comment 9 Jaroslav Škarvada 2016-02-05 11:48 EST
Created attachment 1121453 [details]

I finally reproduced the problem by using the following steps (some may be redundant):
# cd /etc/yum.repos.d
# wget 'http://git.app.eng.bos.redhat.com/git/preupgrade-assistant.git/plain/repo-files/preupgrade-el6.repo'
# cd
# yum install redhat-upgrade-tool preupgrade-assistant-contents
# redhat-upgrade-tool-cli --cleanup-post --addrepo optional=http://download.devel.redhat.com/released/RHEL-7/7.0/Server-optional/x86_64/os/ --instrepo=http://download.devel.redhat.com/released/RHEL-7/7.0/Server/x86_64/os --network 7.0
# preupg --force -s RHEL6_7
# redhat-upgrade-tool-cli --cleanup-post --addrepo optional=http://download.devel.redhat.com/released/RHEL-7/7.0/Server-optional/x86_64/os/ --instrepo=http://download.devel.redhat.com/released/RHEL-7/7.0/Server/x86_64/os --network 7.0
# redhat-upgrade-tool-cli --cleanup-post --addrepo optional=http://download.devel.redhat.com/released/RHEL-7/7.0/Server-optional/x86_64/os/ --instrepo=http://download.devel.redhat.com/released/RHEL-7/7.2/Server/x86_64/os --network 7.2
# redhat-upgrade-tool-cli --cleanup-post --addrepo optional=http://download.devel.redhat.com/released/RHEL-7/7.2/Server-optional/x86_64/os/ --instrepo=http://download.devel.redhat.com/released/RHEL-7/7.2/Server/x86_64/os --network 7.2

I think the last two steps are important. The cache/workdir is probably not cleared.
Comment 10 David Shea 2016-02-08 10:06:19 EST
I see. The quick fix is don't do that ;-)  I'll add a check for whether there is an existing upgrade directory and print a message about it needing to be cleaned before another upgrade can be run.
Comment 11 Michal Bocek 2016-07-27 13:20:01 EDT
Fix prepared:
This is a minor bug so it will be added to a next version of the tool.
Comment 14 errata-xmlrpc 2016-11-04 05:02:47 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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