Bug 1316681 - Can't delete puppet module repo
Can't delete puppet module repo
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.0.4
Unspecified Unspecified
unspecified Severity high (vote)
: GA
: --
Assigned To: Andrew Kofink
Roman Plevka
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-10 13:33 EST by Brad Buckingham
Modified: 2017-03-13 17:07 EDT (History)
6 users (show)

See Also:
Fixed In Version: rubygem-katello-3.0.0.26-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 07:23:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 14141 None None None 2016-04-22 11:13 EDT

  None (edit)
Description Brad Buckingham 2016-03-10 13:33:06 EST
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 13:33:09 EST
Created from redmine issue http://projects.theforeman.org/issues/14141
Comment 2 Brad Buckingham 2016-03-10 13:34:20 EST
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 13:28:31 EST
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 16:08:03 EDT
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 10:17:39 EDT
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 09:56:20 EDT
(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 10:04:12 EDT
(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 05:05 EDT
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 07:23:14 EDT
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.