Bug 1126027 - don't create empty local repositories when importing content views
Summary: don't create empty local repositories when importing content views
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Transitions
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Matej Kollar
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks: stargate-GA-tracker
TreeView+ depends on / blocked
 
Reported: 2014-08-01 15:49 UTC by Tomas Lestach
Modified: 2014-09-11 12:22 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-11 12:22:13 UTC


Attachments (Terms of Use)

Description Tomas Lestach 2014-08-01 15:49:13 UTC
Description of problem:
When importing content-views and no local packages are needed for creating the content-view, do not create default empty 'lLocal repository for <content view>'.

How reproducible:
always

Steps to Reproduce:
1. create a spacewalk-channel-export with a content view that contains *only* packages from an external repository.
2. import and sync external repository from 1) using hammer import repository cmd
2. run hammer import content-view cmd

Actual results:
hammer import content-view --csv-file=/tmp/tmp.bTweR9mEWM/export.csv --synchronize --wait --verbose
Importing from /tmp/tmp.bTweR9mEWM/export.csv
Product [100Local-repositories->39] already imported.
Creating new local_repository: Local repository for nightly-client-rhel
Repository Local_repository_for_nightly-client-rhel is not (fully) synchronized. 

Expected results:
Do not create empty Local_repository if not needed.
Then the content-view could be created in the 1st run of content-host import (no need to wait for the empty local repository sync).

Comment 2 Matej Kollar 2014-08-05 09:44:32 UTC
hammer-cli-import.git: df08d0597016590c7be29d1ee6bdb33f16bd33d4

Comment 4 Grant Gainey 2014-09-07 22:01:36 UTC
DEVELOPER VERIFIED:

dev-test contains export-data that meets the reproducer criteria (external repositories with NO local packages).  Importing and creating content-views no longer create sthe (unsynchronized) Local_repository:

===
(master) ~/hammer-cli-import/tests/data $ hammer import repository  --csv-file ~/hammer-cli-import/tests/data/repositories.csv --verbose --synchronize --wait
Importing from /root/hammer-cli-import/tests/data/repositories.csv
Creating new product: GALAXY.COM
Creating new repository: Tatooine
Registering tasks for uuids: ["1047310a-226c-4239-b95b-093330ff9e3d"].
Starting thread for async tasks
Skipping Alderaan repository import, invalid source_url.
Creating new product: REDHAT.COM
Creating new repository: Spacewalk Client
Condition ["1047310a-226c-4239-b95b-093330ff9e3d"] met
Asynchronous tasks: 1 of 1 done (~100.00%)
Registering tasks for uuids: ["8aea8291-0aa5-4a8d-9af8-2d1d0e09d931"].
Product [100REDHAT.COM->2] already imported.
Creating new repository: Spacewalk 2.2 Client
Registering tasks for uuids: ["7bf8c88b-6f99-4368-a7f3-b374cc372d16"].
Asynchronous tasks: 1 of 3 done (~15.95%)
Asynchronous tasks: 1 of 3 done (~38.15%)
Asynchronous tasks: 1 of 3 done (~58.82%)
Asynchronous tasks: 1 of 3 done (~76.47%)
Condition ["8aea8291-0aa5-4a8d-9af8-2d1d0e09d931"] met
Asynchronous tasks: 2 of 3 done (~79.41%)
Asynchronous tasks: 2 of 3 done (~67.65%)
Condition ["7bf8c88b-6f99-4368-a7f3-b374cc372d16"] met
Asynchronous tasks: 3 of 3 done (~100.00%)
Exiting thread (exit requested, all tasks done).
Summary
  Found 1 product.
  Skipped 1 repository.
  Created 3 repositories.
  Created 2 products.
(master) ~/hammer-cli-import/tests/data $ hammer import content-view --csv-file ~/hammer-cli-import/tests/data/export.csv --synchronize --wait --verbose
Importing from /root/hammer-cli-import/tests/data/export.csv
Creating new content view: Spacewalk nightly client
Creating new content view: Spacewalk 2.2 client
Summary
  Created 2 content_views.
(master) ~/hammer-cli-import/tests/data $ rpm -q rubygem-hammer_cli_import
rubygem-hammer_cli_import-0.10.4-1.el6.noarch
(master) ~/hammer-cli-import/tests/data $
===

Examining via the webui shows no Local_repository created as well.

Comment 5 Bryan Kearney 2014-09-11 12:22:13 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


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