Project

Profile

Help

Issue #548

pulp-puppet-module-builder should search for init.pp only in manifests

Added by cristi.falcas@gmail.com almost 7 years ago. Updated almost 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.4.0
Platform Release:
2.6.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:
Some modules have more then one init.pp in other places. One example is puppetlabs-mcollective:

https://github.com/puppetlabs/puppetlabs-mcollective/tree/master/spec/fixtures/modules/site_mcollective/manifests

Unfortunately, pulp-puppet-module-builder find this init.pp and tries to build a module from there

Full output:

pulp-puppet-module-builder --working-dir=/opt/puppet --output-dir=/opt/puppet/modules --clean --url=https://github.com/puppetlabs/puppetlabs-mcollective.git -t 2.0.0
rm -rf /opt/puppet/puppetlabs-mcollective.git
cd /opt/puppet
git clone --recursive https://github.com/puppetlabs/puppetlabs-mcollective.git
cd puppetlabs-mcollective
git status
git remote show -n origin
git fetch
git fetch --tags
git checkout 2.0.0
find . -name init.pp
puppet module build ./spec/fixtures/modules/site_mcollective
Error: Unable to find metadata.json or Modulefile in module root ./spec/fixtures/modules/site_mcollective. See <http://links.puppetlabs.com/modulefile> for required file format.
Error: Try 'puppet help module build' for usage

Version-Release number of selected component (if applicable):
2.4.0

How reproducible:
Always

Steps to Reproduce:
1. pulp-puppet-module-builder --working-dir=/opt/puppet --output-dir=/opt/puppet/modules --clean --url=https://github.com/puppetlabs/puppetlabs-mcollective.git -t 2.0.0
2.
3.

Actual results:

Expected results:

Additional info:

+ This bug was cloned from Bugzilla Bug #1146834 +

History

#1 Updated by jortel@redhat.com almost 7 years ago

Thanks for reporting this. Do you think that matching on the directory structure[1] itself would be more accurate and reliable?

[1] https://docs.puppetlabs.com/puppet/latest/reference/modules_fundamentals.html#module-layout

related to: https://bugzilla.redhat.com/show_bug.cgi?id=1146916

+ This comment was cloned from Bugzilla #1146834 comment 1 +

#2 Updated by cristi.falcas@gmail.com almost 7 years ago

From the modules I use, I think that the only common thing is the metadata.json file. Some modules only have a lib directory (for ex. inifile), so no manifests dir.

From my point of view, it would be nice to support as many modules as possible, meaning that if it has a Modulefile/metadata.json, it's correct.

If puppet module build finishes with success, it should be good enough for pulp also.

+ This comment was cloned from Bugzilla #1146834 comment 2 +

#4 Updated by rbarlow almost 7 years ago

As per discussion, we are raising the priority on this bug.

+ This comment was cloned from Bugzilla #1146834 comment 4 +

#6 Updated by jcline@redhat.com almost 7 years ago

See https://bugzilla.redhat.com/show_bug.cgi?id=1146916 for verification comment.

+ This comment was cloned from Bugzilla #1146834 comment 6 +

#7 Updated by cduryee almost 7 years ago

fixed in pulp 2.6.0-0.2.beta

+ This comment was cloned from Bugzilla #1146834 comment 7 +

#8 Updated by pthomas@redhat.com almost 7 years ago

verified
[root@cloud-qe-4 puppet]# pulp-puppet-module-builder --url=https://github.com/puppetlabs/puppetlabs-xinetd -o ../modules
cd /opt/puppet
git clone --recursive https://github.com/puppetlabs/puppetlabs-xinetd
cd puppetlabs-xinetd
git status
git remote show -n origin
git fetch
git fetch --tags
find . -name Modulefile
find . -name metadata.json
puppet module build
mkdir -p ../modules
cp pkg/puppetlabs-xinetd-1.4.0.tar.gz ../modules
puppet module build .
mkdir -p ../modules
cp ./pkg/puppetlabs-xinetd-1.4.0.tar.gz ../modules
cd ../modules
cd /opt/puppet/puppetlabs-xinetd
cd /opt/puppet
[root@cloud-qe-4 puppet]# rpm -q puppet
puppet-3.6.2-3.el7.noarch
[root@cloud-qe-4 puppet]#
[root@cloud-qe-4 puppet]# pulp-puppet-module-builder --working-dir=/opt/puppet --output-dir=/opt/puppet/modules --clean --url=https://github.com/puppetlabs/puppetlabs-inifile.git -t 1.1.3
rm -rf /opt/puppet/puppetlabs-inifile.git
cd /opt/puppet
git clone --recursive https://github.com/puppetlabs/puppetlabs-inifile.git
cd puppetlabs-inifile
git status
git remote show -n origin
git fetch
git fetch --tags
git checkout 1.1.3
find . -name Modulefile
find . -name metadata.json
puppet module build
mkdir -p /opt/puppet/modules
cp pkg/puppetlabs-inifile-1.1.3.tar.gz /opt/puppet/modules
puppet module build .
mkdir -p /opt/puppet/modules
cp ./pkg/puppetlabs-inifile-1.1.3.tar.gz /opt/puppet/modules
cd /opt/puppet/modules
cd /opt/puppet/puppetlabs-inifile
cd /opt/puppet
rm -rf /opt/puppet/puppetlabs-inifile.git
[root@cloud-qe-4 puppet]#
[root@cloud-qe-4 puppet]#
[root@cloud-qe-4 puppet]#
[root@cloud-qe-4 puppet]#
[root@cloud-qe-4 puppet]# pulp-puppet-module-builder --working-dir=/opt/puppet --output-dir=/opt/puppet/modules --clean --url=https://github.com/puppetlabs/puppetlabs-mcollective.git -t 2.0.0
rm -rf /opt/puppet/puppetlabs-mcollective.git
cd /opt/puppet
git clone --recursive https://github.com/puppetlabs/puppetlabs-mcollective.git
cd puppetlabs-mcollective
git status
git remote show -n origin
git fetch
git fetch --tags
git checkout 2.0.0
find . -name Modulefile
find . -name metadata.json
puppet module build
mkdir -p /opt/puppet/modules
cp pkg/puppetlabs-mcollective-2.0.0.tar.gz /opt/puppet/modules
puppet module build ./examples/mco_profile
mkdir -p /opt/puppet/modules
cp ./examples/mco_profile/pkg/reidmv-mco_profile-0.1.0.tar.gz /opt/puppet/modules
puppet module build .
mkdir -p /opt/puppet/modules
cp ./pkg/puppetlabs-mcollective-2.0.0.tar.gz /opt/puppet/modules
cd /opt/puppet/modules
cd /opt/puppet/puppetlabs-mcollective
cd /opt/puppet
rm -rf /opt/puppet/puppetlabs-mcollective.git
[root@cloud-qe-4 puppet]#
[root@cloud-qe-4 puppet]#
[root@cloud-qe-4 puppet]#
[root@cloud-qe-4 puppet]#
[root@cloud-qe-4 puppet]# rpm -qa |grep puppet
pulp-puppet-admin-extensions-2.6.0-0.5.beta.el7.noarch
pulp-puppet-tools-2.6.0-0.5.beta.el7.noarch
python-pulp-puppet-common-2.6.0-0.5.beta.el7.noarch
pulp-puppet-plugins-2.6.0-0.5.beta.el7.noarch
puppet-3.6.2-3.el7.noarch

+ This comment was cloned from Bugzilla #1146834 comment 8 +

#10 Updated by bmbouter almost 7 years ago

  • Severity changed from Medium to 2. Medium

#11 Updated by rbarlow almost 7 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#14 Updated by bmbouter almost 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF