Bug 1316110
| Summary: | hammer import repository-enable/content-views fails to create any CVs | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Lukas Pramuk <lpramuk> |
| Component: | Content Management | Assignee: | Adam Price <adprice> |
| Status: | CLOSED ERRATA | QA Contact: | Lukas Pramuk <lpramuk> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.2.0 | CC: | bbuckingham, ehelms, mmccune |
| Target Milestone: | Unspecified | Keywords: | Regression, Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://projects.theforeman.org/issues/14404 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-07-27 09:26:48 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: | |||
without specifying --wait option step 2. needs two commands and error looks different but the result is the same - no CV created.
2B. Run import repository-enable
# hammer import repository-enable --verbose --csv-file channels.csv
Importing from channels.csv
Enabling /content/dist/rhel/server/6/6Server/x86_64/rhn-tools/os/Packages for channel rhn-tools-rhel-x86_64-server-6 in org 7
Mapping redhat repository [[1, 105]->27].
Summary
Mapped 1 redhat repository.
(wait for syncing, should be fast ~1minute)
# hammer import repository-enable --verbose --synchronize --csv-file channels.csv
Importing from channels.csv
Repository 'RHN Tools for Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server' already enabled as 27.
Creating new redhat content view: RHN Tools for RHEL (v. 6 for 64-bit x86_64)
Caught RestClient::InternalServerError:500 Internal Server Error while processing CSV line:
{"channel_id"=>"105", "channel_label"=>"rhn-tools-rhel-x86_64-server-6", "channel_name"=>"RHN Tools for RHEL (v. 6 for 64-bit x86_64)", "number_of_packages"=>"129", "org_id"=>nil}
Summary
No action taken.
hammer import content-view for importing custom channels fails similarly
# hammer import content-view --verbose --csv-file /tmp/exports/CHANNELS/export.csv
Importing from /tmp/exports/CHANNELS/export.csv
No such {redhat_,}content_view: 105
Creating new content view: Clone of RHN Tools for RHEL (v. 6 for 64-bit x86_64)
Creating new content view: Custom 2
Caught RestClient::InternalServerError:500 Internal Server Error while processing CSV line:
{"org_id"=>"2", "channel_id"=>"111", "channel_label"=>"custom-2", "channel_name"=>"Custom 2"}
No such {redhat_,}content_view: 104
Creating new content view: Clone of Red Hat Network Tools for RHEL Server (v.5 64-bit x86_64)
Creating new content view: Custom 3
Caught RestClient::InternalServerError:500 Internal Server Error while processing CSV line:
{"org_id"=>"3", "channel_id"=>"112", "channel_label"=>"custom-3", "channel_name"=>"Custom 3"}
No such {redhat_,}content_view: 106
Creating new content view: Clone of RHN Tools for RHEL Server (v. 7 for x86_64)
Creating new content view: Custom 1
Caught RestClient::InternalServerError:500 Internal Server Error while processing CSV line:
{"org_id"=>"1", "channel_id"=>"110", "channel_label"=>"custom-1", "channel_name"=>"Custom 1"}
Summary
Created 3 content_views.
Created redmine issue http://projects.theforeman.org/issues/14404 from this bug Upstream bug component is Content Management Moving to POST since upstream bug http://projects.theforeman.org/issues/14404 has been closed ------------- Anonymous Applied in changeset commit:katello|513a691c7c9c5fd43c1e83b89ccedbb50923dfa4. VERIFIED.
@Sat6.2.0-Beta-Snap6.2
tfm-rubygem-katello-3.0.0.14-1.el7sat.noarch <-FIX
tfm-rubygem-hammer_cli_import-0.10.23-1.el7sat.noarch
# hammer import repository-enable --verbose --csv-file /tmp/exports/channels.csv --synchronize --wait --no-async
Importing from /tmp/exports/channels.csv
...
Enabling /content/dist/rhel/server/7/7Server/x86_64/rhn-tools/os/Packages for channel rhn-tools-rhel-x86_64-server-7 in org 5
Mapping redhat repository [[3, 106]->34].
Waiting for uuids (non async): ["09c9fecd-4fa2-4e08-a9ab-3ee7caace0a3"].
Creating new redhat content view: RHN Tools for RHEL Server (v. 7 for x86_64)
Summary
Mapped 12 redhat_repositories.
Created 12 redhat_content_views.
# hammer import content-view --verbose --csv-file /tmp/exports/CHANNELS/export.csv
Importing from /tmp/exports/CHANNELS/export.csv
Creating new content view: Clone of RHN Tools for RHEL (v. 6 for 64-bit x86_64)
Creating new content view: Custom 2
Creating new content view: Clone of Red Hat Network Tools for RHEL Server (v.5 64-bit x86_64)
Creating new content view: Custom 3
Creating new content view: Clone of RHN Tools for RHEL Server (v. 7 for x86_64)
Creating new content view: Custom 1
Summary
Created 6 content_views.
>>> Both Red Hat repositories enablement and Content Views import work
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2016:1501 |
Description of problem: hammer import repository-enable stopped working, no CVs are created only repositories are mapped/enabled. CV creation fails with: 500 Internal Server Error: "undefined method `composite?' for nil:NilClass" Version-Release number of selected component (if applicable): tfm-rubygem-hammer_cli_import-0.10.23-1.el6sat.noarch @Satellite6.2.0-Beta-SNAP2 How reproducible: 100% Steps to Reproduce: 0. Import organization(s) and upload manifest(s) # cat users.csv organization_id,organization,user_id,username,last_name,first_name,position,email,role,creation_time,last_login_time,active 1,SATELLITE QE,1,admin,Admin,Admin,,root@localhost,Satellite Administrator,,,enabled # hammer import organization --csv-file users.csv Summary Created 1 organization. # hammer subscription upload --file MANIFEST --organization 'SATELLITE QE' 1. Prepare csv file for repository-enablement # cat channels.csv channel_id,channel_label,channel_name,number_of_packages,org_id 101,rhel-x86_64-server-6,Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64),0, 2. Run import repository-enable # hammer import repository-enable --verbose --synchronize --wait --csv-file channels.csv Importing from channels.csv Enabling /content/dist/rhel/server/6/6Server/x86_64/rhn-tools/os/Packages for channel rhn-tools-rhel-x86_64-server-6 in org 7 Mapping redhat repository [[1, 105]->29]. Registering tasks for uuids: ["a3e976fa-365d-493d-9306-be2f7de461e3"]. Starting thread for async tasks Waiting for async tasks to finish Asynchronous tasks: 0 of 1 done (~ 0.50%) ... Asynchronous tasks: 0 of 1 done (~67.50%) Condition ["a3e976fa-365d-493d-9306-be2f7de461e3"] met Creating new redhat content view: RHN Tools for RHEL (v. 6 for 64-bit x86_64) Exception caught while executing post-["a3e976fa-365d-493d-9306-be2f7de461e3"]: 500 Internal Server Error: {"displayMessage":"undefined method `composite?' for nil:NilClass","errors":["undefined method `composite?' for nil:NilClass"]} Asynchronous tasks: 1 of 1 done (~100.00%) Exiting thread (exit requested, all tasks done). Summary Mapped 1 redhat repository. Actual results: ISE, no CV created Expected results: CV is created Additional info: