saltstack / salt-bootstrap

Generic Salt Bootstrap Script
Other
926 stars 545 forks source link

bootstrap script adds 'V' in front of branch name when installing with git flag #1910

Closed travis-hewitt closed 2 months ago

travis-hewitt commented 1 year ago

Description of Issue/Question

When using the bootstrap script to install salt from git, the bootstrap script adds a 'v' in front of the version. For instance, I wanted to install salt from the 3006.x branch. When I ran the shell script, and looked at the logs, it showed the following. This caused the installation to fail.

`[saltuser@centos tmp]$ sudo sh install_salt.sh -A [redacted ip] -i ssc-e2e-centos-minion-mcm2201540-230153944297 -x python3 -P git 3006.x

Setup

Deploy a fresh VM.

Steps to Reproduce Issue

  1. curl -L https://bootstrap.saltstack.com -o install_salt.sh
  2. sh install_salt.sh -i [resource_name] -U -x python3 -P git 3006.x
  3. You will find that the bootstrap script adds a 'v' in front of 3006.x

Versions and Systems

This was found on ubuntu 20, and cent7.

garethgreenaway commented 1 year ago

@travis-hewitt This should be resolved in the latest release, can you confirm? Thanks!

travis-hewitt commented 1 year ago

@garethgreenaway this was resolved in the latest release, but as we discussed in slack, the latest bootstrap script fails to install on ubu20.04, giving us these spicy tracebacks: `ERROR: Exception: Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/pkg_resources/init.py", line 3108, in _dep_map return self.dep_map File "/usr/local/lib/python3.8/dist-packages/pkg_resources/init.py", line 2901, in getattr__ raise AttributeError(attr) AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main status = self.run(options, args) File "/usr/lib/python3/dist-packages/pip/_internal/commands/download.py", line 135, in run resolver.resolve(requirement_set) File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve discovered_reqs.extend(self._resolve_one(requirement_set, req)) File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 382, in _resolve_one set(req_to_install.extras) - set(dist.extras) File "/usr/local/lib/python3.8/dist-packages/pkg_resources/init.py", line 3064, in extras return [dep for dep in self._dep_map if dep] File "/usr/local/lib/python3.8/dist-packages/pkg_resources/init.py", line 3110, in _dep_map self.dep_map = self._compute_dependencies() File "/usr/local/lib/python3.8/dist-packages/pkg_resources/init.py", line 3127, in _compute_dependencies common = types.MappingProxyType(dict.fromkeys(reqs_for_extra(None))) File "/usr/local/lib/python3.8/dist-packages/pkg_resources/init.py", line 3124, in reqs_for_extra if not req.marker or req.marker.evaluate({'extra': extra}): File "/usr/local/lib/python3.8/dist-packages/pkg_resources/_vendor/packaging/markers.py", line 245, in evaluate return _evaluate_markers(self._markers, current_environment) File "/usr/local/lib/python3.8/dist-packages/pkg_resources/_vendor/packaging/markers.py", line 151, in _evaluate_markers groups[-1].append(_eval_op(lhs_value, op, rhs_value)) File "/usr/local/lib/python3.8/dist-packages/pkg_resources/_vendor/packaging/markers.py", line 109, in _eval_op return spec.contains(lhs, prereleases=True) File "/usr/local/lib/python3.8/dist-packages/pkg_resources/_vendor/packaging/specifiers.py", line 565, in contains normalized_item = _coerce_version(item) File "/usr/local/lib/python3.8/dist-packages/pkg_resources/_vendor/packaging/specifiers.py", line 36, in _coerce_version version = Version(version) File "/usr/local/lib/python3.8/dist-packages/pkg_resources/_vendor/packaging/version.py", line 197, in init__ raise InvalidVersion(f"Invalid version: '{version}'") pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: 'cpython' Failed to download salt dependencies

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/_internal/cli/base_command.py", line 186, in _main status = self.run(options, args) File "/usr/lib/python3/dist-packages/pip/_internal/commands/install.py", line 357, in run resolver.resolve(requirement_set) File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 177, in resolve discovered_reqs.extend(self._resolve_one(requirement_set, req)) File "/usr/lib/python3/dist-packages/pip/_internal/legacy_resolve.py", line 382, in _resolve_one set(req_to_install.extras) - set(dist.extras) File "/usr/local/lib/python3.8/dist-packages/pkg_resources/init.py", line 3064, in extras return [dep for dep in self._dep_map if dep] File "/usr/local/lib/python3.8/dist-packages/pkg_resources/init.py", line 3110, in _dep_map self.dep_map = self._compute_dependencies() File "/usr/local/lib/python3.8/dist-packages/pkg_resources/init.py", line 3127, in _compute_dependencies common = types.MappingProxyType(dict.fromkeys(reqs_for_extra(None))) File "/usr/local/lib/python3.8/dist-packages/pkg_resources/init.py", line 3124, in reqs_for_extra if not req.marker or req.marker.evaluate({'extra': extra}): File "/usr/local/lib/python3.8/dist-packages/pkg_resources/_vendor/packaging/markers.py", line 245, in evaluate return _evaluate_markers(self._markers, current_environment) File "/usr/local/lib/python3.8/dist-packages/pkg_resources/_vendor/packaging/markers.py", line 151, in _evaluate_markers groups[-1].append(_eval_op(lhs_value, op, rhs_value)) File "/usr/local/lib/python3.8/dist-packages/pkg_resources/_vendor/packaging/markers.py", line 109, in _eval_op return spec.contains(lhs, prereleases=True) File "/usr/local/lib/python3.8/dist-packages/pkg_resources/_vendor/packaging/specifiers.py", line 565, in contains normalized_item = _coerce_version(item) File "/usr/local/lib/python3.8/dist-packages/pkg_resources/_vendor/packaging/specifiers.py", line 36, in _coerce_version version = Version(version) File "/usr/local/lib/python3.8/dist-packages/pkg_resources/_vendor/packaging/version.py", line 197, in init__ raise InvalidVersion(f"Invalid version: '{version}'") pkg_resources.extern.packaging.version.InvalidVersion: Invalid version: 'cpython'

dmurphy18 commented 2 months ago

Need to check this issue out

dmurphy18 commented 2 months ago

@travis-hewitt Closing this since the original issue is resolved, and the most recent release 2024-07-16 installs on Ubuntu 20.04 fine