Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1342774 - updating smart class parameter using name fails due to finding more that one parameters
Summary: updating smart class parameter using name fails due to finding more that one ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.2.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: Unspecified
Assignee: Martin Bacovsky
QA Contact: Tomas Strachota
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-05 05:57 UTC by Rishi
Modified: 2021-06-10 11:20 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15833 0 Normal Closed sc-params not giving info based on sc-param name - saying there are multiple variables 2021-02-08 16:47:58 UTC

Description Rishi 2016-06-05 05:57:30 UTC
Description of problem:

Multiple duplicate parameters exist due to multiple environments

# hammer sc-param list
----|--------------------------------|----------------------------------------------------------------------------------|----------|-------------
ID  | PARAMETER                      | DEFAULT VALUE                                                                    | OVERRIDE | PUPPET CLASS
----|--------------------------------|----------------------------------------------------------------------------------|----------|-------------
49  | accept_env                     | LANG LC_*                                                                        |          |             
49  | accept_env                     | LANG LC_*                                                                        |          |             
49  | accept_env                     | LANG LC_*                                                                        |          |             
49  | accept_env                     | LANG LC_*                                                                        |          |             
3   | additional_shells              | []                                                                               |          |             
3   | additional_shells              | []                                                                               |          |             
3   | additional_shells              | []                                                                               |          |             
3   | additional_shells              | []                                                                               |          |             
30  | allowed_groups                 | []                                                                               |          |             
30  | allowed_groups                 | []                                                                               |          |             


# hammer sc-param update --puppet-class ssh::server --name accept_env --override true --default-value "LANG LC_* LANGUAGE XMODIFIERS"
Could not update the parameter:
  Error: found more than one smart_class_parameter


Using ID instead of name work.


# hammer sc-param update --id 49 --override true --default-value "LANG LC_* LANGUAGE XMODIFIERS"
Parameter updated

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

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 2 Bryan Kearney 2016-07-26 15:25:24 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 3 Bryan Kearney 2016-07-26 15:28:08 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 8 jalviso 2016-10-22 00:46:28 UTC
Hi,

The issue reported in this bug still exists with satellite 6.2.2 async version.

Regards,

Josephine Alviso
GSS - APAC

Comment 10 Bryan Kearney 2016-10-26 14:16:33 UTC
Upstream bug assigned to mbacovsk

Comment 11 Bryan Kearney 2016-10-26 14:16:38 UTC
Upstream bug component is API

Comment 12 Bryan Kearney 2016-10-26 14:16:42 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/15833 has been resolved.

Comment 16 Tomas Strachota 2017-08-02 13:15:57 UTC
Verified.

Version Tested: Satellite-6.3 Snap 8

I was able to get info about a smart class parameter and update it when the puppet module was installed in two environemnts.


Full verification steps:

> puppet module install puppetlabs-motd --environment development
Notice: Preparing to install into /etc/puppet/environments/development/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppet/environments/development/modules
└─┬ puppetlabs-motd (v1.4.0)
  └─┬ puppetlabs-registry (v1.1.4)
    └── puppetlabs-stdlib (v4.17.1)

> puppet module install puppetlabs-motd --environment production
Notice: Preparing to install into /etc/puppet/environments/production/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppet/environments/production/modules
└─┬ puppetlabs-motd (v1.4.0)
  └─┬ puppetlabs-registry (v1.1.4)
    └── puppetlabs-stdlib (v4.17.1)


> hammer puppet-class info --name motd
Id:                     1
Name:                   motd
Smart variables:        

Smart class parameters: 
    content
    dynamic_motd
    template
Hostgroups:             

Environments:           
    development
    production
Parameters:


> hammer sc-param list --puppet-class motd
---|--------------|---------------|----------|-------------
ID | PARAMETER    | DEFAULT VALUE | OVERRIDE | PUPPET CLASS
---|--------------|---------------|----------|-------------
3  | content      |               |          | motd        
1  | dynamic_motd | true          |          | motd        
2  | template     |               |          | motd        
---|--------------|---------------|----------|-------------

> hammer sc-param info --puppet-class motd --name template
Id:                 2
Parameter:          template
Default Value:      
Override:           false
Puppet class:       motd
Description:        
Type:               string
Hidden Value?:      false
Use puppet default: no
Required:           false
Validator:          
    Type: 
    Rule:
Override values:    
    Merge overrides:     no
    Merge default value: no
    Avoid duplicates:    no
    Order:               
      fqdn
      hostgroup
      os
      domain
    Values:
Environments:       
    development
    production
Created at:         2017/08/02 13:00:27
Updated at:         2017/08/02 13:00:27

> hammer sc-param update --puppet-class motd --name template  --override true --default-value Hello!
Parameter updated

> hammer sc-param info --puppet-class motd --name template
Id:                 2
Parameter:          template
Default Value:      Hello!
Override:           true
Puppet class:       motd
Description:        
Type:               string
Hidden Value?:      false
Use puppet default: no
Required:           false
Validator:          
    Type: 
    Rule:
Override values:    
    Merge overrides:     no
    Merge default value: no
    Avoid duplicates:    no
    Order:               
      fqdn
      hostgroup
      os
      domain
    Values:
Environments:       
    development
    production
Created at:         2017/08/02 13:00:27
Updated at:         2017/08/02 13:08:28

Comment 17 Satellite Program 2018-02-21 16:54:37 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/RHSA-2018:0336


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