[katello-devel] Demotions and deletions - solution

Brad Buckingham bbuckingham at redhat.com
Fri Aug 31 21:08:19 UTC 2012


Given that deleting a repo (from the custom providers screen) after
the it has been promoted, puts the server in a state where you
cannot recreate a repo with the same name, I lean towards something
like the following in the short-term:

1. If the user attempts to delete a repo (from providers screen) and the
repo was not previously promoted, allow the deletion to occur.

2. If the user attempts to delete a repo (from providers screen) and the
repo was previously promoted:

     a. Do not allow the repo to be deleted.  A couple of ways this could be
         handled might be:

         i. Disable the 'remove' link so the user doesn't have the option.
            Add a tipsy next to the remove link that when hovered the 
user can
            be given information on 'why' the remove link is disabled.  
(e.g.
            "Before removing this repo from the product, it must first 
be deleted
            from the following environments using a deletion changeset: 
A, B, C.")

         ii. Allow the user to click the link, but provide them a dialog 
similar to
            the one mentioned in i. above.

     b. Update the code such that once the last instance of the repo is 
deleted
         from the environment paths, it is also removed from candlepin
         (e.g. cp_product/cp_content).  I.e. this is currently done 
today for 1;
         however, in order to address the jdbc error described in the 
bugzilla,
         we need to do the same in cases where the repo has been promoted.

In the longer-term, we need investigate and provide a more robust 
solution similar
to what Mike described to make it easier for users to delete the repo
from multiple or all environments (after it has been promoted). For 
example,
we could auto-create deletion changesets (as suggested previously), provide
the ability to execute multiple changesets in some predefined order...etc.


On 08/31/2012 11:59 AM, Lukas Zapletal wrote:
> After chat with Brad, we came to conclusion there are two good solution:
>
> A) Do not let user to delete a repo that has promoted content
>
> A) Do not allow a user to delete a repo that has been promoted... in
> this case, give the user a strong warning that it must first be deleted
> from A,B,C environments
>
> B) Allow users to delete repos. When creating a repo, first check if the
> name is already used in any environment. If so, do not let user to
> create the repo telling him/her he need to choose a different one or to
> delete all repositories with that name using changesets.
>
> C) B + auto create deletion changeset when deleting repos. This is what
> Mike recommend I guess plus with the B check. (*)
>
> (*) The question is do we want to auto create for ALL possible
> environment paths? That could be lots of changesets. Maybe to do this
> optional, or maybe even a separate command/action. Something like
> "recursive promote".
>
> LZ
>
>
> On Tue, Aug 28, 2012 at 12:29:47PM +0200, Lukas Zapletal wrote:
>> Hey,
>>
>> stumbled upon a bug (https://bugzilla.redhat.com/show_bug.cgi?id=835875)
>> that prevents you from creating a repository with a same name that has
>> been deleted (but promoted).
>>
>> Now the question - we now do support demotions (those promotions
>> opposite - not sure about wording). Therefore I guess the proper
>> solution would be to check if the repository (*) was already promoted.
>> If so, Katello will refuse to delete the object asking user to do the
>> demotion.
>>
>> Opinions?
>>
>> (*) this should apply to anything that is promotable:
>>
>> - product
>> - repo
>> - template
>> - package
>> - erratum
>> - distribution
>>
>> -- 
>> Later,
>>
>>   Lukas "lzap" Zapletal
>>   #katello #systemengine
>>
>> _______________________________________________
>> katello-devel mailing list
>> katello-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/katello-devel




More information about the katello-devel mailing list