Project

General

Profile

Bug #14237

Inventory watcher is too quick and does not wait for file close

Added by François ARMAND 5 months ago. Updated 5 months ago.

Status:
Released
Priority:
N/A
Category:
Web - Nodes & inventories
Target version:
Severity:
User visibility:
Effort required:
Priority:
0

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.


Related issues

Related to Rudder - Bug #14080: Huge latency between inventory sent and inventory appears in RudderReleasedActions

Associated revisions

Revision 0808f511 (diff)
Added by François ARMAND 5 months ago

Fixes #14237: Inventory watcher is too quick and does not wait for file close

Revision 0808f511 (diff)
Added by François ARMAND 5 months ago

Fixes #14237: Inventory watcher is too quick and does not wait for file close

History

#1

Updated by François ARMAND 5 months ago

  • Related to Bug #14080: Huge latency between inventory sent and inventory appears in Rudder added
#2

Updated by François ARMAND 5 months 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 5 months ago

  • Status changed from Pending technical review to Pending release
#4

Updated by Alexis MOUSSET 5 months ago

  • Status changed from Pending release to Released
This bug has been fixed in Rudder 5.0.5 which was released today.
Changelog

Also available in: Atom PDF