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 to v3005 Phosphorus #152

Merged
merged 22 commits into from
Aug 25, 2022
Merged

Upgrade to v3005 Phosphorus #152

merged 22 commits into from
Aug 25, 2022

Conversation

cdalvaro
Copy link
Owner

@cdalvaro cdalvaro commented Jun 22, 2022

  • Upgrade salt-master to 3005 Phosphorus
  • Upgrade salt-bootstrap to version 2022.08.12
  • Change Docker base image to ubuntu:jammy-20220801
  • Use python3 default distro version
  • Install python3-pygit2 version 1.6.1 from Ubuntu repositories
  • Remove USERMAP_UID and USERMAP_GID env variables in favor of PUID and PGID, respectively.

Ubuntu jammy-20220801 installs now libssh2 1.10.0 from Ubuntu's repositories which is supposed to solved issue #106 as said on libgit2/pygit2#836 (comment)

These changes improve build times making them 38% faster and decrease installation scripts complexity.

Closes #154

@cdalvaro cdalvaro added dependencies Pull requests that update a dependency file docker Pull requests that update Docker code labels Jun 22, 2022
@cdalvaro cdalvaro self-assigned this Jun 22, 2022
@cdalvaro
Copy link
Owner Author

cdalvaro commented Jun 22, 2022

There is an issue with python 3.10 that makes salt to throw the following error:

AttributeError: 'PathDistribution' object has no attribute '_normalized_name'
Full log
Traceback (most recent call last):
  File "/usr/local/bin/salt", line 8, in <module>
    sys.exit(salt_main())
  File "/usr/local/lib/python3.10/dist-packages/salt/scripts.py", line 521, in salt_main
    client.run()
  File "/usr/local/lib/python3.10/dist-packages/salt/cli/salt.py", line 35, in run
    self.parse_args()
  File "/usr/local/lib/python3.10/dist-packages/salt/utils/parsers.py", line 177, in parse_args
    self.print_versions_report()
  File "/usr/local/lib/python3.10/dist-packages/salt/utils/parsers.py", line 246, in print_versions_report
    print("\n".join(version.versions_report()), file=file, flush=True)
  File "/usr/local/lib/python3.10/dist-packages/salt/version.py", line 874, in versions_report
    ver_info = versions_information(
  File "/usr/local/lib/python3.10/dist-packages/salt/version.py", line 864, in versions_information
    extensions_info = extensions_information()
  File "/usr/local/lib/python3.10/dist-packages/salt/version.py", line 840, in extensions_information
    for entry_point in salt.utils.entrypoints.iter_entry_points("salt.loader"):
  File "/usr/local/lib/python3.10/dist-packages/salt/utils/entrypoints.py", line 43, in _wrapped
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/salt/utils/entrypoints.py", line 55, in iter_entry_points
    entry_points = importlib.metadata.entry_points()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 1009, in entry_points
    return SelectableGroups.load(eps).select(**params)
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 459, in load
    ordered = sorted(eps, key=by_group)
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 1006, in <genexpr>
    eps = itertools.chain.from_iterable(
  File "/usr/lib/python3.10/importlib/metadata/_itertools.py", line 16, in unique_everseen
    k = key(element)
AttributeError: 'PathDistribution' object has no attribute '_normalized_name'

As mention in saltstack/salt#61819 (comment) it should be fixed with python 3.10.1 so I'll block this PR until a new ubuntu image with the required python version is deployed.

More info at: https://bugs.python.org/issue44246

Updated

It still happens on with python 3.10.4.

Same issue reported on saltstack/salt#62229

@cdalvaro cdalvaro added the keep-alive Prevent Stale bot for closing the issue label Jun 22, 2022
@cdalvaro cdalvaro force-pushed the feature/upgrade_ubuntu_image branch from 1783dc8 to 6f1891c Compare June 22, 2022 08:00
@cdalvaro cdalvaro changed the title Change Docker base image to ubuntu:jammy-20220531 Upgrade to v3005 _Phosphorus_ Jul 19, 2022
@cdalvaro cdalvaro changed the title Upgrade to v3005 _Phosphorus_ Upgrade to v3005 Phosphorus Jul 19, 2022
@cdalvaro cdalvaro added the upgrade Upgrade saltstack to a newer version label Jul 19, 2022
@cdalvaro cdalvaro force-pushed the feature/upgrade_ubuntu_image branch from 86dcc66 to 157cc86 Compare July 19, 2022 06:58
@cdalvaro cdalvaro force-pushed the feature/upgrade_ubuntu_image branch from 8ba9b46 to f2c07f0 Compare July 21, 2022 11:30
@cdalvaro cdalvaro force-pushed the feature/upgrade_ubuntu_image branch from 97a1bf7 to c1b6d92 Compare August 12, 2022 14:20
@cdalvaro cdalvaro force-pushed the feature/upgrade_ubuntu_image branch from c01869f to 27b6694 Compare August 14, 2022 09:25
@cdalvaro cdalvaro merged commit 92d4d36 into main Aug 25, 2022
@cdalvaro cdalvaro deleted the feature/upgrade_ubuntu_image branch August 26, 2022 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file docker Pull requests that update Docker code keep-alive Prevent Stale bot for closing the issue upgrade Upgrade saltstack to a newer version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Versions of python and python-dev, etc. don't necessarily match
1 participant