View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0014860 | CentOS-7 | yum | public | 2018-05-24 16:15 | 2020-11-23 20:13 |
Reporter | alexz-kh | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Product Version | 7.5.1804 | ||||
Summary | 0014860: yum ignore skip_if_unavailable=1 option | ||||
Description | yum update ignores skip_if_unavailable option in .repo file, and failes. Symptoms: yum update Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://XXXXXXXXXx.txt error was 14: curl#6 - "Could not resolve host: asdasdasdasdasdXXXXXXXXXx; Name or service not known" One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: .......... Cannot find a valid baseurl for repo: XXXXXXXXXx | ||||
Steps To Reproduce | docker pull centos:7 docker run -v /etc/localtime:/etc/localtime:ro --hostname=docker-quick --ulimit nofile=4096:8192 --cpus=4 -ti centos:7 /bin/bash # inside docker # create repo exmple : $ cat /etc/yum.repos.d/1.repo [xxxx-test] name=xxxx-test mirrorlist=http://asdasdasdasdXXX.com/security.txt enabled=1 gpgcheck=0 skip_if_unavailable=1 # remove all repos except fake one : $ mv /etc/yum.repos.d/CentOS* ~/ # run update Loaded plugins: fastestmirror, ovl Could not retrieve mirrorlist http://asdasdasdasdXXX.com/security.txt error was 14: curl#6 - "Could not resolve host: asdasdasdasdXXX.com; Name or service not known" Loading mirror speeds from cached hostfile No packages marked for update 0 # Exit code 0, as expected. ########## # Move Centos repos back, and update yum : $ mv ~/CentOS* /etc/yum.repos.d/ $ yum update yum* # Check test again: $ mv /etc/yum.repos.d/CentOS* ~/ $ yum update; echo Exit=$? Loaded plugins: fastestmirror, ovl Loading mirror speeds from cached hostfile Could not retrieve mirrorlist http://asdasdasdasdXXX.com/security.txt error was 14: curl#6 - "Could not resolve host: asdasdasdasdXXX.com; Name or service not known" One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=<repoid> ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable <repoid> or subscription-manager repos --disable=<repoid> 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true Cannot find a valid baseurl for repo: xxxx-test Exit=1 | ||||
Additional Information | Works as expected at: rpm -qa |grep -i yum |sort yum-3.4.3-154.el7.centos.1.noarch yum-metadata-parser-1.1.4-10.el7.x86_64 yum-plugin-fastestmirror-1.1.31-42.el7.noarch yum-plugin-ovl-1.1.31-42.el7.noarch yum-utils-1.1.31-42.el7.noarch Not work with: yum-3.4.3-158.el7.centos.noarch yum-metadata-parser-1.1.4-10.el7.x86_64 yum-plugin-fastestmirror-1.1.31-45.el7.noarch yum-plugin-ovl-1.1.31-45.el7.noarch yum-utils-1.1.31-45.el7.noarch # Docker inside version: cat /etc/*release* CentOS Linux release 7.4.1708 (Core) Derived from Red Hat Enterprise Linux 7.4 (Source) NAME="CentOS Linux" VERSION="7 (Core)" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="7" PRETTY_NAME="CentOS Linux 7 (Core)" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:7" HOME_URL="https://www.centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-7" CENTOS_MANTISBT_PROJECT_VERSION="7" REDHAT_SUPPORT_PRODUCT="centos" REDHAT_SUPPORT_PRODUCT_VERSION="7" CentOS Linux release 7.4.1708 (Core) CentOS Linux release 7.4.1708 (Core) cpe:/o:centos:centos:7 # Issue still reproducable after full yum update to 1804 | ||||
Tags | yum, yum-plugin-fastestmirror | ||||
abrt_hash | |||||
URL | |||||
Not reproduces w\o plugins: yum update --noplugins; echo $? Could not retrieve mirrorlist http://asdasdasdasdXXX.com/security.txt error was 14: curl#6 - "Could not resolve host: asdasdasdasdXXX.com; Name or service not known" No packages marked for update 0 Most probably, issue in yum-plugin-fastestmirror |
|
Yup, with disabled plugin in /etc/yum/pluginconf.d/fastestmirror.conf - issue not reproduced. | |
Got the same issue on CentOS 7.9. Is it going to be fixed? | |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-05-24 16:15 | alexz-kh | New Issue | |
2018-05-24 16:15 | alexz-kh | Tag Attached: yum | |
2018-05-24 16:56 | alexz-kh | Note Added: 0031910 | |
2018-05-24 16:56 | alexz-kh | Tag Attached: yum-plugin-fastestmirror | |
2018-05-24 17:00 | alexz-kh | Note Added: 0031911 | |
2020-11-23 20:13 | salmira | Note Added: 0037980 |