Bug 1193978 - [RFE] Option to delete smart variables when puppet classes are deleted
Summary: [RFE] Option to delete smart variables when puppet classes are deleted
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: Unspecified
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: Ohad Levy
QA Contact: Corey Welton
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-18 16:40 UTC by Chris Roberts
Modified: 2019-11-14 06:37 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 08:48:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1500 0 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 12:24:38 UTC

Description Chris Roberts 2015-02-18 16:40:04 UTC
Created attachment 993234 [details]
screenshot

Description of problem:

I have multiple duplicate smart variables in the Satellite GUI under "Configure > Smart variables" . 

Importing a puppet module  adds it's variables to Smart variables. When deleteing the Puppet module the variables are not removed from "Smart variables". When importing the same module again a new duplicate entry is created in Smart variables.

You can delete smart variables with the delete button but there's no way to removed multiple entries. When you have over 50 orphaned smart variables it get's cumbersome to delete them one at a time.

Version-Release number of selected component (if applicable):

Installed Packages

candlepin-0.9.23.1-1.el6.noarch
candlepin-common-1.0.1-1.el6_5.noarch
candlepin-scl-1-5.el6_4.noarch
candlepin-scl-quartz-2.1.5-5.el6_4.noarch
candlepin-scl-rhino-1.7R3-1.el6_4.noarch
candlepin-scl-runtime-1-5.el6_4.noarch
candlepin-selinux-0.9.23.1-1.el6.noarch
candlepin-tomcat6-0.9.23.1-1.el6.noarch
elasticsearch-0.90.10-6.el6sat.noarch
katello-1.5.0-30.el6sat.noarch
katello-certs-tools-1.5.6-1.el6sat.noarch
katello-default-ca-1.0-1.noarch
katello-installer-0.0.67-1.el6sat.noarch
katello-server-ca-1.0-1.noarch
katello.croberts.org-apache-1.0-1.noarch
katello.croberts.org-foreman-client-1.0-1.noarch
katello.croberts.org-foreman-proxy-1.0-1.noarch
katello.croberts.org-parent-cert-1.0-1.noarch
katello.croberts.org-puppet-client-1.0-1.noarch
katello.croberts.org-qpid-broker-1.0-1.noarch
katello.croberts.org-qpid-client-cert-1.0-1.noarch
mod_wsgi-3.4-1.pulp.el6sat.x86_64
pulp-admin-client-2.4.4-1.el6sat.noarch
pulp-katello-0.3-4.el6sat.noarch
pulp-nodes-common-2.4.4-1.el6sat.noarch
pulp-nodes-parent-2.4.4-1.el6sat.noarch
pulp-puppet-plugins-2.4.4-1.el6sat.noarch
pulp-puppet-tools-2.4.4-1.el6sat.noarch
pulp-rpm-admin-extensions-2.4.4-1.1.el6sat.noarch
pulp-rpm-handlers-2.4.4-1.1.el6sat.noarch
pulp-rpm-plugins-2.4.4-1.1.el6sat.noarch
pulp-selinux-2.4.4-1.el6sat.noarch
pulp-server-2.4.4-1.el6sat.noarch
python-gofer-qpid-1.3.0-1.el6sat.noarch
python-isodate-0.5.0-1.pulp.el6sat.noarch
python-kombu-3.0.15-12.pulp.el6sat.noarch
python-pulp-agent-lib-2.4.4-1.el6sat.noarch
python-pulp-bindings-2.4.4-1.el6sat.noarch
python-pulp-client-lib-2.4.4-1.el6sat.noarch
python-pulp-common-2.4.4-1.el6sat.noarch
python-pulp-puppet-common-2.4.4-1.el6sat.noarch
python-pulp-rpm-common-2.4.4-1.1.el6sat.noarch
python-qpid-0.22-14.el6sat.noarch
python-qpid-qmf-0.22-37.el6.x86_64
qpid-cpp-client-0.22-42.el6.x86_64
qpid-cpp-server-0.22-42.el6.x86_64
qpid-cpp-server-linearstore-0.22-42.el6.x86_64
qpid-java-client-0.22-6.el6.noarch
qpid-java-common-0.22-6.el6.noarch
qpid-proton-c-0.7-1.el6.x86_64
qpid-qmf-0.22-37.el6.x86_64
qpid-tools-0.22-12.el6.noarch
ruby193-rubygem-katello-1.5.0-93.el6sat.noarch
rubygem-hammer_cli_katello-0.0.4-14.el6sat.noarch
rubygem-smart_proxy_pulp-1.0.1-1.1.el6sat.noarch

How reproducible:


Steps to Reproduce:
1. upload puppet modules and create a content view
2. goto Configure -> Smart Variables
3. see the dups

Actual results:
more than 1 line of smart variables, 1 referencing the puppet module and 1 that does not reference anything

Expected results:
just 1 entry next to the actual module

Additional info:
screenshots are attached as private comments

Comment 2 RHEL Program Management 2015-02-18 20:06:27 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 7 Bryan Kearney 2016-02-11 13:10:22 UTC
Created redmine issue http://projects.theforeman.org/issues/13665 from this bug

Comment 8 Bryan Kearney 2016-02-11 15:11:24 UTC
Upstream bug component is Provisioning

Comment 9 Bryan Kearney 2016-02-22 11:11:43 UTC
Upstream bug assigned to tcaspy

Comment 10 Bryan Kearney 2016-02-22 13:21:54 UTC
This seems to have been fixed by the usability work around parameters. Adding to 6.2 for verification.

Comment 14 Tazim Kolhar 2016-04-05 11:42:41 UTC
VERIFIED:
# rpm -qa foreman
foreman-1.11.0.9-1.el7sat.noarch



Steps:

1.) Navigate to Classes -> Import puppet modules
2.) Click on puppet module -> Smart Variables tab
3.) Add Smart Varibles
4.) Delete the puppet module
5.) Navigate to Smart Variables

No more entry found

Comment 16 Tazim Kolhar 2016-04-12 13:54:04 UTC
As per the discussion on irc moving it to verified:
discussions made with the developer and bug-reporter

Comment 19 Tazim Kolhar 2016-04-13 04:24:36 UTC
VERIFIED:
 rpm -qa foreman
foreman-1.11.0.11-1.el7sat.noarch


Steps:

For Smart Variables:
1.) Import a puppet module
2.) add smart variables to it
     Go-> Classes -> Click the puppet module
     Navigate to Smart Variables tab -> Add Variable (smart class variable [test_var])
     Submit  
3.) Navigate Configure -> Smart Variables and list all smart variables added
    [test_var]
4.) Delete the module (Configure -> Classes) 
5.) Navigate Configure -> Smart Variables (the variables are also deleted. we no
    more see the entry for corresponding puppet module)

For Smart Class parameters, 
1.) Import a puppet module
2.) Navigate to Configure -> Smart Class parameters
3.) Delete the module (Configure -> Classes)
4.) Navigate to Configure -> Smart Class parameters to make sure
    that corresponding smart class parameters are deleted

Comment 23 errata-xmlrpc 2016-07-27 08:48:38 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:1500


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