Issue #8686 has been updated by Matt Robinson.

Status changed from Unreviewed to Merged - Pending Release
Target version set to 1.2
Affected Dashboard version set to 1.2rc3

(#8686) Handle concurrent DelayedJob workers importing for same node

If you didn't have any delayed job workers and submitted multiple reports for 
the same node, when you started multiple workers they would each try to 
create the same node.  There was no database constraint to prevent this, 
andRails validation was worthless since the workers were running their own
transactions.

By adding the database constraint the insert will fail for workers who don't 
create the node first.  Rather than discard the reports and create an error for
those workers, we're retrying the report submission 3 times before putting in a 
DelayedJobFailure entry.

Merged into 1.2rc commit:e86526f224058d8d049b2f8b93d5fdca57332ad8
----------------------------------------
Bug #8686: Dashboard created multiple identical nodes
https://projects.puppetlabs.com/issues/8686

Author: Dan Hogland
Status: Merged - Pending Release
Priority: Normal
Assignee: 
Category: 
Target version: 1.2
Keywords: 
Branch: 
Affected URL: 
Affected Dashboard version: 1.2rc3


If you have the dashboard running without any workers going and a master sends 
multiple reports for the same node; when the Delayed Job Workers are kicked off 
you will have multiple node entries for the same node entered into dashboard.

mysql> select * from nodes\G
*************************** 1. row ***************************
                    id: 4
                  name: pe-agent.localdomain
           description: NULL
            created_at: 2011-07-27 23:48:12
            updated_at: 2011-07-28 19:32:28
                   url: NULL
           reported_at: 2011-07-28 19:32:28
  last_apply_report_id: 34
                status: unchanged
                hidden: 0
last_inspect_report_id: NULL
*************************** 2. row ***************************
                    id: 5
                  name: puppetmaster.localdomain
           description: NULL
            created_at: 2011-07-28 19:42:07
            updated_at: 2011-07-28 19:42:07
                   url: NULL
           reported_at: 2011-07-28 19:41:35
  last_apply_report_id: 35
                status: unchanged
                hidden: 0
last_inspect_report_id: NULL
*************************** 3. row ***************************
                    id: 6
                  name: puppetmaster.localdomain
           description: NULL
            created_at: 2011-07-28 19:42:07
            updated_at: 2011-07-28 19:42:07
                   url: NULL
           reported_at: 2011-07-28 19:41:40
  last_apply_report_id: 36
                status: unchanged
                hidden: 0
last_inspect_report_id: NULL
*************************** 4. row ***************************
                    id: 7
                  name: puppetmaster.localdomain
           description: NULL
            created_at: 2011-07-28 19:42:07
            updated_at: 2011-07-28 19:42:08
                   url: NULL
           reported_at: 2011-07-28 19:41:42
  last_apply_report_id: 37
                status: unchanged
                hidden: 0
last_inspect_report_id: NULL
*************************** 5. row ***************************
                    id: 8
                  name: puppetmaster.localdomain
           description: NULL
            created_at: 2011-07-28 19:42:07
            updated_at: 2011-07-28 19:42:08
                   url: NULL
           reported_at: 2011-07-28 19:41:44
  last_apply_report_id: 38
                status: unchanged
                hidden: 0
last_inspect_report_id: NULL
5 rows in set (0.00 sec)


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to