Project

General

Profile

Actions

Bug #6944

closed

The inventory-endpoint outputs a successful HTTP error code even if the inventory can not be stored

Added by Matthieu CERDA almost 9 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
2
Assignee:
Matthieu CERDA
Category:
Web - Nodes & inventories
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

I tested on a 3.0.6 switching rudder-slapd to mdb instead of hdb (which is the default).

mdb creates fixed size databases, which by default give little room for storing stuff (about 10M by default, as seen in the manpage:

       maxsize <bytes>
              Specify  the maximum size of the database in bytes. A memory map
              of this size is allocated at startup time and the database  will
              not be allowed to grow beyond this size. The default is 10485760
              bytes. This setting may be  changed  upward  if  the  configured
              limit needs to be increased.

I then happened to store a large amount of inventories with stess_suite/tsung to test something.

Of course, after a few seconds I hit the storage size limit and something funny happened:

agent:

2015-06-17T13:08:21+0000     info: /default/sendInventoryToCmdb/files/'/var/rudder/inventories/incoming'[0]: Code: 202
2015-06-17T13:08:21+0000     info: /default/sendInventoryToCmdb/files/'/var/rudder/inventories/incoming'[0]: Transformer '/var/rudder/inventories/incoming/RDR-TST-RandHost00-8b9ea23e-7c02-4f79-a31c-96e85d1c715d.ocs' => '/var/rudder/tools/send-clean.sh http://localhost:8080/endpoint/upload/ /var/rudder/inventories/incoming/RDR-TST-RandHost00-8b9ea23e-7c02-4f79-a31c-96e85d1c715d.ocs /var/rudder/inventories/received/ /var/rudder/inventories/failed/' seemed to work ok
2015-06-17T13:08:21+0000     info: /default/sendInventoryToCmdb/files/'/var/rudder/inventories/incoming'[0]: Transforming '/var/rudder/tools/send-clean.sh http://localhost:8080/endpoint/upload/ /var/rudder/inventories/incoming/RDR-TST-RandHost3131-c15081e0-afa2-48c0-8e02-f0ba13ea41f9.ocs /var/rudder/inventories/received/ /var/rudder/inventories/failed/' 

=> Inventory accepted, promise successful

webapp log:

[2015-06-17 13:08:21] ERROR com.normation.inventory.provisioning.endpoint.FusionReportEndpoint - Error when trying to process report: Can't merge inventory report in LDAP directory, aborting <- Can not apply modifiction on 'machineId=80975353-43a3-ac2a-0eda-c1db2f58dc07,ou=Machines,ou=Pending Inventories,ou=Inventories,cn=rudder-configuration': entry update failed <- Can not apply modifiction on 'nodeId=8b9ea23e-7c02-4f79-a31c-96e85d1c715d,ou=Nodes,ou=Pending Inventories,ou=Inventories,cn=rudder-configuration': entry update failed <- : Can't merge inventory report in LDAP directory, aborting
[2015-06-17 13:08:21] INFO  com.normation.inventory.provisioning.endpoint.FusionReportEndpoint - Report file processed in 80 milliseconds

Actions

Also available in: Atom PDF