Bug 538144 - Deleting a synced repository removes the channel from the available channel list from content source
Summary: Deleting a synced repository removes the channel from the available channel l...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: RHQ Project
Classification: Other
Component: Content
Version: unspecified
Hardware: All
OS: Linux
urgent
medium
Target Milestone: ---
: ---
Assignee: Jay Dobies
QA Contact: wes hayutin
URL: http://core-01.usersys.redhat.com:708...
Whiteboard:
Depends On:
Blocks: RHQ_CONT_REPO
TreeView+ depends on / blocked
 
Reported: 2009-11-17 18:28 UTC by wes hayutin
Modified: 2010-03-26 12:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-26 12:37:07 UTC
Embargoed:


Attachments (Terms of Use)
import a repo (141.13 KB, image/png)
2009-11-17 18:32 UTC, wes hayutin
no flags Details
delete a repo (161.33 KB, image/png)
2009-11-17 18:32 UTC, wes hayutin
no flags Details
repo is missing from the hosted list (140.93 KB, image/png)
2009-11-17 18:32 UTC, wes hayutin
no flags Details

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.


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