Actions
Bug #14237
closedInventory watcher is too quick and does not wait for file close
Status:
Released
Priority:
N/A
Assignee:
Category:
Web - Nodes & inventories
Target version:
Pull Request:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:
Description
When new inventories come, we sometime get the following error:
[2019-01-24 17:10:50] INFO inventory-processing - Watch new inventory file 'server-root.ocs' with signature available: process. [2019-01-24 17:10:50] ERROR inventory-processing - Error when trying to process inventory 'server-root.ocs' <- Can't parse the input inventory, aborting <- Cannot parse uploaded file as an XML Fusion Inventory report [2019-01-24 17:10:50] ERROR inventory-processing - Exception was: org.xml.sax.SAXParseException; lineNumber: 1160; columnNumber: 20; XML document structures must start and end within the same entity. [2019-01-24 17:11:44] ERROR com.normation.rudder.domain.nodes.NodeInfo - Error when trying to get the CFEngine-MD5 digest of CFEngine public key for node 'server.rudder.local' (root) <- unable to decode base64 string: invalid characters encountered in base64 data [2019-01-24 17:18:31] INFO inventory-processing - Watch new inventory file 'agent-7dcea14b-8e15-446e-b735-2646fc928db3.ocs' with signature available: process. ...
If we look at "server-root.ocs" or the corresponding file, they are fine.
The likely explanation if that inventory watcher is triggered by inotify "create" event, and watcher is too fast and and read end of currently written file before its closed.
Actions