Bug 1013656 - Invalid puppet module error needs to be more helpful
Invalid puppet module error needs to be more helpful
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
6.0.2
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: David Davis
Sachin Ghai
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-30 10:24 EDT by David Davis
Modified: 2014-04-24 13:10 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-24 13:09:08 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)
pulp-admin error (37.54 KB, image/png)
2013-09-30 10:24 EDT, David Davis
no flags Details

  None (edit)
Description David Davis 2013-09-30 10:24:48 EDT
Created attachment 805240 [details]
pulp-admin error

If you have a bad name for your puppet module, the CLI only says "Invalid puppet module". We should probably display an error like pulp-admin (see attached).
Comment 2 David Davis 2013-09-30 15:35:30 EDT
https://github.com/Katello/katello-cli/pull/96
Comment 3 David Davis 2013-10-07 07:49:07 EDT
katello-cli SHA ed8266fbb083b4c76fa9d50988e75631ddd1b7e2

1013656: Showing a more helpful error message for puppet modules
Comment 6 Sachin Ghai 2013-10-21 03:33:57 EDT
Verified with snap6 compose2 (MDP2)

katello-qpid-client-key-pair-1.0-1.noarch
katello-glue-candlepin-1.4.6-40.el6sat.noarch
katello-1.4.6-40.el6sat.noarch
katello-foreman-all-1.4.6-40.el6sat.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-configure-1.4.7-6.el6sat.noarch
signo-katello-0.0.23-2.el6sat.noarch
katello-glue-elasticsearch-1.4.6-40.el6sat.noarch
ruby193-rubygem-katello-foreman-engine-0.0.12-3.el6sat.noarch
katello-cli-1.4.3-24.el6sat.noarch
katello-certs-tools-1.4.4-1.el6sat.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
ruby193-rubygem-foreman-katello-engine-0.0.17-6.el6sat.noarch
katello-common-1.4.6-40.el6sat.noarch
pulp-katello-plugins-0.2-1.el6sat.noarch
katello-configure-foreman-1.4.7-6.el6sat.noarch
katello-selinux-1.4.4-4.el6sat.noarch
katello-cli-common-1.4.3-24.el6sat.noarch
katello-glue-pulp-1.4.6-40.el6sat.noarch
katello-all-1.4.6-40.el6sat.noarch
ruby193-rubygem-katello_api-0.0.3-4.el6sat.noarch


when I upload a valid puppet module, it uploads successfully. 
[root@dhcp201-118 home]# katello --username admin --password admin repo content_upload --content_type puppet  --org ACME_Corporation --product sync-test1-1018-190841-889 --repo testrepo-1018-190841-889 --file /home/brucem-ezpublish-0.2.0.tar.gz

Successfully uploaded 'brucem-ezpublish-0.2.0.tar.gz' into repository
Successfully imported content into repository.

However in case of invalid module/file, the error is updated like as below:

katello --username admin --password admin repo content_upload --content_type puppet  --org ACME_Corporation --product sync-test1-1018-190841-889 --repo testrepo-1018-190841-889 --file /home/apache-0.2.0.tar.gz 

Invalid puppet module '/home/apache-0.2.0.tar.gz'. Please make sure the file is valid and is named author-name-version.tar.gz (eg: puppetlabs-ntp-2.0.1.tar.gz).
>>Importing content into repositoryundefined method `each' for nil:NilClass

So, Error message shouldn't include "Importing content into repositoryundefined method `each' for nil:NilClass"
Comment 7 David Davis 2013-10-21 08:12:53 EDT
Sachin, this fix only changed this error message:

Invalid puppet module '/home/apache-0.2.0.tar.gz'.

To this:

Invalid puppet module '/home/apache-0.2.0.tar.gz'. Please make sure the file is valid and is named author-name-version.tar.gz (eg: puppetlabs-ntp-2.0.1.tar.gz).

You can look at the PR to confirm. The extra dialogue and error message you are seeing ("Importing content into repositoryundefined method `each' for nil:NilClass") is not related. I think it's from these changes: https://bugzilla.redhat.com/show_bug.cgi?id=1010339#c3.
Comment 8 Sachin Ghai 2013-10-21 08:17:32 EDT
Thanks David for quickly checking this.. 

As per comment7, I'm moving this bz to verified and will open a new Bz for this issue:

"Importing content into repositoryundefined method `each' for nil:NilClass"
Comment 9 David Davis 2013-10-21 08:23:44 EDT
Ah ok cool. I already opened a new bugzilla:

https://bugzilla.redhat.com/show_bug.cgi?id=1021501
Comment 12 Bryan Kearney 2014-04-24 13:09:08 EDT
This was verified and delivered with MDP2. Closing it out.
Comment 13 Bryan Kearney 2014-04-24 13:10:44 EDT
This was delivered and verified with MDP2. Closing the bug.

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