openshiftio / openshift.io

Red Hat OpenShift.io is an end-to-end development environment for planning, building and deploying modern applications.
https://openshift.io
97 stars 66 forks source link

Remove unused installation of python34-virtualenv from analytics repositories #3632

Open abs51295 opened 6 years ago

abs51295 commented 6 years ago

Description

We are using pip install virtualenv to run tests inside a virtual environment on CI and local machine. Installation of python34-virtualenv doesn't succeed on CI for PR builds since the package is not available on CI. But, how confusing it may sound it is able to install the same package during master builds and it causes a conflict with existing installation of virtualenv done through pip which in turn causes master builds to fail.

abs51295 commented 6 years ago

/cc: @sivaavkd @miteshvp @samuzzal-choudhury @GeetikaBatra @tisnik @msrb @jmelis

msrb commented 6 years ago

But, how confusing it may sound it is able to install the same package during master builds

I can see following in the master build logs:

++ yum -y install docker git which epel-release python34-virtualenv postgresql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.centos.org
 * extras: mirror.centos.org
 * updates: mirror.centos.org
Package which-2.20-7.el7.x86_64 already installed and latest version
No package python34-virtualenv available.

What's wrong in cico_setup.sh is that we trying to yum install both epel-release and python34-virtualenv in the same step. You first need to install epel-release -- to enable EPEL, and only then you can install python34-virtualenv package.

msrb commented 6 years ago

And what's confusing here is that we actually build 2 images now - one for CentOS and one for RHEL. The RHEL one inherits packages from a special base image, which already has EPEL enabled.

abs51295 commented 6 years ago

Good catch @msrb 👍 . I struggled to find this explanation. Anyways, we don't need python34-virtualenv anymore, do we?

abs51295 commented 6 years ago

And one follow up question @msrb : These yum install commands run on CI and not inside images, correct? If that's the case, then how is the EPEL enabled for RHEL image and not for CentOS? IIUC, because we already installed epel-release in the first step during CentOS image build on CI, we are able to install python34-virtualenv during RHEL image build on CI since epel is already enabled.

msrb commented 6 years ago

These yum install commands run on CI and not inside images, correct?

Ah, correct. You're right. Docker images are something different. They are not related to this problem with cico scripts.