Bug #8427
closed
Parallel traversal of new promises directories causes some nodes promises to not be updated
Added by François ARMAND over 8 years ago.
Updated over 8 years ago.
Category:
Web - Compliance & node report
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 to Architecture #7403: Paralell sequence may have a not correct result (missing elements) added
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
}
- 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
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.
- Target version changed from 3.0.17 to 2.11.22
- Pull Request changed from https://github.com/Normation/rudder/pull/1107 to https://github.com/Normation/rudder/pull/1108
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
- 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
- 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