Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1193978 - [RFE] Option to delete smart variables when puppet classes are deleted
[RFE] Option to delete smart variables when puppet classes are deleted
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning (Show other bugs)
Unspecified
x86_64 Linux
medium Severity medium (vote)
: Beta
: Unused
Assigned To: Ohad Levy
Corey Welton
http://projects.theforeman.org/issues...
: FutureFeature, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-18 11:40 EST by Chris Roberts
Modified: 2016-07-27 04:48 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 04:48:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1500 normal SHIPPED_LIVE Red Hat Satellite 6.2 Base Libraries 2016-07-27 08:24:38 EDT

  None (edit)
Description Chris Roberts 2015-02-18 11:40:04 EST
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 Product and Program Management 2015-02-18 15:06:27 EST
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 08:10:22 EST
Created redmine issue http://projects.theforeman.org/issues/13665 from this bug
Comment 8 Bryan Kearney 2016-02-11 10:11:24 EST
Upstream bug component is Provisioning
Comment 9 Bryan Kearney 2016-02-22 06:11:43 EST
Upstream bug assigned to tcaspy@redhat.com
Comment 10 Bryan Kearney 2016-02-22 08:21:54 EST
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 07:42:41 EDT
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 09:54:04 EDT
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 00:24:36 EDT
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 04:48:38 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:1500

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