downgrade urllib3 - #338
Merged
Merged
Conversation
The backups script for GCP installs a bunch of python libraries system-wide. One of those as a side-effect now results in a version of `urllib3` getting installed system-wide that then breaks ansible on subsequent deploys: https://appsembler.atlassian.net/wiki/spaces/ED/pages/390004931/Failed+to+install+repo+key A proper fix would be to move the whole backups script setup into a virtualenv so we don't get conflicts. But since this is only a problem on Hawthorn (Juniper uses a newer version of Ansible that is OK with upgrading urllib3), the simple workaround for now is to just downgrade urllib3 back to a known safe version at the end of the task.
thraxil
marked this pull request as ready for review
January 8, 2021 10:59
OmarIthawi
approved these changes
Jan 8, 2021
OmarIthawi
left a comment
There was a problem hiding this comment.
LGTM.
If we're going to merge appsembler/hawthorn/master into appsembler/juniper/master later, this task will sweep in. So I recommend adding a variable to it that defaults to False.
| - name: pin urllib3 back down to a version that doesn't break ansible | ||
| pip: name={{ item.name }} version={{ item.version }} | ||
| with_items: | ||
| - {name: urllib3, version: 1.13.1} |
There was a problem hiding this comment.
Just a nicer look.
Suggested change
| - {name: urllib3, version: 1.13.1} | |
| - name: urllib3 | |
| version: 1.13.1 |
| pip: name={{ item.name }} version={{ item.version }} | ||
| with_items: | ||
| - {name: urllib3, version: 1.13.1} | ||
| when: BACKUPS_PROVIDER == 'gs' |
There was a problem hiding this comment.
In case we forgot to remove this in Juniper.
Suggested change
| when: BACKUPS_PROVIDER == 'gs' | |
| when: | |
| - BACKUPS_PROVIDER == 'gs' | |
| - BACKUPS_URLLIB3_DOWNGRADE | default(False) |
Author
|
@OmarIthawi I don't see any reason that we'd merge |
|
It's likely that we'll need to sync changes from Cherry-picking is also a viable solution, but it's easy to forget those changes. We've piled few changes so far: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The backups script for GCP installs a bunch of python libraries system-wide. One of those as a side-effect now results in a version of
urllib3getting installed system-wide that then breaks ansible on subsequent deploys:https://appsembler.atlassian.net/wiki/spaces/ED/pages/390004931/Failed+to+install+repo+key
A proper fix would be to move the whole backups script setup into a virtualenv so we don't get conflicts. But since this is only a problem on Hawthorn (Juniper uses a newer version of Ansible that is OK with upgrading urllib3), the simple workaround for now is to just downgrade urllib3 back to a known safe version at the end of the task.