overcloud-prep-containers : Update pip returns SyntaxError: invalid syntax

Bug #1913279 reported by Sofer Athlan-Guyot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
In Progress
Critical
Daniel Bengtsson

Bug Description

Hi,

Seen in that review https://review.opendev.org/c/openstack/tripleo-common/+/770767 for:

 - tripleo-ci-centos-7-scenario000-multinode-oooq-container-upgrades: https://zuul.opendev.org/t/openstack/build/8f69a60c44cc4821bb484ddb14ba48a1
 - tripleo-ci-centos-7-containers-multinode: https://zuul.opendev.org/t/openstack/build/312b125ed4034fc28200c596e3996380

    TASK [overcloud-prep-containers : easy-install pip] ****************************
    Monday 25 January 2021 18:28:42 +0000 (0:00:00.075) 0:28:17.379 ********
    changed: [undercloud]

    TASK [overcloud-prep-containers : Update pip] **********************************
    Monday 25 January 2021 18:28:51 +0000 (0:00:09.119) 0:28:26.498 ********
    fatal: [undercloud]: FAILED! => {
        "changed": false,
        "cmd": [
            "/bin/pip2",
            "install",
            "-U",
            "--upgrade",
            "pip"
        ]
    }

    MSG:

    :stderr: Traceback (most recent call last):
      File "/bin/pip2", line 9, in <module>
        load_entry_point('pip==21.0', 'console_scripts', 'pip2')()
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 542, in load_entry_point
        return get_distribution(dist).load_entry_point(group, name)
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2569, in load_entry_point
        return ep.load()
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2229, in load
        return self.resolve()
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2235, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
      File "/usr/lib/python2.7/site-packages/pip-21.0-py2.7.egg/pip/_internal/cli/main.py", line 60
        sys.stderr.write(f"ERROR: {exc}")
                                       ^

    SyntaxError: invalid syntax

Tags: ci
Revision history for this message
Marios Andreou (marios-b) wrote :

12:18 < marios> chem: hmmm i wonder if that is related to http://lists.openstack.org/pipermail/openstack-discuss/2021-January/020003.html (python2 support gone from latest pip)

Revision history for this message
Sofer Athlan-Guyot (sofer-athlan-guyot) wrote :

It is:

ython 2.7.18 (default, Sep 30 2020, 00:00:00)
[GCC 10.2.1 20200723 (Red Hat 10.2.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> foo="bar"
>>> print(f"foo {bar}")
  File "<stdin>", line 1
    print(f"foo {bar}")
                     ^
SyntaxError: invalid syntax

Revision history for this message
Daniel Bengtsson (damani42) wrote :

Hi,

Yes the f-string[1] come in the python 3.6 version.

[1] https://www.python.org/dev/peps/pep-0498/

Revision history for this message
Daniel Bengtsson (damani42) wrote :

It's fixed by this patch[1] that install pip 20.

[1] https://review.opendev.org/c/openstack/tripleo-quickstart-extras/+/772325

Revision history for this message
Daniel Bengtsson (damani42) wrote :

Sorry I said something wrong but I made a new patch[1] to fix it.

[1] https://review.opendev.org/c/openstack/tripleo-quickstart-extras/+/772529

Changed in tripleo:
assignee: nobody → Daniel Bengtsson (damani42)
status: New → In Progress
Revision history for this message
Sofer Athlan-Guyot (sofer-athlan-guyot) wrote :
Changed in tripleo:
milestone: wallaby-2 → wallaby-3
Changed in tripleo:
milestone: wallaby-3 → wallaby-rc1
Changed in tripleo:
milestone: wallaby-rc1 → xena-1
Changed in tripleo:
milestone: xena-1 → xena-2
Changed in tripleo:
milestone: xena-2 → xena-3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.