Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade pip2 after upgrading pip3 #5743

Merged
merged 1 commit into from
Oct 30, 2020
Merged

Upgrade pip2 after upgrading pip3 #5743

merged 1 commit into from
Oct 30, 2020

Conversation

jleveque
Copy link
Contributor

@jleveque jleveque commented Oct 29, 2020

Upgrading pip3 after pip2 caused the pip command to be aliased to the pip3 command. However, since we are still transitioning from Python 2 to Python 3, most pip commands in the codebase are expecting pip to alias to pip2. The proper solution here is to explicitly call pip2 and pip3, and no longer call pip, however this will require extensive changes and testing, so to quickly fix this issue, we upgraded pip2 after pip3 to ensure that pip2 is installed after pip3.

- Why I did it
Fix issues introduced via #5656

- How I did it

Upgrade pip2 after pip3 in slave containers and config engine container.

- How to verify it

Ensure image builds are all containers start properly

- Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006

Sorry, something went wrong.

@jleveque jleveque self-assigned this Oct 29, 2020
@lguohan
Copy link
Collaborator

lguohan commented Oct 29, 2020

looks like test is failing due to the order change.

i understand the sonic-config-engine change to trigger this bug, but not sure why sonic-slave cause it?

Joe, can you help to explain?

https://sonic-jenkins.westus2.cloudapp.azure.com/job/vs/job/buildimage-vs-image/530/artifact/sonic-mgmt/tests/logs/

syslog.2.gz:Oct 29 11:59:22.745727 vlab-01 INFO swss#supervisord: neighsyncd Listens to neigh messages...
syslog.2.gz:Oct 29 11:59:22.746445 vlab-01 NOTICE swss#neighsyncd: :- loadRedisScript: lua script loaded, sha: 88270a7c5c90583e56425aca8af8a4b8c39fe757
syslog.2.gz:Oct 29 11:59:22.821335 vlab-01 INFO swss#supervisord: restore_neighbors Traceback (most recent call last):
syslog.2.gz:Oct 29 11:59:22.821419 vlab-01 INFO swss#supervisord: restore_neighbors   File "/usr/bin/restore_neighbors.py", line 17, in <module>
syslog.2.gz:Oct 29 11:59:22.821452 vlab-01 INFO swss#supervisord: restore_neighbors     import netifaces
syslog.2.gz:Oct 29 11:59:22.821507 vlab-01 INFO swss#supervisord: restore_neighbors ImportError: No module named netifaces
syslog.2.gz:Oct 29 11:59:23.065687 vlab-01 INFO swss#supervisord: restore_neighbors Traceback (most recent call last):
syslog.2.gz:Oct 29 11:59:23.065729 vlab-01 INFO swss#supervisord: restore_neighbors   File "/usr/bin/restore_neighbors.py", line 17, in <module>
syslog.2.gz:Oct 29 11:59:23.065823 vlab-01 INFO swss#supervisord: restore_neighbors     import netifaces
syslog.2.gz:Oct 29 11:59:23.065864 vlab-01 INFO swss#supervisord: restore_neighbors ImportError: No module named netifaces

@jleveque
Copy link
Contributor Author

i understand the sonic-config-engine change to trigger this bug, but not sure why sonic-slave cause it?

It would appear the netifaces issue is due to the docker-config-engine change. The sonic-slave changes may not be necessary, but I decided to change the ordering of all here in order make the overall pip aliasing behavior similar to what it was before the changes I made in #5656, just to avoid revisiting this again in the future.

@lguohan lguohan merged commit b132ca0 into sonic-net:master Oct 30, 2020
@jleveque jleveque deleted the fix_pip branch October 30, 2020 02:02
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
Upgrading pip3 after pip2 caused the pip command to be aliased to the pip3 command. However, since we are still transitioning from Python 2 to Python 3, most pip commands in the codebase are expecting pip to alias to pip2. The proper solution here is to explicitly call pip2 and pip3, and no longer call pip, however this will require extensive changes and testing, so to quickly fix this issue, we upgraded pip2 after pip3 to ensure that pip2 is installed after pip3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants