You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] pkg_resources.DistributionNotFound: The 'urllib3<1.24,>=1.21.1' when python3-urllib3-0:1.25 is installed #59982
AluminiumRelease Post Mg and Pre SiPackagingRelated to packaging of Salt, not Salt's support for package management.bugbroken, incorrect, or confusing behaviorpoint-releaseminor release
Description
Amazon Linux has updated the python3-urllib3 to 1.25 - this is causing all salt versions to fail after a yum update
Steps to Reproduce the behavior
yum update with python3-urllib3-0:1.25 - any salt version
Versions Report
all salt 300x.x versions
Additional context
work around - lock yum to version python3-urllib3-0:1.23-6.amzn2.noarch
ie:
sudo salt * pkg.install yum-versionlock
sudo salt * cmd.run 'yum versionlock add python3-urllib3-0:1.23-6.amzn2.noarch'
Been facing verification failures (testing any salt-call command) on the salt-image-builder repo related to this. Will apply the workaround for the time being (thanks for sharing that, @jamesbernardi). Just out of interest, it doesn't affect all of our builds:
# These work fine and don't require the workaround
amaz-02.0-tiamat-py3: stable tiamat
amaz-02.0-master-py3: git master
# These do
amaz-02.0-3003.0-py3: stable 3003.0
amaz-02.0-3002.6-py3: stable 3002.6
amaz-02.0-3001.7-py3: stable 3001.7
amaz-02.0-3000.9-py3: stable 3000.9
# yum update
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd, versionlock
Resolving Dependencies
--> Running transaction check
---> Package amazon-ssm-agent.x86_64 0:3.0.161.0-1.amzn2 will be updated
---> Package amazon-ssm-agent.x86_64 0:3.0.529.0-1.amzn2 will be an update
---> Package aws-cfn-bootstrap.noarch 0:1.4-34.amzn2 will be updated
---> Package aws-cfn-bootstrap.noarch 0:2.0-6.amzn2 will be an update
--> Processing Dependency: python3-pystache for package: aws-cfn-bootstrap-2.0-6.amzn2.noarch
--> Processing Dependency: python3-daemon for package: aws-cfn-bootstrap-2.0-6.amzn2.noarch
---> Package ec2-instance-connect.noarch 0:1.1-13.amzn2 will be updated
---> Package ec2-instance-connect.noarch 0:1.1-14.amzn2 will be an update
---> Package ec2-net-utils.noarch 0:1.4-43.amzn2 will be obsoleted
---> Package ec2-net-utils.noarch 0:1.5-2.amzn2 will be obsoleting
---> Package glibc.x86_64 0:2.26-43.amzn2 will be updated
---> Package glibc.x86_64 0:2.26-44.amzn2 will be an update
---> Package glibc-all-langpacks.x86_64 0:2.26-43.amzn2 will be updated
---> Package glibc-all-langpacks.x86_64 0:2.26-44.amzn2 will be an update
---> Package glibc-common.x86_64 0:2.26-43.amzn2 will be updated
---> Package glibc-common.x86_64 0:2.26-44.amzn2 will be an update
---> Package glibc-locale-source.x86_64 0:2.26-43.amzn2 will be updated
---> Package glibc-locale-source.x86_64 0:2.26-44.amzn2 will be an update
---> Package glibc-minimal-langpack.x86_64 0:2.26-43.amzn2 will be updated
---> Package glibc-minimal-langpack.x86_64 0:2.26-44.amzn2 will be an update
---> Package irqbalance.x86_64 2:1.5.0-4.amzn2.0.1 will be updated
---> Package irqbalance.x86_64 2:1.7.0-4.amzn2.0.1 will be an update
---> Package kernel.x86_64 0:4.14.231-173.360.amzn2 will be installed
---> Package libcrypt.x86_64 0:2.26-43.amzn2 will be updated
---> Package libcrypt.x86_64 0:2.26-44.amzn2 will be an update
---> Package openssh.x86_64 0:7.4p1-21.amzn2.0.1 will be updated
---> Package openssh.x86_64 0:7.4p1-21.amzn2.0.3 will be an update
---> Package openssh-clients.x86_64 0:7.4p1-21.amzn2.0.1 will be updated
---> Package openssh-clients.x86_64 0:7.4p1-21.amzn2.0.3 will be an update
---> Package openssh-server.x86_64 0:7.4p1-21.amzn2.0.1 will be updated
---> Package openssh-server.x86_64 0:7.4p1-21.amzn2.0.3 will be an update
---> Package python3-psutil.x86_64 0:5.4.3-9.amzn2 will be updated
--> Processing Dependency: python37-psutil for package: salt-3003-1.amzn2.noarch
---> Package python3-psutil.x86_64 0:5.6.7-1.amzn2.0.2 will be an update
--> Running transaction check
---> Package python3-daemon.noarch 0:2.2.3-8.amzn2.0.2 will be installed
--> Processing Dependency: python3-lockfile for package: python3-daemon-2.2.3-8.amzn2.0.2.noarch
--> Processing Dependency: python3-docutils for package: python3-daemon-2.2.3-8.amzn2.0.2.noarch
---> Package python3-psutil.x86_64 0:5.4.3-9.amzn2 will be updated
--> Processing Dependency: python37-psutil for package: salt-3003-1.amzn2.noarch
---> Package python3-pystache.noarch 0:0.5.4-12.amzn2.0.1 will be installed
--> Processing Dependency: python3-simplejson for package: python3-pystache-0.5.4-12.amzn2.0.1.noarch
--> Running transaction check
---> Package python3-docutils.noarch 0:0.14-1.amzn2.0.2 will be installed
---> Package python3-lockfile.noarch 1:0.11.0-17.amzn2.0.2 will be installed
---> Package python3-psutil.x86_64 0:5.4.3-9.amzn2 will be updated
--> Processing Dependency: python37-psutil for package: salt-3003-1.amzn2.noarch
---> Package python3-simplejson.x86_64 0:3.16.0-3.amzn2 will be installed
--> Finished Dependency Resolution
Error: Package: salt-3003-1.amzn2.noarch (@salt-3003-repo)
Requires: python37-psutil
Removing: python3-psutil-5.4.3-9.amzn2.x86_64 (@salt-3003-repo)
python37-psutil = 5.4.3-9.amzn2
Updated By: python3-psutil-5.6.7-1.amzn2.0.2.x86_64 (amzn2-core)
~python3-psutil = 5.6.7-1.amzn2.0.2
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Adding a version lock for python3-psutil works around this issue as well:
For the 3003.1 release we're no longer providing python3-reqeusts or python3-urllib3 from the salt repos as amazonlinux 2 provides those now. It is preferable to downgrade python3-requests rather than python3-urllib3 going forward for salt 3003 or older so that a future upgrade goes smoothly.
If you don't want to do pinning, you can just yum downgrade python3-requests after upgrading to salt version 3003.1 or newer.
3003.1 and forward should work installing fresh out of the box without any pinning.
Also, because amazon now provides dependencies for python3-psutil you now must
yum install python3-psutil
before installing salt if you have epel enabled. This is an issue between epel and the amazonlinux 2 repos in general and is an upstream issue we can't really fix properly. It's something either amazon or epel will have to fix.
Hey there - when I checked the release notes for salt-3003.1* I didn't see a mention of this fix. I also notice the Latest** yum repo also still contains python3-requests, so I assume work is still underway to get this fix pushed out. Will the Latest repo pickup these changes once they are released?
Thanks!
with some quick testing, it appears that setting priority=20 rather than priority=10 in the .repo file before install fixes it for old versions like 3000.9, 3001.7, 3002.6. It would mean it would always prefer amazon's packages instead of ours if both exist for a given package.
we would just have to change the .repo files on repo.saltproject.io and change the template in the bootstrap script.
@dmurphy18 thoughts on doing that? would there be any downsides? wondering what would be better if amazon releases more python dependencies in the future.
I would think favor theirs since they have an interest in keeping things up to date, and also tend to roll out new stuff. Problem I see, is if we have to make a fix for something which their version will override.
it appears doing priority=20 would also result in older packages of some of them:
python3-coverage 3.6 instead of 4.5.1
python3-jinja2 2.7.2 instead of 2.10
python3-markupsafe 0.11 instead of 1.0
python3-py 1.4.32 instead of 1.5.4
python3-pycurl 7.43.0 instead of 7.43.0.2
python3-pytest 2.9.2 instead of 3.6.4
python3-simplejson 3.2.0 instead of 3.16.0
it appears only python3-jinja2, python3-markupsafe, and python3-pycurl get installed with a yum install salt-*
We should find out if an older version of any of these poses a problem.
Looks like at a minimum, we need a newer version of python3-markupsafe based on some tests with those requirements. We therefore can't change the priority as we would break stuff in salt.
I've tested, and everything seems to work fine if I just delete the python3-requests from the old repos. I'll make that change, and let @frogunder test it, if he gives the go ahead, we can push that out, probably next week if all goes well.
AluminiumRelease Post Mg and Pre SiPackagingRelated to packaging of Salt, not Salt's support for package management.bugbroken, incorrect, or confusing behaviorpoint-releaseminor release
Activity
bryceml commentedon Apr 7, 2021
Looks like I will need to update the python3-requests package and add a python3-certifi package.
myii commentedon Apr 20, 2021
Been facing verification failures (testing any
salt-callcommand) on thesalt-image-builderrepo related to this. Will apply the workaround for the time being (thanks for sharing that, @jamesbernardi). Just out of interest, it doesn't affect all of our builds:fix(dockerfile.yum): use workaround for Amazon Linux stable builds
icycle77 commentedon Apr 27, 2021
I'm also seeing another package conflict after running the suggested workaround and trying to do a
yum update:To repro, start with a pure, latest Amzn Linux 2 AMI, ran the following commands
The
yum updateproduces:Adding a version lock for
python3-psutilworks around this issue as well:and allows the
yum updateto complete successfully:bryceml commentedon May 26, 2021
For the 3003.1 release we're no longer providing python3-reqeusts or python3-urllib3 from the salt repos as amazonlinux 2 provides those now. It is preferable to downgrade python3-requests rather than python3-urllib3 going forward for salt 3003 or older so that a future upgrade goes smoothly.
If you don't want to do pinning, you can just
yum downgrade python3-requestsafter upgrading to salt version 3003.1 or newer.3003.1 and forward should work installing fresh out of the box without any pinning.
Also, because amazon now provides dependencies for python3-psutil you now must
before installing salt if you have epel enabled. This is an issue between epel and the amazonlinux 2 repos in general and is an upstream issue we can't really fix properly. It's something either amazon or epel will have to fix.
ring-pete commentedon Jun 5, 2021
Hey there - when I checked the release notes for salt-3003.1* I didn't see a mention of this fix. I also notice the
Latest** yum repo also still contains python3-requests, so I assume work is still underway to get this fix pushed out. Will theLatestrepo pickup these changes once they are released?Thanks!
*https://docs.saltproject.io/en/master/topics/releases/3003.1.html
**https://repo.saltproject.io/py3/amazon/2/x86_64/latest/
bryceml commentedon Jun 7, 2021
Yes, latest will pick up those changes when 3003.1 is released since latest is a symlink to whatever the latest release is.
3003.1 isn't tagged yet. @sagetherage should we throw that in the release notes before we tag? https://github.com/saltstack/salt-pack-py3/commit/c2c71c8b9cf33a9cf7360ec72e12c532d1a64adf is the commit associated with the dependency fixes on amazon linux 2.
8 remaining items
bryceml commentedon Jun 23, 2021
3003.1 has been released, closing issue.
myii commentedon Jun 23, 2021
Thanks, the fix is working fine for
3003.1.Just mentioning -- for our image builder, we still need to keep the workaround for versions less than that, such as
3002.6,3001.7and3000.9.bryceml commentedon Jun 23, 2021
with some quick testing, it appears that setting
priority=20rather thanpriority=10in the .repo file before install fixes it for old versions like 3000.9, 3001.7, 3002.6. It would mean it would always prefer amazon's packages instead of ours if both exist for a given package.we would just have to change the .repo files on repo.saltproject.io and change the template in the bootstrap script.
@dmurphy18 thoughts on doing that? would there be any downsides? wondering what would be better if amazon releases more python dependencies in the future.
feat(dockerfile.yum): update workaround for Amazon Linux stable builds
dmurphy18 commentedon Jun 23, 2021
I would think favor theirs since they have an interest in keeping things up to date, and also tend to roll out new stuff. Problem I see, is if we have to make a fix for something which their version will override.
bryceml commentedon Jun 24, 2021
it appears doing
priority=20would also result in older packages of some of them:it appears only python3-jinja2, python3-markupsafe, and python3-pycurl get installed with a
yum install salt-*We should find out if an older version of any of these poses a problem.
bryceml commentedon Jun 25, 2021
Looks like at a minimum, we need a newer version of python3-markupsafe based on some tests with those requirements. We therefore can't change the
priorityas we would break stuff in salt.I've tested, and everything seems to work fine if I just delete the
python3-requestsfrom the old repos. I'll make that change, and let @frogunder test it, if he gives the go ahead, we can push that out, probably next week if all goes well.salt: Autospec creation for update from version 3003 to version 3003.1
bryceml commentedon Jun 30, 2021
@myii We've updated the repos for 3000.9, 3001.7, and 3002.6 so this should be fixed for those as well now.
myii commentedon Jun 30, 2021
@bryceml Thanks for the heads-up. Just tried it out and it's looking good:
Will merge that in to that repo shortly.
revert(dockerfile.yum): use Amazon stable builds workaround [skip ci]
chore(release): 1.39.3 [skip ci]
Merge freeze into master (saltstack#60396)
Merge 3003.3 into master (#60924)