Project

General

Profile

Actions

Bug #3635

closed

No response message sent when an error occurred while sending en inventory

Added by Vincent MEMBRÉ almost 11 years ago. Updated about 9 years ago.

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

Description

When sending an inventory failed (no file or file is not correctly parsed), there is no message linked to the answer, only that an error 412 happened (Precondition failed).

curl --proxy "" -f -F file=@/tmp/plop http://localhost:8080/endpoint/upload/ -v
* About to connect() to localhost port 8080 (#0)
*   Trying 127.0.0.1... connected
* Connected to localhost (127.0.0.1) port 8080 (#0)
> POST /endpoint/upload/ HTTP/1.1
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
> Host: localhost:8080
> Accept: */*
> Content-Length: 128255
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------4fc75fa6cbaa
> 
< HTTP/1.1 100 Continue
* The requested URL returned error: 412
* Closing connection #0
curl: (22) The requested URL returned error: 412

there is no message explaining what went wrong with that inventory.

In webapp log, there is some entries like:

[2013-06-05 14:22:15] ERROR com.normation.inventory.provisioning.endpoint.FusionReportEndpoint - Error when trying to parse report: 
Can't parse the input report, aborting
cause: Error when post processing report with 'post_process_inventory:check_consistency', abort
cause: Missing node ID attribute 'UUID' in report. This attribute is mandatory and must contains node ID.
cause: Missing XML element: 'UUID'. 

But sometimes even the log is missing ( ie: when inventory is missing)

Every errors in that endpoint should produce a log and return an error message with http answer.

Looking a bit more in the code, indicate that the response should be filled with a message, but it's not the case

Actions

Also available in: Atom PDF