Bug 783099 - Failed to import manifest into SAM
Summary: Failed to import manifest into SAM
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Subscription Asset Manager
Classification: Retired
Component: katello-configure
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Jordan OMara
QA Contact: Tazim Kolhar
URL:
Whiteboard:
Depends On:
Blocks: 703617
TreeView+ depends on / blocked
 
Reported: 2012-01-19 10:47 UTC by Li Bin Liu
Modified: 2016-04-26 00:54 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-04-27 00:21:25 UTC


Attachments (Terms of Use)
manifest used to import into sam. (156.41 KB, application/zip)
2012-01-19 10:47 UTC, Li Bin Liu
no flags Details

Description Li Bin Liu 2012-01-19 10:47:03 UTC
Created attachment 556244 [details]
manifest used to import into sam.

Description of problem:
Failed to import manifest into SAM

Version-Release number of selected component (if applicable):
katello-cli-common-0.1.34-2.el6.noarch
katello-headpin-0.1.125-2.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-cli-headpin-0.1.13-2.el6.noarch
katello-configure-0.1.52-2.el6.noarch
katello-trusted-ssl-cert-1.0-1.noarch
katello-common-0.1.180-2.el6.noarch
katello-headpin-all-0.1.125-2.el6.noarch
katello-glue-candlepin-0.1.180-2.el6.noarch
katello-httpd-ssl-key-pair-1.0-1.noarch
katello-certs-tools-1.0.1-2.el6.noarch
candlepin-0.5.10-1.el6.noarch
candlepin-tomcat6-0.5.10-1.el6.noarch
thumbslug-0.0.21-1.el6.noarch

How reproducible:
always

Steps to Reproduce:
1. Install a vm with below url:
   http://download.englab.nay.redhat.com/pub/rhel/rel-eng/RHEL6.2-20111117.0/6.2/Server/x86_64/os/
2. Log in the vm as root user.
3. deploy and configure sam and it succeeded.
4. Run the below command to try to import manifest:
   headpin -u admin -p admin provider import_manifest --name="Red Hat" --org=ACME_Corporation --file=/root/Desktop/KatelloTest5-manifest-acceptance.zip

Actual results:
  Failed to import the manifest and below error shows:
  Manifest import for provider [ Red Hat ] failed, 'undefined method `repos' for #<Product:0x7f8d2b157fd8>'

Expected results:
  The manifest can be imported successfully.

Additional info:
  I also tried to use web ui to import the manifest but also failed.
  The manifest 'KatelloTest5-manifest-acceptance.zip' has been attached into this bug.

Comment 1 Tom McKay 2012-01-19 13:50:45 UTC
From the pulp log during import into katello (not a fresh install, development environment w/ other existing orgs, etc.):

2012-01-19 08:48:22,120 13886:139817079793408: pulp.server.webservices.controllers.decorators:ERROR: decorators:52 Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py", line 48, in report_error
    return method(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/decorators.py", line 127, in _auth_decorator
    value = method(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/pulp/server/webservices/controllers/repositories.py", line 253, in POST
    content_types=repo_data.get('content_types', 'yum'))
  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo.py", line 308, in create
    raise PulpException("A Repo with relative path `%s` already exists; failed to create repo `%s`" % (r['relative_path'], id))
PulpException: A Repo with relative path `org3/Locker/content/beta/rhel/workstation/5/5.8/x86_64/vt/os` already exists; failed to create repo `org3-Red_Hat_Enterprise_Linux_Workstation-Red_Hat_Enterprise_Linux_5_Workstation_-_Virtualization_Beta_Debug_RPMs_x86_64_58`

Comment 2 Tom McKay 2012-01-19 14:47:43 UTC
The katello import error is due to repos with the same path and is/was a problem on stage. See BZ 769640

Headpin/SAM issue confirmed different and fix in-progress.

Comment 3 Jordan OMara 2012-01-19 20:49:50 UTC
fix committed and in brew (0.1.126-2): c4019f77512ce722537c613949b4110ab7602ad4

Comment 4 Eric Sammons 2012-01-23 14:40:55 UTC
# rpm -qa katello-headpin-all
katello-headpin-all-0.1.126-2.el6.noarch
headpin> product list --org ACME_Corporation
--------------------------------------------------------------------------------
      Product List For Organization ACME_Corporation, Environment 'Locker'

 Id          Name                                                                     Provider Id   Provider Name  
--------------------------------------------------------------------------------
 RH1149049   High-Availability 8 sockets                                              1             Red Hat        
 83          Red Hat Enterprise Linux High Availability for RHEL Server               1             Red Hat        
 90          Red Hat Enterprise Linux Resilient Storage for RHEL Server               1             Red Hat        
 RH0197329   Red Hat Enterprise Linux Server Premium 1-2 sockets Unlimited guests     1             Red Hat        
 RH0197181   Red Hat Enterprise Linux Server Self-support 1-2 sockets Up to 1 guest   1             Red Hat        
 68          Red Hat Enterprise Linux Desktop                                         1             Red Hat        
 69          Red Hat Enterprise Linux Server                                          1             Red Hat        
 RH1316844   Resilient Storage 8 sockets                                              1             Red Hat        
 RH0823221   Red Hat Enterprise Linux Desktop 50 pack Standard                        1             Red Hat        


eadpin> product list --org Org-AhFPd6pUscy6iia8
--------------------------------------------------------------------------------
    Product List For Organization Org-AhFPd6pUscy6iia8, Environment 'Locker'

 Id          Name                                                                     Provider Id   Provider Name  
--------------------------------------------------------------------------------
 83          Red Hat Enterprise Linux High Availability for RHEL Server               2             Red Hat        
 RH1149049   High-Availability 8 sockets                                              2             Red Hat        
 90          Red Hat Enterprise Linux Resilient Storage for RHEL Server               2             Red Hat        
 RH0197329   Red Hat Enterprise Linux Server Premium 1-2 sockets Unlimited guests     2             Red Hat        
 RH0197181   Red Hat Enterprise Linux Server Self-support 1-2 sockets Up to 1 guest   2             Red Hat        
 69          Red Hat Enterprise Linux Server                                          2             Red Hat        
 RH1316844   Resilient Storage 8 sockets                                              2             Red Hat        


I'm not seeing this issue in the latest puddle, I have multiple orgs loaded with manifests successfully.

VERIFIED

Comment 6 Tazim Kolhar 2012-04-09 10:10:43 UTC

No issue in importing the manifests with the build below :

[root@ibm-hs22-03 ~]# rpm -qa katello-headpin
katello-headpin-0.1.145-1.el6.noarch

[root@ibm-hs22-03 ~]# headpin -u admin -p admin provider import_manifest --name "Red Hat" --org ibm-hs22-03testorg --file manifestnew.zip
Manifest imported                     
[root@ibm-hs22-03 ~]# headpin -u admin -p admin product list --org ibm-hs22-03testorg
--------------------------------------------------------------------------------
    Product List For Organization ibm-hs22-03testorg, Environment 'Library'

 Id          Name                                                                     Provider Id   Provider Name   Sync Plan Name   GPG key  
--------------------------------------------------------------------------------
 83          Red Hat Enterprise Linux High Availability for RHEL Server               2             Red Hat                                   
 69          Red Hat Enterprise Linux Server                                          2             Red Hat                                   
 RH1149049   High-Availability 8 sockets                                              2             Red Hat                                   
 RH0197181   Red Hat Enterprise Linux Server Self-support 1-2 sockets Up to 1 guest   2             Red Hat                                   
[root@ibm-hs22-03 ~]# headpin -u admin -p admin product list --org ACME_Corporation
--------------------------------------------------------------------------------
     Product List For Organization ACME_Corporation, Environment 'Library'

 Id   Name   Provider Id   Provider Name   Sync Plan Name   GPG key


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