Bug 1382356
Summary: | [RFE] Delete smart class parameter when a puppet class is deleted | |||
---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Og Maciel <omaciel> | |
Component: | Smart Variables | Assignee: | orabin | |
Status: | CLOSED ERRATA | QA Contact: | Lukas Pramuk <lpramuk> | |
Severity: | medium | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 6.3.0 | CC: | andrew.schofield, bbuckingham, bkearney, ehelms, jcallaha, kabbott, kgaikwad, lpramuk, mmccune, orabin, paji, zhunting | |
Target Milestone: | Unspecified | Keywords: | FutureFeature, PrioBumpField, Reopened, Triaged | |
Target Release: | Unused | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | foreman-1.15.0-1.el7sat | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1426394 (view as bug list) | Environment: | ||
Last Closed: | 2018-02-21 12:35:52 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1383386, 1426394 |
Description
Og Maciel
2016-10-06 13:09:12 UTC
Upstream bug assigned to orabin Upstream bug assigned to orabin Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17810 has been resolved. Please add verifications steps for this bug to help QE verify Steps to verify: 1. Import any puppet class with parameters 2. Delete the puppet class and import it again 4. Check that there is only one copy of the parameter in Configure -> Smart class parameters Expected result: There should only be one copy of the parameter and it should also be connected to the puppet class VERIFIED. Though this BZ no longer honor its title: "Need a machanism..." With the fix you just do not need such mechanism. So not an RFE. @satellite-6.2.9-1.0.el7sat.noarch foreman-1.11.0.73-1.el7sat.noarch Used manual reproducer in comment#8 with foreman_scap_client REPRO: # hammer -p changeme sc-param list --puppet-class foreman_scap_client ---|------------------|-----------------------------------------------------|----------|-------------------- ID | PARAMETER | DEFAULT VALUE | OVERRIDE | PUPPET CLASS ---|------------------|-----------------------------------------------------|----------|-------------------- 22 | ca_file | ${$::foreman_scap_client::params::ca_file} | | foreman_scap_client 22 | ca_file | ${$::foreman_scap_client::params::ca_file} | | foreman_scap_client 23 | host_certificate | ${$::foreman_scap_client::params::host_certificate} | | foreman_scap_client 23 | host_certificate | ${$::foreman_scap_client::params::host_certificate} | | foreman_scap_client 24 | host_private_key | ${$::foreman_scap_client::params::host_private_key} | | foreman_scap_client 24 | host_private_key | ${$::foreman_scap_client::params::host_private_key} | | foreman_scap_client 25 | policies | | true | foreman_scap_client 25 | policies | | true | foreman_scap_client 21 | port | | true | foreman_scap_client 21 | port | | true | foreman_scap_client 20 | server | | true | foreman_scap_client 20 | server | | true | foreman_scap_client ---|------------------|-----------------------------------------------------|----------|-------------------- vs. FIX: # hammer -p changeme sc-param list --puppet-class foreman_scap_client ---|------------------|-----------------------------------------------------|----------|-------------------- ID | PARAMETER | DEFAULT VALUE | OVERRIDE | PUPPET CLASS ---|------------------|-----------------------------------------------------|----------|-------------------- 22 | ca_file | ${$::foreman_scap_client::params::ca_file} | | foreman_scap_client 23 | host_certificate | ${$::foreman_scap_client::params::host_certificate} | | foreman_scap_client 24 | host_private_key | ${$::foreman_scap_client::params::host_private_key} | | foreman_scap_client 25 | policies | | true | foreman_scap_client 21 | port | | true | foreman_scap_client 20 | server | | true | foreman_scap_client ---|------------------|-----------------------------------------------------|----------|-------------------- >>> with the fix you get no orphaned sc params any longer (UI/CLI) Also
>>> Upgrades from 6.2.8 (where I reproduced) > 6.2.9 triggered 20161205142618_delete_orphaned_smart_class_parameters.rb and deleted orphaned params.
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-2017:1191 Hey guys -- internal merge request 234 that was linked by Zach here rolls back the VERIFIED changes from http://projects.theforeman.org/issues/17810. Essentially, the last change (merge request 234) completely undid this rfe and leaves Satellite 6.2.9 with no way to bulk delete smart parameters. If we could get this addressed and pull 17810 from foreman brought back into Satellite 6.2.9 asap, that would be most appreciated. Cheers, Karl This RFE has changed and does not allow a bulk delete anymore, see comment 9. The fix for 6.2.9 (https://bugzilla.redhat.com/show_bug.cgi?id=1383386) no longer shows the historical smart class parameters that are not connected to the puppet class anymore. This RFE now deletes the smart class parameters when deleting the puppet class and will be added in 6.3. I am cleaning up the bugs a bit which I have screwed up. https://bugzilla.redhat.com/show_bug.cgi?id=1383386 is the small fix that should go to 6.2.z https://bugzilla.redhat.com/show_bug.cgi?id=1382356 is the full fix. https://bugzilla.redhat.com/show_bug.cgi?id=1426394 is the clone of the full fix and needs to be closed. *** Bug 1382677 has been marked as a duplicate of this bug. *** VERIFIED. @satellite-6.3.0-16.0.beta.el7sat.noarch foreman-1.15.3-2.el7sat.noarch Used manual reproducer in comment#8 with foreman_scap_client 1. Import puppet classes esp. foreman_scap_client # hammer sc-param list --puppet-class foreman_scap_client ---|----------------------|-----------------------------------------------------|----------|-------------------- ID | PARAMETER | DEFAULT VALUE | OVERRIDE | PUPPET CLASS ---|----------------------|-----------------------------------------------------|----------|-------------------- 42 | ca_file | ${$::foreman_scap_client::params::ca_file} | | foreman_scap_client 41 | ensure | present | | foreman_scap_client 48 | foreman_repo_gpg_chk | | | foreman_scap_client 46 | foreman_repo_key | https://yum.theforeman.org/RPM-GPG-KEY-foreman | | foreman_scap_client 45 | foreman_repo_rel | | | foreman_scap_client 47 | foreman_repo_src | | | foreman_scap_client 43 | host_certificate | ${$::foreman_scap_client::params::host_certificate} | | foreman_scap_client 44 | host_private_key | ${$::foreman_scap_client::params::host_private_key} | | foreman_scap_client 40 | policies | | true | foreman_scap_client 39 | port | | true | foreman_scap_client 38 | server | | true | foreman_scap_client ---|----------------------|-----------------------------------------------------|----------|-------------------- 2. Delete foreman_scap_client puppet class 3. Import foreman_scap_client puppet class again 4. Check that there is only one copy of the parameter in Configure -> Smart class parameters: foreman_scap_client # hammer sc-param list --puppet-class foreman_scap_client ---|----------------------|-----------------------------------------------------|----------|-------------------- ID | PARAMETER | DEFAULT VALUE | OVERRIDE | PUPPET CLASS ---|----------------------|-----------------------------------------------------|----------|-------------------- 53 | ca_file | ${$::foreman_scap_client::params::ca_file} | | foreman_scap_client 52 | ensure | present | | foreman_scap_client 59 | foreman_repo_gpg_chk | | | foreman_scap_client 57 | foreman_repo_key | https://yum.theforeman.org/RPM-GPG-KEY-foreman | | foreman_scap_client 56 | foreman_repo_rel | | | foreman_scap_client 58 | foreman_repo_src | | | foreman_scap_client 54 | host_certificate | ${$::foreman_scap_client::params::host_certificate} | | foreman_scap_client 55 | host_private_key | ${$::foreman_scap_client::params::host_private_key} | | foreman_scap_client 51 | policies | | true | foreman_scap_client 50 | port | | true | foreman_scap_client 49 | server | | true | foreman_scap_client ---|----------------------|-----------------------------------------------------|----------|-------------------- >>> parameters were deleted with class deletion as there is no duplicity in respective params and also their ids are different after re-import 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/RHSA-2018:0336 |