Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Duplicate
-
None
-
None
-
Monolithic
-
Debian 7
-
Froyo
-
Needs Assessment
-
Needs Assessment
Description
Puppet Version: pe-puppet-enterprise-release-2018.1.2.0-1.pe.el7.noarch
Puppet Server Version: pe-puppetserver-2018.1.0.54-1.el7.noarch
OS Name/Version: CentOS Linux release 7.5.1804 (Core)
Overview
If using a private forge (Artifactory) to deploy puppet code using puppet code deploy user will encounter error 400 when:
- The module you are trying to download exists in the private forge
- ..But the exact module version you are requesting does not
Desired result
If a module cannot be downloaded because it doesn't exist, puppet code deploy should:
- Tell the user which module has a problem
- Tell the user what the problem is
Actual result
Deploying all environments.
|
Found 1 environments.
|
[
|
{
|
"environment": "production",
|
"error": {
|
"details": {
|
"corrected-env-name": "production"
|
},
|
"kind": "puppetlabs.code-manager/deploy-failure",
|
"msg": "Errors while deploying environment 'production' (exit code: 1):\nERROR\t -> the server responded with status 400\n"
|
},
|
"id": 5,
|
"status": "failed"
|
}
|
]
|
Steps to reproduce
1. Setup artifactory (it's the only enterprise grade private forge that works) and click to enable puppet support
2. Create a control repo with Puppetfile containing only
mod "puppetlabs-stdlib" , "4.24.0"
|
3. Manually import any version of puppetlabs-stdlib execept the one in Puppetfile (otherwise you get a more helpful 404) into artifactory
4. Configure Puppet to use artifactory. Get the URL from the set-me-up page in artifactory, be sure to use the puppet-local repository so that you will only have access to whatever is manually imported. Hiera:
puppet_enterprise::master::code_manager::forge_settings:
|
baseurl: 'http://192.168.33.10:8081/artifactory/api/puppet/puppet-local'
|
5. puppet agent -t to get puppet to reconfigure itself to use private forge
6. Setup code manager, tokens, etc
7. puppet code deploy --all --wait should now reproduce the error
Impact
- Failed deployments
- Painful troubleshooting process
- Problem is exacerbated by puppet forge not respecting module version to download manually when using firefox with Ublock Origin active (downloads latest version - turn adblocker off to resolve)
Workaround
There is nothing in the puppet logs to diagnose the cause of this problem. The best workaround seems to be either to:
- Comment, push and deploy Puppetfile lines until the cause is found by a process of elimination
- Compare (manually or otherwise) every entry in Puppetfile with the private forge to ensure the requested version exists