Inventory watcher is too quick and does not wait for file close
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.
Fixes #14237: Inventory watcher is too quick and does not wait for file close
#2 Updated by François ARMAND 28 days 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/ldap-inventory/pull/146
#3 Updated by François ARMAND 28 days ago
- Status changed from Pending technical review to Pending release
Applied in changeset ldap-inventory|0808f51131dee9e4cee89b09b740195f204ad31a.
#4 Updated by Alexis MOUSSET 21 days ago
- Status changed from Pending release to Released