Bug 1278187 - pulp-puppet-module-builder - Errors if no modules with 'Modulefile' or no modules with 'metadata.json' exist in git repo. Will run puppet module build with no path appended.
pulp-puppet-module-builder - Errors if no modules with 'Modulefile' or no mod...
Status: CLOSED NEXTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Pulp (Show other bugs)
6.1.3
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: 6.1
Assigned To: satellite6-bugs
Katello QA List
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-04 16:34 EST by Harald Jensås
Modified: 2017-08-01 16:02 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-01 16:02:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Pulp Redmine 1249 Normal CLOSED - CURRENTRELEASE pulp_module_builder fails when there are no 'ModuleFile' metadata files 2017-01-05 12:03 EST

  None (edit)
Description Harald Jensås 2015-11-04 16:34:47 EST
Description of problem:
Git repository content:

  ls -l /var/tmp/puppet-modules/
  total 8
  drwxr-xr-x. 7 root root 4096 Nov  4 21:22 puppetlabs-stdlib
  -rw-r--r--. 1 root root   50 Nov  4 21:22 README.md

There is an error, because the "paths" list will contain an empty element after running find on 'Modulefile' puppet module build is called with an empty path.

pulp-puppet-module-builder --working-dir=/var/tmp/ --output-dir=/puppet-modules --url=https://puppet%40acceleris.ch:Changeme12@gitlab.kmu4u.ch/puppet/puppet-modules.git --branch=master --clean
rm -rf /var/tmp/puppet-modules.git
cd /var/tmp/
git clone --recursive https://puppet%40acceleris.ch:Changeme12@gitlab.kmu4u.ch/puppet/puppet-modules.git
cd puppet-modules
git status
git remote show -n origin
git fetch
git fetch --tags
git checkout master
git pull
find . -name Modulefile
find . -name metadata.json
Pahts: 
['', './puppetlabs-stdlib/metadata.json']
Modules: 
set(['', './puppetlabs-stdlib'])
puppet module build 
Error: Unable to find module root at /var/tmp/puppet-modules or parent directories
Error: Try 'puppet help module build' for usage


Version-Release number of selected component (if applicable):
pulp-puppet-tools-2.6.0.16-1.el7sat.noarch

How reproducible:
Every time.

Steps to Reproduce:
1. Create git repo
2. Add puppet modules with 'metadata.json'. Do not add modules with 'Modulefile'
3. Attempt to use pulp-puppet-module-builder to build all module in the repo.

Actual results:
pulp-puppet-module-builder --working-dir=/var/tmp/ --output-dir=/puppet-modules --url=https://puppet%40acceleris.ch:Changeme12@gitlab.kmu4u.ch/puppet/puppet-modules.git --branch=master --clean
rm -rf /var/tmp/puppet-modules.git
cd /var/tmp/
git clone --recursive https://puppet%40acceleris.ch:Changeme12@gitlab.kmu4u.ch/puppet/puppet-modules.git
cd puppet-modules
git status
git remote show -n origin
git fetch
git fetch --tags
git checkout master
git pull
find . -name Modulefile
find . -name metadata.json
Pahts: 
['', './puppetlabs-stdlib/metadata.json']
Modules: 
set(['', './puppetlabs-stdlib'])
puppet module build 
Error: Unable to find module root at /var/tmp/puppet-modules or parent directories
Error: Try 'puppet help module build' for usage

Expected results:
All puppet modules in the git repo should be built.

Additional info:
Can be fixed by removing empty entries from the list before iterating to execute 'puppet module build'.

https://github.com/pulp/pulp_puppet/pull/200
Comment 5 pulp-infra@redhat.com 2015-11-18 10:00:22 EST
The Pulp upstream bug status is at NEW. Updating the external tracker on this bug.
Comment 6 pulp-infra@redhat.com 2015-11-18 10:00:25 EST
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.
Comment 7 Bryan Kearney 2016-07-08 16:39:37 EDT
Per 6.3 planning, moving out non acked bugs to the backlog
Comment 9 pulp-infra@redhat.com 2016-12-12 15:03:03 EST
The Pulp upstream bug status is at ASSIGNED. Updating the external tracker on this bug.
Comment 10 pulp-infra@redhat.com 2016-12-13 12:41:31 EST
The Pulp upstream bug status is at CLOSED - DUPLICATE. Updating the external tracker on this bug.
Comment 11 pulp-infra@redhat.com 2017-01-05 12:03:40 EST
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.
Comment 12 pulp-infra@redhat.com 2017-01-05 12:03:43 EST
The Pulp upstream bug priority is at Normal. Updating the external tracker on this bug.
Comment 13 Bryan Kearney 2017-08-01 16:02:23 EDT
The fix to this bug will be delivered with release 6.3 of Satellite.

Note You need to log in before you can comment on or make changes to this bug.