saltstack / salt-bootstrap

Generic Salt Bootstrap Script
Other
927 stars 551 forks source link

Revert "Merge pull request #1983 from Dudek-AMS/develop" #1995

Closed Kenneth-Sills closed 4 months ago

Kenneth-Sills commented 7 months ago

This reverts commit e05d70558f7aa1bc4b3ecce530e1ad60f4bab7ac, reversing changes made to 59af6ad185ec7334b4eedb4fa6fa287e06956427.

What does this PR do?

I spoke a bit about what I think happened here, but in short:

The two lines of link changes in #1983 caused a regression by updating the legacy repository installation codepath with links to the new, incompatible onedir file hierarchy.

Subsequently, the release of v2024.04.03 has broken all the Debian 10/11 VM provisioning at my workplace (currently pinned to salt version 3004.2).

I've chosen to do a simple revert since the original PR changed code that was unrelated to the quoted issue. __install_saltstack_debian_repository was updated instead of __install_saltstack_debian_onedir_repository, but the former has no ability to generate the problematic https://repo.saltproject.io/salt/py3/debian/12/amd64/latest/salt-archive-keyring.gpg link they were referencing without a custom repo URL being passed in with -R.

What was more likely is that the latter function attempts to download from legacy before trying the onedir repository before continuing to the SALT-PROJECT-GPG-PUBKEY-2023.gpg case, and the author was just seeing that uncaptured output go to STDERR and assumed it was a failure.

This is supported since we never actually replicated their reported issue and they never provided evidence on the bootstrap process failing. In fact, right after the error line in their terminal we see "Hit: ...", indicating that execution continued. And looking at #1988 we can see exactly that, resulting in a successful bootstrapping. The issue there really being that the script should more clearly explain that it's a soft failure and that it's moving on to a different method OR send that initial command's STDERR to the void.

What issues does this PR fix or reference?

Resolves #1986 (closed, but not yet addressed).

Previous Behavior

All legacy repository (non-onedir) repository installations on Debian fail due to an invalid URL used to download the GPG key.

New Behavior

It works.

This does NOT address the issue described by the original PR or #1988. The STDERR line is still generated.

Kenneth-Sills commented 7 months ago

Apologies, my original PR contained unsigned commits. I've rebased the branch with signed commits, so should be good now.

Kenneth-Sills commented 5 months ago

Bump, so this doesn't get lost.

Kenneth-Sills commented 4 months ago

@dmurphy18 This was not fixed by #1987. The offending line is still present. I tested and confirmed it still generates the same URL and, subsequently, the same error:

Outdated ```txt * ERROR: https://repo.saltproject.io/py3/debian/11/amd64/SALT-PROJECT-GPG-PUBKEY-2023.gpg failed to download to /tmp/salt-gpg-FgUAh7Nq.pub * ERROR: Failed to run install_debian_git_deps()!!! ```

Hm... Scratch that, that URL didn't look right (missing the /salt/ your changes added) so I threw together a brand new, from-scratch environment and pointed it to develop. That seems to work! 🎉

Closing this superseded PR.