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

Bootstrap does not make it easy to install LTS, or STS #2040

Open
ssoto2 opened this issue Nov 8, 2024 · 0 comments
Open

Bootstrap does not make it easy to install LTS, or STS #2040

ssoto2 opened this issue Nov 8, 2024 · 0 comments

Comments

@ssoto2
Copy link

ssoto2 commented Nov 8, 2024

Description of Issue/Question

In the new release for salt/broadcom there are LTS, STS,and LATEST. In the new system. When performing an install it is setting up and installing for the latest

 [salt-repo-3006-lts]
name=Salt Repo for Salt v3006 LTS
baseurl=https://packages.broadcom.com/artifactory/saltproject-rpm/
skip_if_unavailable=True
priority=10
enabled=0
enabled_metadata=1
gpgcheck=1
exclude=*3007* *3008* *3009* *3010*
gpgkey=https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public

[salt-repo-3007-sts]
name=Salt Repo for Salt v3007 STS
baseurl=https://packages.broadcom.com/artifactory/saltproject-rpm/
skip_if_unavailable=True
priority=10
enabled=0
enabled_metadata=1
gpgcheck=1
exclude=*3006* *3008* *3009* *3010*
gpgkey=https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public

[salt-repo-latest]
name=Salt Repo for Salt LATEST release
baseurl=https://packages.broadcom.com/artifactory/saltproject-rpm/
skip_if_unavailable=True
priority=10
enabled=1
enabled_metadata=1
gpgcheck=1
gpgkey=https://packages.broadcom.com/artifactory/api/security/keypair/SaltProjectKey/public
__install_saltstack_rhel_onedir_repository() {

    if [ -n "$_PY_EXE" ] && [ "$_PY_MAJOR_VERSION" -ne 3 ]; then
        echoerror "Python version is no longer supported, only Python 3"
        return 1
    fi

    if [ ! -s "$YUM_REPO_FILE" ] || [ "$_FORCE_OVERWRITE" -eq $BS_TRUE ]; then
        FETCH_URL="https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.repo"
        __fetch_url "${YUM_REPO_FILE}" "${FETCH_URL}"
        if [ "$ONEDIR_REV" != "latest" ]; then
            # 3006.x is default
            REPO_REV_MAJOR=$(echo "$ONEDIR_REV" | cut -d '.' -f 1)
            if [ "$REPO_REV_MAJOR" -eq "3007" ]; then
                # Enable the Salt 3007 STS repo
                dnf config-manager --set-disable salt-repo-*
                dnf config-manager --set-enabled salt-repo-3007-sts
            fi
        else
            # Enable the Salt LATEST repo
            dnf config-manager --set-disable salt-repo-*
            dnf config-manager --set-enabled salt-repo-latest
        fi
        dnf clean expire-cache || return 1
    elif [ "$ONEDIR_REV" != "latest" ]; then
        echowarn "salt.repo already exists, ignoring salt version argument."
        echowarn "Use -F (forced overwrite) to install $ONEDIR_REV."
    fi

    return 0
}

The usage documentation says bootstrap using onedir by itself will install the latest, but notes in the script say 3006 is the default (see above). Additionally, the only way to get LTS is by specifying onedir 3006 but requires knowledge of what version is the current LTS to be able to select the LTS repo being enabled.

There technically should be an option of [ latest, sts, lts ].

example
sh bootstrap-salt.sh -X -P onedir lts
sh bootstrap-salt.sh -X -P onedir sts
sh bootstrap-salt.sh -X -P onedir

Or at min, there should be documentation because if you put someone in STS or LTS repo then it would be assumed that at some point the salt.repo will get updated in an RPM release and update the excludes (rev bumping the salt version)

Setup

{
    "codename": "Green Obsidian",
    "id": "rocky",
    "like": "rhel centos fedora",
    "version": "8.10",
    "version_parts": {
        "build_number": "",
        "major": "8",
        "minor": "10"
    }
}

Steps to Reproduce Issue

(Include debug logs if possible, bootstrap-salt.sh -D.)

currently (as of this post)

installs latest
bootstrap-salt.sh -X -P onedir

installs lts
bootstrap-salt.sh -X -P onedir 3006

installs sts
bootstrap-salt.sh -X -P onedir 3007

Versions and Systems

(salt --versions-report, bootstrap-salt.sh -v, system type and version,
cloud/VM provider as appropriate.)

bootstrap-salt.sh -- Version 2024.11.07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant