Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1146834 - pulp-puppet-module-builder should search for init.pp only in manifests
Summary: pulp-puppet-module-builder should search for init.pp only in manifests
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Pulp
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks: sat6-pulp-blocker
TreeView+ depends on / blocked
 
Reported: 2014-09-26 08:06 UTC by cristi falcas
Modified: 2021-04-06 18:03 UTC (History)
18 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-12 16:03:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 548 0 High CLOSED - CURRENTRELEASE pulp-puppet-module-builder should search for init.pp only in manifests Never

Description cristi falcas 2014-09-26 08:06:04 UTC
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:

Comment 1 Jeff Ortel 2014-09-26 14:54:45 UTC
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

Comment 2 cristi falcas 2014-09-26 19:18:15 UTC
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.

Comment 3 Michael Hrivnak 2014-10-01 16:03:05 UTC
related to https://bugzilla.redhat.com/show_bug.cgi?id=1146916

Comment 4 Randy Barlow 2014-10-01 17:20:34 UTC
As per discussion, we are raising the priority on this bug.

Comment 5 Jeremy Cline 2014-11-03 21:06:35 UTC
https://github.com/pulp/pulp_puppet/pull/150

Comment 6 Jeremy Cline 2014-11-05 15:04:54 UTC
See https://bugzilla.redhat.com/show_bug.cgi?id=1146916 for verification comment.

Comment 7 Chris Duryee 2014-12-23 20:52:46 UTC
fixed in pulp 2.6.0-0.2.beta

Comment 8 Preethi Thomas 2015-01-30 15:15:04 UTC
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

Comment 9 Brian Bouterse 2015-02-28 22:23:06 UTC
Moved to https://pulp.plan.io/issues/548

Comment 10 RHEL Program Management 2015-03-03 20:19:37 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 12 pulp-infra@redhat.com 2015-04-23 16:40:05 UTC
The Pulp upstream bug status is at CLOSED - CURRENTRELEASE. Updating the external tracker on this bug.

Comment 13 Bryan Kearney 2015-04-27 20:34:40 UTC
Upstream has marked this as resolved in pulp 2.6.0 which is delivered by Satellite 6.1.0. I am moving this to ON_QA.

Comment 15 Corey Welton 2015-07-21 14:01:50 UTC
Verified in Sat 6.1 Snap 13

[root@ibm-x3250m4-07 bz1146834]# pulp-puppet-module-builder --working-dir=/tmp/puppet --output-dir=/tmp/puppet/modules --clean --url=https://github.com/puppetlabs/puppetlabs-mcollective.git -t 2.0.0
rm -rf /tmp/puppet/puppetlabs-mcollective.git
cd /tmp/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 /tmp/puppet/modules
cp pkg/puppetlabs-mcollective-2.0.0.tar.gz /tmp/puppet/modules
puppet module build ./examples/mco_profile
mkdir -p /tmp/puppet/modules
cp ./examples/mco_profile/pkg/reidmv-mco_profile-0.1.0.tar.gz /tmp/puppet/modules
puppet module build .
mkdir -p /tmp/puppet/modules
cp ./pkg/puppetlabs-mcollective-2.0.0.tar.gz /tmp/puppet/modules
cd /tmp/puppet/modules
cd /tmp/puppet/puppetlabs-mcollective
cd /root/bz1146834
rm -rf /tmp/puppet/puppetlabs-mcollective.git
[root@ibm-x3250m4-07 bz1146834]#

Comment 16 Bryan Kearney 2015-08-12 16:03:59 UTC
This bug was fixed in Satellite 6.1.1 which was delivered on 12 August, 2015.


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