Bug 538144

Summary: Deleting a synced repository removes the channel from the available channel list from content source
Product: [Other] RHQ Project Reporter: wes hayutin <whayutin>
Component: ContentAssignee: Jay Dobies <jason.dobies>
Status: CLOSED WORKSFORME QA Contact: wes hayutin <whayutin>
Severity: medium Docs Contact:
Priority: urgent    
Version: unspecifiedCC: cwelton, jason.dobies
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://core-01.usersys.redhat.com:7080/rhq/content/importRepos.xhtml?conversationId=3272
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-26 12:37:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 538145    
Attachments:
Description Flags
import a repo
none
delete a repo
none
repo is missing from the hosted list none

Description wes hayutin 2009-11-17 18:28:45 UTC
Description of problem:

Deleting a synced repository removes the channel from the available channel list from content source.

Steps to reproduce
1. go to http://core-01.usersys.redhat.com:7080/rhq/content/listRepos.xhtml
Content -> providers

2. click import
- import a repository, ie.. redhat-linux-alpha-6.2
- rhq successfully imports the channel "1 Repositories imported from Content Provider"

3. Delete the freshly imported repository,  redhat-linux-alpha-6.2
repository is successfully deleted, although there is not message

4. try to re-import the repository , redhat-linux-alpha-6.2
The repository is no longer available to be imported.  It does not show up in the list

Comment 1 wes hayutin 2009-11-17 18:32:11 UTC
Created attachment 369930 [details]
import a repo

Comment 2 wes hayutin 2009-11-17 18:32:32 UTC
Created attachment 369931 [details]
delete a repo

Comment 3 wes hayutin 2009-11-17 18:32:59 UTC
Created attachment 369932 [details]
repo is missing from the hosted list

Comment 4 Jay Dobies 2009-12-07 16:37:46 UTC
I'm not able to reproduce this, but I suspect it's due to a lack of documentation on how the candidate repos are supposed to work.

Candidate repos are introduced into the system when a content provider is syncced. In other words, I have a RHN hosted provider that periodically asks hosted what repos it can introduce into the system. For any repos that aren't already imported, it adds a candidate repo that is shown in the import list.

When a repo is imported, it's yanked out of the candidate queue and made a real (imported) repo. In the database, that just flips a flag, using the same entry in the repo table.

When a repo is deleted, that row is then deleted from the database. It's not reconfigured to be an imported repo again.

However, when the next hosted provider sync takes place, that repo will be part of the sync and be re-created in the database as a candidate repo. At that point, you'll be able to reimport it again (technically speaking, there is nothing "re-import" about it, it's effectively as if the initial import hadn't taken place).

All that said, I think this is the functionality we want. I'm hesitant to get into the process of tracking which repos were the results of an import and thus flipping them back into the candidate repo queue on a delete. There's a lot 

If anything, I'd say we could schedule an immediate provider sync for all providers associated with a repo when it is deleted. That would cause that repo to reappear in the candidate list. Although I think we'd be safe to just leave this as a documentation point.

Comment 5 Corey Welton 2009-12-11 17:21:31 UTC
>If anything, I'd say we could schedule an immediate provider sync for all
>providers associated with a repo when it is deleted. That would cause that repo
>to reappear in the candidate list. Although I think we'd be safe to just leave
>this as a documentation point.  

I like the idea of doing a provider sync, though if we just want to document the current behaviour, I'm amenable.

Comment 6 Corey Welton 2010-03-26 12:37:07 UTC
QA Closing.