Bug #7024
closed
Accepting two nodes seems to only accept one
Added by François ARMAND over 9 years ago.
Updated almost 9 years ago.
Category:
Web - Nodes & inventories
Description
I tried to accept two nodes at once.
Both appears in the "history" panel as "accepted". But only one is displayed in the list of node.
Clear cache make the second node appears. Most likelly, adding a new inventory for the missing node will resolve the issue to (but can't have been tested).
==> cache for node should have been invalidated but wasn't. It may be due to the timing (race condition) between the time when we look is new nodes appeared and when we invalidate the cache (ie: "ho, ONE new node ! Clear Cache ; [here the second node appears] ; update the time of last clean cache" => second node never seen.
The bug was discovered in 3.1, but it must be in 3.0 to.
Note: it is not always reproducible, so likelly to be some race condition.
- Has duplicate Bug #6838: Node list cache is not always correctly updated when accepting nodes added
- Target version changed from 3.0.8 to 3.0.9
- Has duplicate Bug #7125: When accepting several nodes at the same time, only one is accepted added
- Subject changed from Cache invalidation logic for node acceptation is broken to Accepting two nodes seems to only accept one
- Description updated (diff)
For the race condition, I'm betting on some flawed logic along the line:
Expected:
- accept-node
- cache is-up to date ?
- => no: update cache
- save update date time
- accept-node
- cache is-up to date ?
- => no: update cache
- save update date time
Actual:
- accept-node
- cache is-up to date ?
- => no: update cache
- accept-node
- save update date time
- cache is-up to date ?
- yes, because nothing since save update date.
Ah, atomicity is hard.
- Target version changed from 3.0.9 to 3.0.10
- Target version changed from 3.0.10 to 3.0.11
- Target version changed from 3.0.11 to 3.0.12
- Status changed from New to In progress
- 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/943
- Status changed from Pending technical review to Pending release
- % Done changed from 0 to 100
- Status changed from Pending release to Released
This bug has been fixed in Rudder 3.0.12 and 3.1.5 which were released today.
- Related to Bug #7689: Error on promise generation after accepting a node added
- Related to deleted (Bug #7689: Error on promise generation after accepting a node)
Also available in: Atom
PDF