Bug 1018801 - NameError: undefined local variable or method `unit_type_id' on content upload
NameError: undefined local variable or method `unit_type_id' on content upload
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
6.0.2
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: --
Assigned To: Justin Sherrill
Sachin Ghai
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-14 08:35 EDT by David Davis
Modified: 2014-04-24 13:11 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-24 13:10:20 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)
successfully uploaded the puppet module (76.68 KB, image/png)
2013-10-21 01:38 EDT, Sachin Ghai
no flags Details

  None (edit)
Description David Davis 2013-10-14 08:35:47 EDT
NameError: undefined local variable or method `unit_type_id' on content upload. Looks like we're calling an instance method in a class method in the new applicability code.

https://github.com/Katello/katello/pull/3131/files#diff-ad849f0f01f3789c134cc112da76dc37R235
Comment 1 Corey Welton 2013-10-14 14:14:42 EDT
Need repro steps for this.
Comment 2 David Davis 2013-10-14 14:31:41 EDT
Steps to reproduce

1. Upload module or package from CLI or UI
Comment 3 David Davis 2013-10-14 14:35:05 EDT
Make sure you have the new errata applicability code when you test:

https://github.com/Katello/katello/pull/3131

You will see the following error either in the UI or CLI:

"undefined local variable or method `unit_type_id' for #<Class:0x0000000a39f350>"
Comment 4 Justin Sherrill 2013-10-14 16:25:38 EDT
https://github.com/Katello/katello/pull/3176
Comment 8 Sachin Ghai 2013-10-21 01:37:28 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

I can upload the puppet module from UI. Please see the first attachment.
Comment 9 Sachin Ghai 2013-10-21 01:38:38 EDT
Created attachment 814403 [details]
successfully uploaded the puppet module
Comment 10 Sachin Ghai 2013-10-21 01:53:49 EDT
UI shows upload option for uploading a puppet module to existing repo.

But I can't find a way to upload a package to existing yum repo.
Can you please point me the exact steps ?
Comment 11 Sachin Ghai 2013-10-21 03:42:54 EDT
I can upload a puppet module/package from cli sucessfully

rpm package to yum repo:

[root@dhcpxxxx home]# katello --username admin --password admin repo content_upload --content_type yum  --org ACME_Corporation --product sync-test1-1018-191702-387 --repo testrepo-1018-191702-387  --file /home/bear-4.1-1.noarch.rpm 
Successfully uploaded 'bear-4.1-1.noarch.rpm' into repository
Successfully imported content into repository.


puppet module to puppet repo:

[root@dhcpxxxx 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.
Comment 12 Sachin Ghai 2013-10-21 09:11:24 EDT
Confirmed with Eric, uploading a rpm package from UI is a future feature. And rest all I've tested required for this bugzilla.

- Uploading a Puppet module from cli and UI is working
- Uploading a rpm package from cli is also working.

So moving this bz to verified.
Comment 15 Bryan Kearney 2014-04-24 13:10:20 EDT
This was verified and delivered with MDP2. Closing it out.
Comment 16 Bryan Kearney 2014-04-24 13:11:38 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.