Closed JJDC982 closed 3 years ago
I'm not sure how that URL is being generated, but it's very wrong. The URL for ol7_latest is https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/
Could you please change set -e
to set -ex
on line 9 of the script and paste the full output? Use triple backtickts to format it as console output.
Hi Avi, Thanks for answering so fast, I changed the “-e” to “-ex” on line 9 and this is the output :
***@***.*** Downloads]# sudo bash centos2ol.sh
+ unset CDPATH
+ yum_url=https://yum.oracle.com
+ github_url=https://github.com/oracle/centos2ol/
+ bad_packages=(centos-backgrounds centos-logos centos-release centos-release-cr desktop-backgrounds-basic centos-release-advanced-virtualization centos-release-ansible26 centos-release-ansible-27 centos-release-ansible-28 centos-release-ansible-29 centos-release-azure centos-release-ceph-jewel centos-release-ceph-luminous centos-release-ceph-nautilus centos-release-ceph-octopus centos-release-configmanagement centos-release-dotnet centos-release-fdio centos-release-gluster40 centos-release-gluster41 centos-release-gluster5 centos-release-gluster6 centos-release-gluster7 centos-release-gluster8 centos-release-gluster-legacy centos-release-messaging centos-release-nfs-ganesha28 centos-release-nfs-ganesha30 centos-release-nfv-common centos-release-nfv-openvswitch centos-release-openshift-origin centos-release-openstack-queens centos-release-openstack-rocky centos-release-openstack-stein centos-release-openstack-train centos-release-openstack-ussuri centos-release-opstools centos-release-ovirt42 centos-release-ovirt43 centos-release-ovirt44 centos-release-paas-common centos-release-qemu-ev centos-release-qpid-proton centos-release-rabbitmq-38 centos-release-samba411 centos-release-samba412 centos-release-scl centos-release-scl-rh centos-release-storage-common centos-release-virt-common centos-release-xen centos-release-xen-410 centos-release-xen-412 centos-release-xen-46 centos-release-xen-48 centos-release-xen-common libreport-centos libreport-plugin-mantisbt libreport-plugin-rhtsupport python3-syspurpose python-oauth sl-logos yum-rhn-plugin)
+ reinstall_all_rpms=false
+ verify_all_rpms=false
+ install_uek_kernel=true
+ getopts hrkV option
++ id -u
+ '[' 0 -ne 0 ']'
+ echo 'Checking for required packages...'
Checking for required packages...
+ for pkg in rpm yum curl
+ dep_check rpm
+ have_program rpm
+ hash rpm
+ for pkg in rpm yum curl
+ dep_check yum
+ have_program yum
+ hash yum
+ for pkg in rpm yum curl
+ dep_check curl
+ have_program curl
+ hash curl
+ echo 'Checking your distribution...'
Checking your distribution...
++ rpm -q --whatprovides /etc/redhat-release
+ old_release=centos-release-7-3.1611.el7.centos.x86_64
++ echo centos-release-7-3.1611.el7.centos.x86_64
++ wc -l
+ '[' 1 -ne 1 ']'
+ false
+ case "${old_release}" in
++ rpm -q centos-release-7-3.1611.el7.centos.x86_64 --qf '%{version}'
+ os_version=7
+ major_os_version=7
+ true
+ base_packages=(basesystem initscripts oracle-logos kernel-uek)
+ case "$os_version" in
+ repo_file=public-yum-ol7.repo
+ new_releases=(oraclelinux-release oraclelinux-release-el7 redhat-release-server)
+ base_packages=("${base_packages[@]}" plymouth grub2 grubby)
+ packages_to_replace=([epel-release]="oracle-epel-release-el${major_os_version}")
+ declare -A packages_to_replace
+ for package_name in '"${!packages_to_replace[@]}"'
+ rpm -q epel-release
epel-release-7-9.noarch
+ bad_packages+=("${package_name}")
+ base_packages+=("${packages_to_replace[${package_name}]}")
+ echo 'Checking for yum lock...'
Checking for yum lock...
+ '[' -f /var/run/yum.pid ']'
+ echo 'Checking for required python packages...'
Checking for required python packages...
+ case "$os_version" in
+ dep_check python2
+ have_program python2
+ hash python2
+ [[ 7 =~ 8.* ]]
+ echo 'Finding your repository directory...'
Finding your repository directory...
+ case "$os_version" in
++ python2 -c '
import yum
import os
for dir in yum.YumBase().doConfigSetup(init_plugins=False).reposdir:
if os.path.isdir(dir):
print dir
break
'
+ reposdir=/etc/yum.repos.d
+ echo 'Learning which repositories are enabled...'
Learning which repositories are enabled...
+ case "$os_version" in
++ python2 -c '
import yum
base = yum.YumBase()
base.doConfigSetup(init_plugins=False)
for repo in base.repos.listEnabled():
print repo
'
+ enabled_repos='epel
ol7_UEKR5
ol7_latest
yum.oracle.com'
+ echo -e 'Repositories enabled before update include:\nepel
ol7_UEKR5
ol7_latest
yum.oracle.com'
Repositories enabled before update include:
epel
ol7_UEKR5
ol7_latest
yum.oracle.com
+ '[' -z /etc/yum.repos.d ']'
+ cd /etc/yum.repos.d
+ case "$os_version" in
+ echo 'Downloading Oracle Linux yum repository file...'
Downloading Oracle Linux yum repository file...
+ curl -o switch-to-oraclelinux.repo https://yum.oracle.com/public-yum-ol7.repo
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 16402 100 16402 0 0 10771 0 0:00:01 0:00:01 --:--:-- 10776
+ echo 'Looking for yumdownloader...'
Looking for yumdownloader...
+ have_program yumdownloader
+ hash yumdownloader
++ mktemp -d
+ cd /tmp/tmp.h7ZNWYY5Jm
+ trap final_failure ERR
+ [[ centos-release-7-3.1611.el7.centos.x86_64 =~ ^centos-release-8.* ]]
+ [[ centos-release-7-3.1611.el7.centos.x86_64 =~ ^centos-linux-release-8.* ]]
+ echo 'Backing up and removing old repository files...'
Backing up and removing old repository files...
+ rpm -ql centos-release-7-3.1611.el7.centos.x86_64
+ grep '\.repo$'
++ rpm -qa 'centos-release-*'
++ wc -l
+ '[' 0 -gt 0 ']'
+ read -r repo
+ '[' -f /etc/yum.repos.d/CentOS-Base.repo ']'
+ read -r repo
+ '[' -f /etc/yum.repos.d/CentOS-CR.repo ']'
+ read -r repo
+ '[' -f /etc/yum.repos.d/CentOS-Debuginfo.repo ']'
+ read -r repo
+ '[' -f /etc/yum.repos.d/CentOS-Media.repo ']'
+ read -r repo
+ '[' -f /etc/yum.repos.d/CentOS-Sources.repo ']'
+ read -r repo
+ '[' -f /etc/yum.repos.d/CentOS-Vault.repo ']'
+ read -r repo
+ '[' -f /etc/yum.repos.d/CentOS-fasttrack.repo ']'
+ read -r repo
+ echo 'Removing CentOS-specific yum configuration from /etc/yum.conf'
Removing CentOS-specific yum configuration from /etc/yum.conf
+ sed -i.bak -e 's/^distroverpkg/#&/g' -e 's/^bugtracker_url/#&/g' /etc/yum.conf
+ echo 'Downloading Oracle Linux release package...'
Downloading Oracle Linux release package...
+ yumdownloader oraclelinux-release oraclelinux-release-el7 redhat-release-server
epel/x86_64/metalink | 11 kB 00:00:00
epel | 4.7 kB 00:00:00
ol7_UEKR5 | 2.5 kB 00:00:00
ol7_latest | 2.7 kB 00:00:00
https://yum.oracle.com/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/
failure: repodata/repomd.xml from yum.oracle.com: [Errno 256] No more mirrors to try.
https://yum.oracle.com/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
+ echo 'Could not download the following packages from https://yum.oracle.com:'
Could not download the following packages from https://yum.oracle.com:
+ echo oraclelinux-release oraclelinux-release-el7 redhat-release-server
oraclelinux-release oraclelinux-release-el7 redhat-release-server
+ echo
+ echo 'Are you behind a proxy? If so, make sure the '\''http_proxy'\'' environment'
Are you behind a proxy? If so, make sure the 'http_proxy' environment
+ echo 'variable is set with your proxy address.'
variable is set with your proxy address.
+ final_failure
+ echo 'An error occurred while attempting to switch this system to Oracle Linux and it may be in an unstable/unbootable state. To avoid further issues, the script has terminated.'
An error occurred while attempting to switch this system to Oracle Linux and it may be in an unstable/unbootable state. To avoid further issues, the script has terminated.
+ echo 'Switching old release package with Oracle Linux...'
Switching old release package with Oracle Linux...
+ rpm -i --force 'oraclelinux-release*.rpm' 'oraclelinux-release-el7*.rpm' 'redhat-release-server*.rpm'
error: File not found by glob: oraclelinux-release*.rpm
error: File not found by glob: oraclelinux-release-el7*.rpm
error: File not found by glob: redhat-release-server*.rpm
++ final_failure
++ echo 'An error occurred while attempting to switch this system to Oracle Linux and it may be in an unstable/unbootable state. To avoid further issues, the script has terminated.'
An error occurred while attempting to switch this system to Oracle Linux and it may be in an unstable/unbootable state. To avoid further issues, the script has terminated.
If there is anything wrong in the script can you give me the correct statement to change at mentioned linenumber ? Thanks for checking my error. Error is very strange because I executed this bash file on an experimental cluster of 8 servers and 5 gave no errors and 3 did abort. We still have 5.000 servers to convert on our supercomputer! Sincerely Yours, Jean-Jacques DE CLERCQ (Ghent University, Belgium)
@JJDC982 the way I read this output, you have an enabled repo labeled yum.oracle.com
somewhere in a file in /etc/yum.repos.d
. I believe this is what's causing this error.
Yeah, can you check all the files in /etc/yum.repos.d/
and make sure none of them point to yum.oracle.com
before you start? They should all be the original CentOS files.
@JJDC982 - I'm closing this issue. If you have further questions, please let us know.
When running the migration tool centos2ol.sh I get following errorlist => how come he doesn't find the REPOMD.xml file? Looking for yumdownloader... Backing up and removing old repository files... Removing CentOS-specific yum configuration from /etc/yum.conf Downloading Oracle Linux release package... epel/x86_64/metalink | 29 kB 00:00:00 ol7_UEKR5 | 2.5 kB 00:00:00 ol7_latest | 2.7 kB 00:00:00 https://yum.oracle.com/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror. To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please create a bug on https://bugs.centos.org/
failure: repodata/repomd.xml from yum.oracle.com: [Errno 256] No more mirrors to try. https://yum.oracle.com/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Could not download the following packages from https://yum.oracle.com: oraclelinux-release oraclelinux-release-el7 redhat-release-server