Skip to content

[build] Sporadic failures of "make configure" step during building "sonic-slave-stretch" docker image #7248

@volodymyrsamotiy

Description

@volodymyrsamotiy

Description

From time to time build for 201911 branch is failing on make configure step during building sonic-slave-stretch docker image.
It fails to install mockredispy package for some reason (it looks like sometimes resource, where this package is hosted, is unavailable.

Exact step that is performed to install the package is shown below:
RUN pip3 install mockredispy==2.9.3
https://github.com/Azure/sonic-buildimage/blob/201911/sonic-slave-stretch/Dockerfile.j2#L355

It also fails on the Jenkins job sonic-slave-stretch:
https://sonic-jenkins.westus2.cloudapp.azure.com/job/bldenv/job/sonic-slave-stretch/545/consoleFull

Not sure if it is relevant for other branches, but it could be, because they also build sonic-slave-stretch docker image as part of make configure step.

Steps to reproduce the issue:

No need to run full make configure flow to reproduce the issue, below are manual steps.

  1. git clone https://github.com/Azure/sonic-buildimage.git
  2. cd sonic-buildimage
  3. git checkout 201911
  4. make init
  5. BLDENV=stretch make -f Makefile.work sonic-slave-build

Describe the results you received:

Build of sonic-slave-stretch docker image failed due to unable to install mockredispy package.
https://sonic-jenkins.westus2.cloudapp.azure.com/job/bldenv/job/sonic-slave-stretch/545/consoleFull

05:09:30  Step 24/61 : RUN pip3 install mockredispy==2.9.3
05:09:30   ---> Running in 6898f61099de
05:09:31  �[91mDEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
05:09:37  �[0mCollecting mockredispy==2.9.3
05:09:37    Downloading mockredispy-2.9.3.tar.gz (17 kB)
05:09:39  �[91m    ERROR: Command errored out with exit status 1:
05:09:39       command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sypos2ry/mockredispy_ab86cd14995544df90f78a63ab7041a3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sypos2ry/mockredispy_ab86cd14995544df90f78a63ab7041a3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-ymhn19ne
05:09:39           cwd: /tmp/pip-install-sypos2ry/mockredispy_ab86cd14995544df90f78a63ab7041a3/
05:09:39      Complete output (23 lines):
05:09:39      Couldn't find index page for 'nose' (maybe misspelled?)
05:09:39      No local packages or working download links found for nose
05:09:39      Traceback (most recent call last):
05:09:39        File "<string>", line 1, in <module>
05:09:39        File "/tmp/pip-install-sypos2ry/mockredispy_ab86cd14995544df90f78a63ab7041a3/setup.py", line 29, in <module>
05:09:39          'with_redis = mockredis.noseplugin:WithRedis'
05:09:39        File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
05:09:39          _setup_distribution = dist = klass(attrs)
05:09:39        File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 317, in __init__
05:09:39          self.fetch_build_eggs(attrs['setup_requires'])
05:09:39        File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 372, in fetch_build_eggs
05:09:39          replace_conflicting=True,
05:09:39        File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 846, in resolve
05:09:39          dist = best[req.key] = env.best_match(req, ws, installer)
05:09:39        File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1118, in best_match
05:09:39          return self.obtain(req, installer)
05:09:39        File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1130, in obtain
05:09:39          return installer(requirement)
05:09:39        File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 440, in fetch_build_egg
05:09:39          return cmd.easy_install(req)
05:09:39        File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 693, in easy_install
05:09:39          raise DistutilsError(msg)
05:09:39      distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('nose')
05:09:39      ----------------------------------------
05:09:39  �[0m�[91mWARNING: Discarding https://files.pythonhosted.org/packages/0a/f1/d7db33898151aa9a1d647654cac55d01a5a1302fa4244af5fb5d3021f848/mockredispy-2.9.3.tar.gz#sha256=8caefadab8f32bd41bbccbcc9615347dd4f840cfedc253f43a4675f07036a446 (from https://pypi.org/simple/mockredispy/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
05:09:39  �[0m�[91mERROR: Could not find a version that satisfies the requirement mockredispy==2.9.3
05:09:39  �[0m�[91mERROR: No matching distribution found for mockredispy==2.9.3
05:09:40  �[0mThe command '/bin/sh -c pip3 install mockredispy==2.9.3' returned a non-zero code: 1

Describe the results you expected:

Build of sonic-slave-stretch docker image should pass.

Output of show version:

N/A since it is build time issue

Output of show techsupport:

N/A since it is build time issue

Additional information you deem important (e.g. issue happens only occasionally):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions