Comment 8 for bug 1532246

Revision history for this message
Sergey Kulanov (skulanov) wrote :

We also MUST change mirrors in docker container

Note: Ensure "old" centos:centos7 docker image was removed
           before running build from this patchse

Otherwise we have issue:
jenkins@srv42-bud:/home/jenkins/workspace/tmp/9.0.custom.iso/build/docker/fuel-centos-build# docker build -t fuel/fuel-centos-build .
Sending build context to Docker daemon 15.36 kB
Sending build context to Docker daemon
Step 0 : FROM centos:centos7
 ---> ce20c473cd8a
Step 1 : MAINTAINER Matthew Mosesohn <email address hidden>
 ---> Using cache
 ---> 63496f695056
Step 2 : ENV container docker
 ---> Using cache
 ---> d02d9376ef5c
Step 3 : RUN echo 7.1.1503 > /etc/yum/vars/releasever
 ---> Using cache
 ---> 25a8f5cca367
Step 4 : RUN yum --disablerepo=* --enablerepo=C7.1.1503-base --enablerepo=C7.1.1503-extras --enablerepo=C7.1.1503-updates -y update
 ---> Running in 1031c4c43440
Loaded plugins: fastestmirror

Error getting repository data for C7.1.1503-base, repository not found
INFO[0000] The command [/bin/sh -c yum --disablerepo=* --enablerepo=C7.1.1503-base --enablerepo=C7.1.1503-extras --enablerepo=C7.1.1503-updates -y update] returned a non-zero code: 1
root@srv42-bud:/home/jenkins/workspace/tmp/9.0.custom.iso/build/docker/fuel-centos-build# ^C
root@srv42-bud:/home/jenkins/workspace/tmp/9.0.custom.iso/build/docker/fuel-centos-build# docker run --rm -it centos:centos
centos centos:centos6 centos:centos7
jenkins@srv42-bud:/home/jenkins/workspace/tmp/9.0.custom.iso/build/docker/fuel-centos-build# docker run --rm -it centos:centos7 bash
[root@4d7263f64401 /]# yum --disablerepo=* --enablerepo=C7.1.1503-base --enablerepo=C7.1.1503-extras --enablerepo=C7.1.1503-updates -y update
Loaded plugins: fastestmirror

Error getting repository data for C7.1.1503-base, repository not found
[root@4d7263f64401 /]# cat /etc/yum.repos.d/
CentOS-Base.repo CentOS-CR.repo CentOS-Debuginfo.repo CentOS-Sources.repo CentOS-Vault.repo CentOS-fasttrack.repo systemd.repo
[root@4d7263f64401 /]# cat /etc/yum.repos.d/CentOS-Vault.repo
# CentOS Vault contains rpms from older releases in the CentOS-7
# tree.

[C7.0.1406-base]
name=CentOS-7.0.1406 - Base
baseurl=http://vault.centos.org/7.0.1406/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=0

[C7.0.1406-updates]
name=CentOS-7.0.1406 - Updates
baseurl=http://vault.centos.org/7.0.1406/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=0

[C7.0.1406-extras]
name=CentOS-7.0.1406 - Extras
baseurl=http://vault.centos.org/7.0.1406/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=0

[C7.0.1406-centosplus]
name=CentOS-7.0.1406 - CentOSPlus
baseurl=http://vault.centos.org/7.0.1406/centosplus/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=0

[C7.0.1406-fasttrack]
name=CentOS-7.0.1406 - CentOSPlus
baseurl=http://vault.centos.org/7.0.1406/fasttrack/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
enabled=0