[katello-devel] Demotions and deletions

Bryan Kearney bkearney at redhat.com
Thu Aug 30 12:27:56 UTC 2012


On 08/30/2012 04:52 AM, Lukas Zapletal wrote:
> On Wed, Aug 29, 2012 at 05:02:49PM -0400, Brad Buckingham wrote:
>> I took a brief look at the error that Mike mentioned above and it is
>> the same one described in the bugzilla that Lukas is working on a
>> solution for (i.e.
>> https://bugzilla.redhat.com/show_bug.cgi?id=835875 ).  (I didn't
>> realize it was the same one until I ran through the reproducer.)
>>
>> What I observed was essentially what was mentioned in the bz and
>> thread.  When a user deletes a repository from Library, Katello
>> cleans up content in candlepin's cp_product and cp_content tables;
>> however, if the repository has been promoted to another environment
>> (e.g. Dev), the records will remain in candlepin.   This appears to
>> be the reason the error is generated.
>>
>>      Note, the following are the log references that perform that cleanup:
>>          Resource DELETE request:
>> /candlepin/products/1346272223107/content/1346272248579
>>          Resource DELETE request: /candlepin/content/1346272248579
>>
>> We could possibly trigger the deletion of those records to also
>> occur when deleting repositories from Library that were previously
>> promoted; however, I wonder if that might cause problems when using
>> the content that remains in the later environments (e.g. Dev, Test).
>>
>> For example, assume:
>> 1. create provider/product/repo : zoo/zoo/zoo
>> 2. sync repo: zoo
>> 3. promote zoo product to dev & test
>>
>> When 1 occurs, the cp_product will get a record for 'zoo' and
>> cp_content will get a record for 'ACME_Corporation_zoo_zoo'.  There
>> are no additional records created in these tables during 3;
>> therefore, I wonder if this information needed for a consumer to be
>> able to subscribe to and receive content from the dev and test
>> environments?  If so, we may want to prohibit deleting a repository
>> from Library, if it has been promoted.  This would essentially mean
>> that Katello would need to warn the user that the content has been
>> promoted to dev and test, the user would need to first delete it
>> from those environments and then they may delete it from Library.
>
> Brad++ what an analysis!
>
> So to test your assumption, I just need to consume some content from an
> environment after the content is deleted from the Library, right?
>
> If this is confirmed, we are back to the scenario 1 - just don't let
> user to delete it until it's promoted.
>
> Opinions?
>
unitl its promoted? Or, you have to delete the promotions and then you 
can delete the repo?

-- bk




More information about the katello-devel mailing list