Project

General

Profile

Actions

Bug #15814

closed

Updating a puppet class fails with "Validation failed: Merge overrides can only be set for array or hash, Avoid duplicates can only be set for arrays that have merge_overrides set to true"

Added by Brad Buckingham almost 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Parameters
Target version:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1332596
Description of problem:

Publishing or Promoting a Puppet Content View fails with "Validation failed: Merge overrides can only be set for array or hash, Avoid duplicates can only be set for arrays that have merge_overrides set to true"
Version-Release number of selected component (if applicable):
Satellite Server v.6.1.8
How reproducible:
Steps to Reproduce:
- Add any Puppet Module ex motd in Satellite
- Create a content view with this Puppet module
- Publish a new version of this content view
- Go to Configure - Puppet Classes, click on motd
- Click on Smart Class Parameters - content
- Click on Override, change the Parameter type to array, change the Default value to [], click on Merge overrides and Avoid duplicates, click the Submit button (note that this doesn't make sense for this particular module and parameter, but it may for other Puppet modules, and I was looking for an easy reproducer)
- Publish a new version of the content view created before
- Go back to Configure - Puppet Classes, click on motd
- Click on Smart Class Parameters - content
- Click on Override to clear it and click the Submit button
- Publish a new version of the content view created before
Actual results:
Fails with "Validation failed: Merge overrides can only be set for array or hash, Avoid duplicates can only be set for arrays that have merge_overrides set to true"
Expected results:
Content View should be Promoted or Published Successfully
Additional info:
Root cause  : 
When we cleared the override flag and saves a smart parameter, the merge_overrides and avoid_duplicates flags have to be cleared automatically however it is not and hence `override: false`,  but `merge_overrides: true` in db and hence next content-view publish failed.
Workaround :
Can be fixed this by activating "ovreride" in the UI, clearing both merge_overrides and avoid_duplicates, saving the smart parameter, editing it again, clearing "override" and saving it again.
But Need to determine the puppet classes ( Configure --> puppet class --> smart class parameter ) where this changes in past ( enabled the override flag and change the type equals to array/hash and enabled merge_overrides and later unchecked the override flag  ).

Related issues 1 (1 open0 closed)

Blocks Katello - Tracker #15825: Sprint 1 : Content-FocusedNewBrad Buckingham07/24/2016

Actions
Actions

Also available in: Atom PDF