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

Broken repo link when attempting to use pin to minor release #364

Closed
ralucasg opened this issue Apr 2, 2018 · 3 comments
Closed

Broken repo link when attempting to use pin to minor release #364

ralucasg opened this issue Apr 2, 2018 · 3 comments
Labels

Comments

@ralucasg
Copy link
Contributor

ralucasg commented Apr 2, 2018

Reproducing steps:

  • add to pillar version 2017.7.3
  • run formula

https://repo.saltstack.com/yum/redhat/7/x86_64/2017.7.3/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found Trying other mirror.

As per SaltStack documentation: https://repo.saltstack.com/#rhel the correct link would have been https://repo.saltstack.com/yum/redhat/7/x86_64/**archive**/2017.7.3/repodata/repomd.xml

Expected repo config file:

[saltstack-repo]
name=SaltStack repo for RHEL/CentOS $releasever
baseurl=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/archive/2017.7.3
enabled=1
gpgcheck=1
gpgkey=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/archive/2017.7.3/SALTSTACK-GPG-KEY.pub
(as per documentation)

Formula generated repo config file:

[saltstack-pkgrepo]
gpgcheck=1
gpgkey=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/2017.7.3/SALTSTACK-GPG-KEY.pub
enabled=1
baseurl=https://repo.saltstack.com/yum/redhat/$releasever/$basearch/2017.7.3
name=SaltStack repo for RHEL/CentOS $releasever

The issue is that the link is missing the "archive" word before the release version.

@myii
Copy link
Member

myii commented Jan 24, 2019

Bug confirmation

@ralucasg Thank you for your report. I can confirm this is a bug, which isn't limited to Red Hat. I've extracted the links at https://repo.saltstack.com/ and can also confirm that archive is present in the URLs for every minor release. Therefore, the platforms affected by this bug are:

  • Debian
  • Red Hat / CentOS
  • Ubuntu
  • Amazon Linux
  • Raspbian

Potential fix

A potential fix for this starts from the line:

{% set salt_release = salt['pillar.get']('salt:release', 'latest') %}

  • salt:release can be examined to determine if a minor release has been selected and then prefix archive/ to salt_release.

However, this appears to be overly simplistic in the circumstances. There may be a case for explicitly specifying the type of release (latest, major or minor) in the pillar, alongside the specific version. That depends on the extent of the problem, which I discuss below.


Further issues (e.g. lack of PY3 support)

Having collated the URLs, I've identified further issues. For example, the formula does not currently support PY3 installations. It would be advantageous to resolve these issues concurrently.


Data collated from https://repo.saltstack.com/

This data was retrieved on 2018-01-23, which I've separated by platform. Some points worth noting:

  1. I've included the URLs as-is, so not all of them will link directly, e.g.:
    1. https://repo.saltstack.com/yum/redhat/$releasever/$basearch/archive/2018.3.3
  2. There are some strange entries under SUSE (39-42), which need to be removed from the page, e.g.:
    1. http://repo.saltstack.com/apt/suse/14.04/amd64/2018.3 trusty main
  3. For Windows and macOS, I've excluded the links to the MD5 and SHA256 sums:
    1. These are simply appended to the download URL as .md5 and .sha256 respectively.
  4. Fedora is not included in the breakdown because:
    1. "Packages are available in the standard Fedora repositories."

Debian

# Pin Py Key Repo Direct
1 Latest 2 https://repo.saltstack.com/apt/debian/9/amd64/latest/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/debian/9/amd64/latest stretch main
2 Latest 3 https://repo.saltstack.com/py3/debian/9/amd64/latest/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/py3/debian/9/amd64/latest stretch main
3 Latest 2 https://repo.saltstack.com/apt/debian/8/amd64/latest/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/debian/8/amd64/latest jessie main
4 Major 2 https://repo.saltstack.com/apt/debian/9/amd64/2018.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/debian/9/amd64/2018.3 stretch main
5 Major 3 https://repo.saltstack.com/py3/debian/9/amd64/2018.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/py3/debian/9/amd64/2018.3 stretch main
6 Major 2 https://repo.saltstack.com/apt/debian/8/amd64/2018.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/debian/8/amd64/2018.3 jessie main
7 Minor 2 https://repo.saltstack.com/apt/debian/9/amd64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/debian/9/amd64/archive/2018.3.3 stretch main
8 Minor 3 https://repo.saltstack.com/py3/debian/9/amd64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/py3/debian/9/amd64/archive/2018.3.3 stretch main
9 Minor 2 https://repo.saltstack.com/apt/debian/8/amd64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/debian/8/amd64/archive/2018.3.3 jessie main

Red Hat / CentOS

# Pin Py Key Repo Direct
10 Latest 2 https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el7.noarch.rpm
11 Latest 3 https://repo.saltstack.com/py3/redhat/salt-py3-repo-latest-2.el7.noarch.rpm
12 Latest 2 https://repo.saltstack.com/yum/redhat/salt-repo-latest-2.el6.noarch.rpm
13 Major 2 https://repo.saltstack.com/yum/redhat/salt-repo-2018.3-1.el7.noarch.rpm
14 Major 3 https://repo.saltstack.com/py3/redhat/salt-py3-repo-2018.3-1.el7.noarch.rpm
15 Major 2 https://repo.saltstack.com/yum/redhat/salt-repo-2018.3-1.el6.noarch.rpm
16 Minor 2 https://repo.saltstack.com/yum/redhat/7/x86\_64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub https://repo.saltstack.com/yum/redhat/$releasever/$basearch/archive/2018.3.3
17 Minor 3 https://repo.saltstack.com/py3/redhat/7/x86\_64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub https://repo.saltstack.com/py3/redhat/$releasever/$basearch/archive/2018.3.3
18 Minor 2 https://repo.saltstack.com/yum/redhat/6/x86\_64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub https://repo.saltstack.com/yum/redhat/$releasever/$basearch/archive/2018.3.3

Ubuntu

# Pin Py Key Repo Direct
19 Latest 2 https://repo.saltstack.com/apt/ubuntu/18.04/amd64/latest/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/ubuntu/18.04/amd64/latest bionic main
20 Latest 2 https://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest xenial main
21 Latest 3 https://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest bionic main
22 Latest 3 https://repo.saltstack.com/py3/ubuntu/16.04/amd64/latest/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/py3/ubuntu/16.04/amd64/latest xenial main
23 Latest 2 https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest trusty main
24 Major 2 https://repo.saltstack.com/apt/ubuntu/18.04/amd64/2018.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/ubuntu/18.04/amd64/2018.3 bionic main
25 Major 2 https://repo.saltstack.com/apt/ubuntu/16.04/amd64/2018.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2018.3 xenial main
26 Major 3 https://repo.saltstack.com/py3/ubuntu/18.04/amd64/2018.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/py3/ubuntu/18.04/amd64/2018.3 bionic main
27 Major 3 https://repo.saltstack.com/py3/ubuntu/16.04/amd64/2018.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/py3/ubuntu/16.04/amd64/2018.3 xenial main
28 Major 2 https://repo.saltstack.com/apt/ubuntu/14.04/amd64/2018.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/ubuntu/14.04/amd64/2018.3 trusty main
29 Minor 2 https://repo.saltstack.com/apt/ubuntu/18.04/amd64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/ubuntu/18.04/amd64/archive/2018.3.3 bionic main
30 Minor 2 https://repo.saltstack.com/apt/ubuntu/16.04/amd64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/ubuntu/16.04/amd64/archive/2018.3.3 xenial main
31 Minor 3 https://repo.saltstack.com/py3/ubuntu/18.04/amd64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/py3/ubuntu/18.04/amd64/archive/2018.3.3 bionic main
32 Minor 3 https://repo.saltstack.com/py3/ubuntu/16.04/amd64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/py3/ubuntu/16.04/amd64/archive/2018.3.3 xenial main
33 Minor 2 https://repo.saltstack.com/apt/ubuntu/14.04/amd64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/ubuntu/14.04/amd64/archive/2018.3.3 trusty main

SUSE

# Pin Py Key Repo Direct
34 Latest 2 http://repo.saltstack.com/opensuse/SLE\_12\_SP2/systemsmanagement:saltstack:products.repo
35 Latest 2 http://repo.saltstack.com/opensuse/SLE\_11\_SP4/systemsmanagement:saltstack:products.repo
36 Latest 2 http://repo.saltstack.com/opensuse/openSUSE\_Leap\_42.2/systemsmanagement:saltstack:products.repo
37 Latest 2 http://repo.saltstack.com/opensuse/openSUSE\_Leap\_42.3/systemsmanagement:saltstack:products.repo
38 Latest 2 http://repo.saltstack.com/opensuse/openSUSE\_Tumbleweed/systemsmanagement:saltstack:products.repo
39 [N/A] 2 https://repo.saltstack.com/apt/suse/14.04/amd64/2018.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/suse/14.04/amd64/2018.3 trusty main
40 [N/A] 2 https://repo.saltstack.com/apt/suse/12.04/amd64/2018.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/suse/12.04/amd64/2018.3 precise main
41 [N/A] 2 https://repo.saltstack.com/apt/suse/14.04/amd64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/suse/14.04/amd64/archive/2018.3.3 trusty main
42 [N/A] 2 https://repo.saltstack.com/apt/suse/12.04/amd64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/suse/12.04/amd64/archive/2018.3.3 precise main

Windows

# Pin Py Key Repo Direct
43 Latest 2 https://repo.saltstack.com/windows/Salt-Minion-2018.3.3-Py2-AMD64-Setup.exe
44 Latest 2 https://repo.saltstack.com/windows/Salt-Minion-2018.3.3-Py2-x86-Setup.exe
45 Latest 3 https://repo.saltstack.com/windows/Salt-Minion-2018.3.3-Py3-AMD64-Setup.exe
46 Latest 3 https://repo.saltstack.com/windows/Salt-Minion-2018.3.3-Py3-x86-Setup.exe

macOS

# Pin Py Key Repo Direct
47 Latest 2 https://repo.saltstack.com/osx/salt-2018.3.3-py2-x86\_64.pkg
48 Latest 3 https://repo.saltstack.com/osx/salt-2018.3.3-py3-x86\_64.pkg

Amazon Linux

# Pin Py Key Repo Direct
49 Latest 2 https://repo.saltstack.com/yum/amazon/salt-amzn2-repo-latest-2.amzn2.noarch.rpm
50 Latest 2 https://repo.saltstack.com/yum/amazon/salt-amzn-repo-latest-2.amzn1.noarch.rpm
51 Major 2 https://repo.saltstack.com/yum/amazon/salt-amzn2-repo-2018.3-2.amzn2.noarch.rpm
52 Major 2 https://repo.saltstack.com/yum/amazon/salt-amzn-repo-2018.3-1.amzn1.noarch.rpm
53 Minor 2 https://repo.saltstack.com/yum/amazon/2/x86\_64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub https://repo.saltstack.com/yum/amazon/2/$basearch/archive/2018.3.3
54 Minor 2 https://repo.saltstack.com/yum/amazon/latest/x86\_64/archive/2018.3.3/SALTSTACK-GPG-KEY.pub https://repo.saltstack.com/yum/amazon/latest/$basearch/archive/2018.3.3

Raspbian

# Pin Py Key Repo Direct
55 Latest 2 https://repo.saltstack.com/apt/debian/9/armhf/latest/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/debian/9/armhf/latest stretch main
56 Latest 3 https://repo.saltstack.com/py3/debian/9/armhf/latest/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/py3/debian/9/armhf/latest stretch main
57 Latest 2 https://repo.saltstack.com/apt/debian/8/armhf/latest/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/debian/8/armhf/latest jessie main
58 Major 2 https://repo.saltstack.com/apt/debian/9/armhf/2018.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/debian/9/armhf/2018.3 stretch main
59 Major 3 https://repo.saltstack.com/py3/debian/9/armhf/2018.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/py3/debian/9/armhf/2018.3 stretch main
60 Major 2 https://repo.saltstack.com/apt/debian/8/armhf/2018.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/debian/8/armhf/2018.3 jessie main
61 Minor 2 https://repo.saltstack.com/apt/debian/9/armhf/archive/2018.3.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/debian/9/armhf/archive/2018.3.3 stretch main
62 Minor 3 https://repo.saltstack.com/py3/debian/9/armhf/archive/2018.3.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/py3/debian/9/armhf/archive/2018.3.3 stretch main
63 Minor 2 https://repo.saltstack.com/apt/debian/8/armhf/archive/2018.3.3/SALTSTACK-GPG-KEY.pub http://repo.saltstack.com/apt/debian/8/armhf/archive/2018.3.3 jessie main

@myii myii added the bug label Jan 24, 2019
@myii
Copy link
Member

myii commented Jan 24, 2019

  • salt:release can be examined to determine if a minor release has been selected and then prefix archive/ to salt_release.

However, this appears to be overly simplistic in the circumstances. There may be a case for explicitly specifying the type of release (latest, major or minor) in the pillar, alongside the specific version. That depends on the extent of the problem, which I discuss below.

Looking through the data above, minor releases are always archive/<minor_release>, so the potential fix appears sound, without needing to explicitly specify the type of release.

@ralucasg I've since noticed that you submitted and closed #365, which is effectively the potential fix above. With some minor adjustments, that PR can be merged as the fix for the main bug raised by this issue.

myii added a commit to myii/salt-formula that referenced this issue Jan 24, 2019
…mulas#364)

* All minor releases appear in an `archive` sub-directory.
* Resolves main bug in GitHub issue saltstack-formulas#364.
* Simplification of original GitHub PR saltstack-formulas#365 by @ralucasg.
myii pushed a commit to myii/salt-formula that referenced this issue Jan 25, 2019
…mulas#364)

* All minor releases appear in an `archive` sub-directory.
* Resolves main bug in GitHub issue saltstack-formulas#364.
* Simplification of original GitHub PR saltstack-formulas#365 by @ralucasg.
aboe76 added a commit that referenced this issue Jan 25, 2019
Fix `repo.saltstack.com` URLs for pinned minor release (#364)
@myii
Copy link
Member

myii commented Jan 25, 2019

The main bug here is now resolved by the merge of #394, so I'm closing this issue. Thanks for your contribution.

@myii myii closed this as completed Jan 25, 2019
myii added a commit to myii/salt-formula that referenced this issue Jan 29, 2019
aboe76 added a commit that referenced this issue Feb 1, 2019
Fix `repo.saltstack.com` URLs for Python 3 packages (#364)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants