Issue #945
closedreleases.json doesn't return all versions of a given module.
Description
When setting up a puppet project using librarian-puppet with a pulp-puppet forge, librarian-puppet is unable to find a given version (here 3.1.1) of a given module (here saz-timezone).
My repository (repo1) has been set up using the following command:
# pulp-admin puppet repo create --repo-id=repo1 --description="Mirror of Puppet Forge" --display-name="Repo 1" --feed=http://forge.puppetlabs.com
I recently re-synced and re-published against the upstream forge (using respectively 'pulp-admin puppet repo sync run --repo-id repo1' and 'pulp-admin puppet repo publish run --repo-id repo1')
I did copied the contents (one module named dcsoral-users) from another repo to this repository using 'pulp-admin puppet repo copy', and published, but apart from this specific manipulation, my setup is quite simple.
Both the latest version and the version I'm interested in are existing in my mirror puppet repository, as confirmed by the following command:
# pulp-admin puppet repo modules --repo-id=repo1 --str-eq="name=timezone" --str-eq="author=saz"
Name: timezone
Version: 3.1.1
Author: saz
Checksum: None
Checksum Type: sha256
Dependencies:
Name: puppetlabs/stdlib
Version Requirement: >= 2.3.0
Description: Manage timezone settings via Puppet
License: Apache License, Version 2.0
Project Page: https://github.com/saz/puppet-timezone
Source: git://github.com/saz/puppet-timezone
Summary: UNKNOWN
Tag List: None
Name: timezone
Version: 3.2.0
Author: saz
Checksum: None
Checksum Type: sha256
Dependencies:
Name: puppetlabs/stdlib
Version Requirement: >= 2.3.0
Description: Manage timezone settings via Puppet
License: Apache License, Version 2.0
Project Page: https://github.com/saz/puppet-timezone
Source: git://github.com/saz/puppet-timezone
Summary: UNKNOWN
Tag List: None
But when a given client is trying to fetch a module's metadata, it seems to be only served the last version:
$ curl "https://forge.domain.tld/pulp_puppet/forge/repository/repo1/api/v1/releases.json?module=saz/timezone"
{"saz/timezone": [{"dependencies": [["puppetlabs/stdlib", ">= 2.3.0"]], "version": "3.2.0", "file": "/pulp/puppet/repo1/system/releases/s/saz/saz-timezone-3.2.0.tar.gz"}], "puppetlabs/stdlib": [{"dependencies": [], "version": "4.5.1", "file": "/pulp/puppet/repo1/system/releases/p/puppetlabs/puppetlabs-stdlib-4.5.1.tar.gz"}, {"dependencies": [], "version": "4.6.0", "file": "/pulp/puppet/repo1/system/releases/p/puppetlabs/puppetlabs-stdlib-4.6.0.tar.gz"}]}%
Which is different from what the upstream forge returns:
$ curl https://forge.puppetlabs.com/api/v1/releases.json\?module\=saz/timezone
{"saz/timezone":[{"file":"/system/releases/s/saz/saz-timezone-1.0.0.tar.gz","version":"1.0.0","dependencies":[]},{"file":"/system/releases/s/saz/saz-timezone-1.1.0.tar.gz","version":"1.1.0","dependencies":[]},{"file":"/system/releases/s/saz/saz-timezone-1.2.0.tar.gz","version":"1.2.0","dependencies":[]},{"file":"/system/releases/s/saz/saz-timezone-2.0.0.tar.gz","version":"2.0.0","dependencies":[]},{"file":"/system/releases/s/saz/saz-timezone-3.0.0.tar.gz","version":"3.0.0","dependencies":[["puppetlabs/stdlib",">= 2.3.0"]]},{"file":"/system/releases/s/saz/saz-timezone-3.0.1.tar.gz","version":"3.0.1","dependencies":[["puppetlabs/stdlib",">= 2.3.0"]]},{"file":"/system/releases/s/saz/saz-timezone-3.1.0.tar.gz","version":"3.1.0","dependencies":[["puppetlabs/stdlib",">= 2.3.0"]]},{"file":"/system/releases/s/saz/saz-timezone-3.1.1.tar.gz","version":"3.1.1","dependencies":[["puppetlabs/stdlib",">= 2.3.0"]]},{"file":"/system/releases/s/saz/saz-timezone-3.2.0.tar.gz","version":"3.2.0","dependencies":[["puppetlabs/stdlib",">= 2.3.0"]]}],"puppetlabs/stdlib":[{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-2.3.0.tar.gz","version":"2.3.0","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-2.3.1.tar.gz","version":"2.3.1","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-2.3.2.tar.gz","version":"2.3.2","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-2.3.3.tar.gz","version":"2.3.3","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-2.4.0.tar.gz","version":"2.4.0","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-2.5.0.tar.gz","version":"2.5.0","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-2.5.1.tar.gz","version":"2.5.1","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-2.6.0.tar.gz","version":"2.6.0","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-3.0.0.tar.gz","version":"3.0.0","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-3.0.1.tar.gz","version":"3.0.1","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-3.1.0.tar.gz","version":"3.1.0","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-3.1.1.tar.gz","version":"3.1.1","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-3.2.0.tar.gz","version":"3.2.0","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-3.2.1.tar.gz","version":"3.2.1","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-3.2.2.tar.gz","version":"3.2.2","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-4.1.0.tar.gz","version":"4.1.0","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-4.2.0.tar.gz","version":"4.2.0","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-4.2.1.tar.gz","version":"4.2.1","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-4.2.2.tar.gz","version":"4.2.2","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-4.3.0.tar.gz","version":"4.3.0","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-4.3.2.tar.gz","version":"4.3.2","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-4.4.0.tar.gz","version":"4.4.0","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-4.5.0.tar.gz","version":"4.5.0","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-4.5.1.tar.gz","version":"4.5.1","dependencies":[]},{"file":"/system/releases/p/puppetlabs/puppetlabs-stdlib-4.6.0.tar.gz","version":"4.6.0","dependencies":[]}]}
I was able to reproduce the same issue with another module (mastrodev-wget, versions 1.7.0 vs 1.6.0) so I don't think this issue is module-related.
Updated by mhrivnak over 9 years ago
- Severity changed from 2. Medium to 3. High
- Triaged changed from No to Yes
Updated by lastmikoi about 9 years ago
I updated the affected system (a CentOS release 6.7 virtual machine) from 2.6.0 to 2.6.4, but unfortunately the issue is still hapenning.
Updated by ipanova@redhat.com about 9 years ago
Updated by ipanova@redhat.com about 9 years ago
in pulp 2.7 after django conversion with puppet> 3.6 when release.json file is formed then all versions are displayed.
Updated by lastmikoi almost 9 years ago
The issue is still hapenning after upgrading to pulp 2.7, the `pulp_puppet/forge/repository/repo1/api/v1/releases.json?module=puppetlabs/apt` endpoint still doesn't fetch all versions.
Updated by bmbouter over 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.