Project

General

Profile

Actions

Bug #24633

closed

Duplicate puppet classes are created when publishing content views in parallel

Added by Ondřej Pražák over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Puppet integration
Target version:
-
Fixed in Releases:
Found in Releases:

Description

Description of problem:
Puppet class is created multiple times when content views with the same class
are published in parallel.

Steps to Reproduce:
1. On a clean instance, prepare 2 content views with the same puppet class:

hammer --output csv organization create --name clash_a
hammer --output csv organization create --name clash_b
hammer --output csv product create --description description --label clash_product_a_label --name clash_product_a --organization-id 3
hammer --output csv product create --description description --label clash_product_b_label --name clash_product_b --organization-id 4
hammer --output csv repository create --content-type puppet --name puppet_clash_repo_a --product-id 245 --publish-via-http true --url="http://puppetmodules.example.com/bagoftricks" 
hammer --output csv repository create --content-type puppet --name puppet_clash_repo_b --product-id 246 --publish-via-http true --url="http://puppetmodules.example.com/bagoftricks" 
hammer --output csv repository synchronize --id 10
hammer --output csv repository synchronize --id 11
hammer --output csv content-view create --name clash_cv_a --organization-id 3
hammer --output csv content-view create --name clash_cv_b --organization-id 4
hammer --output csv content-view puppet-module add --author robottelo --name generic_1 --content-view-id 5
hammer --output csv content-view puppet-module add --author robottelo --name generic_1 --content-view-id 6

2. publish content views in parallel, I used hammer from 2 different terminals

3. go to Configure -> Puppet Classes, you should see duplicate entries, each in different environment

Actual results
Publishing in parallel bypasses the Rails validations and creates duplicates. Puppet classes with the same name break 'hammer puppet-class info --name' command.

Expected results:
No duplicates should exist.


Files

puppetclasses_actual.png View puppetclasses_actual.png 89.5 KB Ondřej Pražák, 08/16/2018 10:49 AM
puppetclasses_expected.png View puppetclasses_expected.png 98.7 KB Ondřej Pražák, 08/16/2018 10:49 AM

Related issues 1 (0 open1 closed)

Related to Foreman Maintain - Feature #24923: Add check for puppet class duplicatesClosedOndřej PražákActions
Actions

Also available in: Atom PDF