Hide Forgot
Description of problem: Installation of an puppet module from pulp puppet repo fails when the module has no version requirement specified on the dependency modules. Version-Release number of selected component (if applicable): pulp-admin-client-2.2.0-1.el6.noarch pulp-puppet-admin-extensions-2.2.0-1.el6.noarch pulp-rpm-handlers-2.2.0-1.el6.noarch pulp-consumer-client-2.2.0-1.el6.noarch pulp-builtins-admin-extensions-2.2.0-1.el6.noarch pulp-agent-2.2.0-1.el6.noarch pulp-rpm-admin-extensions-2.2.0-1.el6.noarch pulp-puppet-consumer-extensions-2.2.0-1.el6.noarch pulp-puppet-handlers-2.2.0-1.el6.noarch pulp-builtins-consumer-extensions-2.2.0-1.el6.noarch pulp-rpm-consumer-extensions-2.2.0-1.el6.noarch How reproducible: Always Steps to Reproduce: 1. Create an puppet module with an dependency but with no version requirement specified. e.g. # cat Modulefile name 'pgustafs-test' version '0.0.1' dependency 'puppetlabs/stdlib' description "Test Module" author 'Peter Gustafsson' 2. Upload the module to an pulp puppet repo: # pulp-admin puppet repo uploads upload -f /tmp/test/pkg/pgustafs-test-0.0.1.tar.gz --repo-id test1 3. Publish the repo: # pulp-admin puppet repo publish run --repo-id=test1 Actual results: 4. List the repo: # pulp-admin puppet repo modules --repo-id=test1 Name: stdlib Version: 4.1.0 Author: puppetlabs Dependencies: Description: Standard Library for Puppet Modules License: Apache 2.0 Project Page: https://github.com/puppetlabs/puppetlabs-stdlib Source: git://github.com/puppetlabs/puppetlabs-stdlib.git Summary: Puppet Module Standard Library Tag List: None Types: Doc: A simple resource type intended to be used as an anchor in a composite class. In Puppet 2.6, when a class declares another class, the resources in the interior class are not contained by the exterior class. This interacts badly with the pattern of composing complex modules from smaller classes, as it makes it impossible for end users to specify order relationships between the exterior class and other modules. The anchor type lets you work around this. By sandwiching any interior classes between two no-op resources that _are_ contained by the exterior class, you can ensure that all resources in the module are contained. class ntp { # These classes will have the correct order relationship with each # other. However, without anchors, they won't have any order # relationship to Class['ntp']. class { 'ntp::package': } -> class { 'ntp::config': } -> class { 'ntp::service': } # These two resources "anchor" the composed classes within the ntp # class. anchor { 'ntp::begin': } -> Class['ntp::package'] Class['ntp::service'] -> anchor { 'ntp::end': } } This allows the end user of the ntp module to establish require and before relationships with Class['ntp']: class { 'ntp': } -> class { 'mcollective': } class { 'mcollective': } -> class { 'ntp': } Name: anchor Parameters: Doc: The name of the anchor resource. Name: name Properties: Doc: Ensures that a given line is contained within a file. The implementation matches the full line, including whitespace at the beginning and end. If the line is not contained in the given file, Puppet will add the line to ensure the desired state. Multiple resources may be declared to manage multiple lines in the same file. Example: file_line { 'sudo_rule': path => '/etc/sudoers', line => '%sudo ALL=(ALL) ALL', } file_line { 'sudo_rule_nopw': path => '/etc/sudoers', line => '%sudonopw ALL=(ALL) NOPASSWD: ALL', } In this example, Puppet will ensure both of the specified lines are contained in the file /etc/sudoers. Name: file_line Parameters: Doc: An arbitrary name used as the identity of the resource. Name: name Doc: An optional regular expression to run against existing lines in the file;\nif a match is found, we replace that line rather than adding a new line. Name: match Doc: The line to be appended to the file located by the path parameter. Name: line Doc: The file Puppet will ensure contains the line specified by the line parameter. Name: path Properties: Doc: The basic property that the resource should be in. Valid values are `present`, `absent`. Name: ensure Name: test Version: 0.0.1 Author: pgustafs Dependencies: Name: puppetlabs/stdlib Description: Test Module License: Apache License, Version 2.0 Project Page: UNKNOWN Source: UNKNOWN Summary: UNKNOWN Tag List: None Types: 5. Install the puppet module: # puppet module install --module_repository=http://.:test1@mc-pulp-01 --target-dir /tmp pgustafs/test Notice: Preparing to install into /tmp ... Notice: Downloading from http://.:test1@mc-pulp-01 ... Error: Could not execute operation for 'pgustafs/test' The server being queried was http://.:test1@mc-pulp-01 The HTTP response we received was '500 Internal Server Error' Check the author and module names are correct. And below is seen in /var/log/httpd/error_log on the pulp server. [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] mod_wsgi (pid=19934): Exception occurred processing WSGI script '/srv/pulp/puppet_forge_api.wsgi'. [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] Traceback (most recent call last): [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/web/application.py", line 279, in wsgi [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] result = self.handle_with_processors() [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 26, in _handle_with_processors [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] return process(self.processors) [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 23, in process [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] return p(lambda : process(processors)) [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/web/application.py", line 566, in processor [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] return handler() [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 23, in <lambda> [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] return p(lambda : process(processors)) [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 23, in process [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] return p(lambda : process(processors)) [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/web/application.py", line 581, in processor [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] result = handler() [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 23, in <lambda> [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] return p(lambda : process(processors)) [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/pulp/server/webservices/application.py", line 25, in process [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] return self.handle() [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/web/application.py", line 230, in handle [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] return self._delegate(fn, self.fvars, args) [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/web/application.py", line 420, in _delegate [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] return handle_class(cls) [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/web/application.py", line 396, in handle_class [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] return tocall(*args) [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/pulp_puppet/forge/api.py", line 60, in GET [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] data = releases.view(*credentials, module_name=module_name, version=version) [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/pulp_puppet/forge/releases.py", line 60, in view [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] data = unit.build_dep_metadata() [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/pulp_puppet/forge/unit.py", line 200, in build_dep_metadata [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] root = {self.name: [self.to_dict()]} [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/pulp_puppet/forge/unit.py", line 249, in to_dict [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] 'dependencies' : self._deps_as_list, [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] File "/usr/lib/python2.6/site-packages/pulp_puppet/forge/unit.py", line 234, in _deps_as_list [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] return [[dep['name'], dep['version_requirement']] for dep in self.dependencies] [Wed Nov 06 10:34:44 2013] [error] [client 192.168.122.100] KeyError: 'version_requirement' Expected results: Additional info:
https://github.com/pulp/pulp_puppet/pull/97
build: 2.4.0-0.7.beta
Created attachment 909206 [details] verifiyng screenlog over RHEL6.5
This has been fixed in Pulp 2.4.0-1.