Bug 1142309

Summary: Cannot import puppet modules into a repository if they lack manifests/init.pp
Product: Red Hat Satellite Reporter: Scott Dodson <sdodson>
Component: Content ManagementAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: dcleal, rharriso
Target Milestone: UnspecifiedKeywords: Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-11-14 17:17:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Scott Dodson 2014-09-16 14:34:51 UTC
Description of problem:
Modules that only provide types lacking a manifests/init.pp fail to import.
ie: https://forge.puppetlabs.com/blentz/selinux_types

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

How reproducible:
100% 

Steps to Reproduce:
1. Attempt to import https://forgeapi.puppetlabs.com/v3/files/blentz-selinux_types-0.1.0.tar.gz into a puppet repository via webui or sync
2.
3.

Actual results:
Error about file not found in the UI, silent failure to import the module if you're performing a sync.


Expected results:
Successful import of selinux_types

Additional info:
A work around seems to be to create a manifests/init.pp with an empty class

Comment 1 RHEL Program Management 2014-09-16 14:53:20 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 3 Dominic Cleal 2014-09-16 15:50:25 UTC
There are no classes, so no reason to import it as there's nothing to assign to hosts.  The custom types and providers are usable from manifests without classes or importing of classes.

Comment 4 Scott Dodson 2014-09-16 16:48:58 UTC
(In reply to Dominic Cleal from comment #3)
> There are no classes, so no reason to import it as there's nothing to assign
> to hosts.  The custom types and providers are usable from manifests without
> classes or importing of classes.

So how am I to install custom types in Satellite 6 environment? I can't find any documentation describing how to do that.

Comment 5 Dominic Cleal 2014-09-17 07:42:01 UTC
Just add the modules to a content view, there's no need to see Puppet classes imported or link them to hosts.

Comment 6 Scott Dodson 2014-09-17 13:41:06 UTC
Sorry, I should've been more clear. 

pulp-puppet-module-builder ignores the module, duritong/sysctl and blentz/selinux_types are both modules of this sort from puppet forge.

Reproducer steps :
1) Install the module from puppet forge
[root@sdodson-sat6 modules]# puppet module install duritong/sysctl
Notice: Preparing to install into /etc/puppet/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppet/modules
└── duritong-sysctl (v0.0.5)
[root@sdodson-sat6 modules]# cd /etc/puppet/modules/
[root@sdodson-sat6 modules]# ls
concat  haproxy  keepalived  lokkit  motd  ntp  openshift_origin  selinux_types  stdlib  sysctl

2) run pulp-puppet-module-builder, it fails to pickup sysctl module and build a tarball for it, which means that when I sync the puppet repository via satellite UI it of course fails to import the module.

[root@sdodson-sat6 modules]# pulp-puppet-module-builder --output-dir=/modules 
cd /etc/puppet/modules
git status
find . -name init.pp
puppet module build ./ntp
mkdir -p /modules
cp ./ntp/pkg/puppetlabs-ntp-3.1.2.tar.gz /modules
puppet module build ./lokkit
mkdir -p /modules
cp ./lokkit/pkg/rharrison-lokkit-0.5.0.tar.gz /modules
puppet module build ./haproxy
mkdir -p /modules
cp ./haproxy/pkg/puppetlabs-haproxy-1.0.0.tar.gz /modules
puppet module build ./keepalived
mkdir -p /modules
cp ./keepalived/pkg/arioch-keepalived-0.1.1.tar.gz /modules
puppet module build ./selinux_types
mkdir -p /modules
cp ./selinux_types/pkg/blentz-selinux_types-0.1.0.tar.gz /modules
puppet module build ./stdlib
mkdir -p /modules
cp ./stdlib/pkg/puppetlabs-stdlib-4.3.2.tar.gz /modules
puppet module build ./openshift_origin
mkdir -p /modules
cp ./openshift_origin/pkg/openshift-openshift_origin-4.0.10.tar.gz /modules
cp ./openshift_origin/pkg/openshift-openshift_origin-4.0.11.tar.gz /modules
cp ./openshift_origin/pkg/openshift-openshift_origin-4.0.12.tar.gz /modules
puppet module build ./motd
mkdir -p /modules
cp ./motd/pkg/puppetlabs-motd-1.1.1.tar.gz /modules
puppet module build ./concat
mkdir -p /modules
cp ./concat/pkg/puppetlabs-concat-1.1.1.tar.gz /modules
cd /modules
cd /etc/puppet/modules
cd /etc/puppet/modules

It also fails if I try to upload the module to the repo via the UI, but that may be bug 1142301  The module I'm trying to upload is https://forgeapi.puppetlabs.com/v3/files/duritong-sysctl-0.0.5.tar.gz

Comment 9 Scott Dodson 2014-11-14 17:17:18 UTC

*** This bug has been marked as a duplicate of bug 1146916 ***