Project

General

Profile

Bug #8427

Parallel traversal of new promises directories causes some nodes promises to not be updated

Added by François ARMAND over 4 years ago. Updated over 4 years ago.

Status:
Released
Priority:
1
Category:
Web - Compliance & node report
Target version:
Severity:
User visibility:
Effort required:
Priority:

Description

When we generate new promises, we do that in a parallel way for each node, so that I/O latency on one node is not making all of the other waits.

The code is not correctly synchronized, and so we loose in the process the list of nodes that were processed. The result is that new nodes may not have the "rules.new" directory moved to "rules", and keep getting old promises.

It's the same problem as: http://www.rudder-project.org/redmine/issues/7403


Related issues

Related to Rudder - Architecture #7403: Paralell sequence may have a not correct result (missing elements)ReleasedFrançois ARMAND2015-11-13Actions
#1

Updated by François ARMAND over 4 years ago

  • Related to Architecture #7403: Paralell sequence may have a not correct result (missing elements) added
#2

Updated by François ARMAND over 4 years ago

The problem is exactly in /rudder-core/src/main/scala/com/normation/rudder/services/policies/RudderPromiseWriterServiceImpl.scala, when we do:

val folders = collection.mutable.Buffer[(NodeConfiguration, String, String, String)]()
// Writing the policy
for (node <- interestingNodeConfig.par) {
.....
folders ++= x
}

#3

Updated by François ARMAND over 4 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder/pull/1107
#4

Updated by François ARMAND over 4 years ago

The problem is nowhere else in the code (it is ok in rudder-core/src/test/scala/com/normation/rudder/domain/policies/RuleTargetTest.scala, the use pattern is different). It is no more in 3.2, because of #7403.

#5

Updated by François ARMAND over 4 years ago

  • Target version changed from 3.0.17 to 2.11.22
#6

Updated by François ARMAND over 4 years ago

  • Pull Request changed from https://github.com/Normation/rudder/pull/1107 to https://github.com/Normation/rudder/pull/1108
#7

Updated by François ARMAND over 4 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
#8

Updated by Vincent MEMBRÉ over 4 years ago

  • Subject changed from Parallel traversal of new promises directories causes rules.new to remain after generation to Parallel traversal of new promises directories causes some nodes promises to not be updated
#9

Updated by Vincent MEMBRÉ over 4 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.11.22, 3.0.17, 3.1.11 and 3.2.4 which were released today.

Also available in: Atom PDF