Bug 1316681 - Can't delete puppet module repo
Summary: Can't delete puppet module repo
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Management
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
unspecified
high vote
Target Milestone: Unspecified
Assignee: Andrew Kofink
QA Contact: Roman Plevka
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-10 18:33 UTC by Brad Buckingham
Modified: 2020-08-13 08:24 UTC (History)
6 users (show)

Fixed In Version: rubygem-katello-3.0.0.26-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:23:14 UTC
Target Upstream Version:


Attachments (Terms of Use)
puppet repo removal task (22.55 KB, image/png)
2016-05-24 09:05 UTC, Roman Plevka
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 14141 0 None None None 2016-04-22 15:13:26 UTC

Description Brad Buckingham 2016-03-10 18:33:06 UTC
error is:
<pre>
 undefined method `repoids' for #<Katello::PuppetModule:0x00000005685858>
</pre>

screenshot w/ traceback http://www.clipular.com/c/5955964155461632.png?k=VF3tc3oAEQhp8TFxXc1F12rc8aM

To reproduce:
1. Create a puppet module repo
2. Delete puppet module repo

I had the repo published in a content view, so that may be a factor as well.

Comment 1 Brad Buckingham 2016-03-10 18:33:09 UTC
Created from redmine issue http://projects.theforeman.org/issues/14141

Comment 2 Brad Buckingham 2016-03-10 18:34:20 UTC
It looks like this issue may have been introduced by the following commit which introduced additional modeling for the module:

https://github.com/Katello/katello/commit/eccdbdebb3f859afa83998c44fca20fc441d5505#diff-7c38fb2787634c4edb51230f15b7ecc4R8

It looks like the model does have a 'repositories' relationship, so we can probably update 'puppet_module.repoids' to be something like 'puppet_module.repository_ids'. We need to make sure, however, that there are no other scenarios where repoids is still being used.

Comment 4 Andrew Kofink 2016-03-11 18:28:31 UTC
Full text search on all of Katello, Foreman, and Hammer-Cli modules shows that there are no other instances of the string ".repoids".

Comment 6 Bryan Kearney 2016-04-08 20:08:03 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/14141 has been closed
-------------
Brad Buckingham
It looks like this issue may have been introduced by the following commit which introduced additional modeling for the module:

https://github.com/Katello/katello/commit/eccdbdebb3f859afa83998c44fca20fc441d5505#diff-7c38fb2787634c4edb51230f15b7ecc4R8

It looks like the model does have a 'repositories' relationship, so we can probably update 'puppet_module.repoids' to be something like 'puppet_module.repository_ids'.  We need to make sure, however, that there are no other scenarios where repoids is still being used.
-------------
Andrew Kofink
Applied in changeset commit:katello|910a37157f295bb5b11a393c19c417172b365156.

Comment 7 Julio Entrena Perez 2016-05-13 14:17:39 UTC
I just tested 910a37157f295bb5b11a393c19c417172b365156 on a 6.2 beta and it still fails.
Removing all puppet modules from the puppet repo results in the puppet repo being deleted correctly (so I can delete the puppet repo if it's empty and does not contain any modules).

Comment 8 Roman Plevka 2016-05-23 13:56:20 UTC
(In reply to Julio Entrena Perez from comment #7)
> I just tested 910a37157f295bb5b11a393c19c417172b365156 on a 6.2 beta and it
> still fails.
> Removing all puppet modules from the puppet repo results in the puppet repo
> being deleted correctly (so I can delete the puppet repo if it's empty and
> does not contain any modules).

Testing this on 6.2.0 Beta (GA12.1) - I'm unable to reproduce this issue.
I created a puppet repo, uploaded a ntp module, i even tried to publish + promote CV containing this module - every time puppet repository has been successfully deleted.

Julio, Could you share your steps for reproducing the issue?

Comment 9 Julio Entrena Perez 2016-05-23 14:04:12 UTC
(In reply to Roman Plevka from comment #8)
> 
> Julio, Could you share your steps for reproducing the issue?

- Create a test product (to be able to create a puppet repo in it)
- Create a puppet repo
- Upload or sync at least one puppet module
- Try to delete tyhe puppet repository

undefined method `repoids' for #<Katello::PuppetModule:0x007f0f12168140>

Can't comment on GA12.1 since I need to keep public beta to be able to confirm customer reported issues.

Comment 12 Roman Plevka 2016-05-24 09:05:26 UTC
Created attachment 1160943 [details]
puppet repo removal task

VERIFIED
on sat6.2.0 GA12.1
The task now finishes successfully and the repo is removed even with uploaded puppet modules. I also tried to publish and promote a content view with the module, removal still works flawlessly.

Comment 13 Bryan Kearney 2016-07-27 11:23:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501


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