Bug #1959
closedInventories moved to "received" even if the inventory-endpoint cannot contact it's LDAP server
Description
Nicolas just encountered a situation where the inventory-endpoint didn't have a valid LDAP connection. This happens when the LDAP server is not available on startup, as there is no retry or fail mechanism (this is a separate bug). However, what happened here is that the endpoint correctly provided an error message (something like "Can't contact LDAP"), but CFEngine moved the inventory to "received" (from the original "incoming" folder) anyway.
Two possibilities arise here:- CFEngine doesn't properly check the HTTP return code, and moves the inventories even if there was an error sending them to the endpoint
- The endpoint doesn't properly return an error code in this case
This is quite a bother, since it's very hard to detect this situation when using Rudder.
I will start by checking 1 above.
Updated by Jonathan CLARKE about 13 years ago
Jonathan CLARKE wrote:
Two possibilities arise here:
- CFEngine doesn't properly check the HTTP return code, and moves the inventories even if there was an error sending them to the endpoint
- The endpoint doesn't properly return an error code in this case
I will start by checking 1 above.
This is indeed the case, curl is missing the "-f" option to detect this. Commiting a fix now.
Updated by Jonathan CLARKE about 13 years ago
- Status changed from In progress to Pending technical review
- % Done changed from 0 to 100
Applied in changeset commit:328f41f681ffd4f0ebbf5ac6b89b9d4973e6017d.
Updated by Jonathan CLARKE about 13 years ago
Applied in changeset commit:9bf4ed808194073b107009fb696f058f3415fe52.
Updated by Jonathan CLARKE about 13 years ago
Applied in changeset commit:dc02edee878e0ceffa08cb1d0a47b6ceab791cab.
Updated by Arthur ANGLADE about 13 years ago
Applied in changeset 8526b7dd7632fb48f495b5c9b4d2cc8dcb71181a.
Updated by Arthur ANGLADE about 13 years ago
Arthur ANGLADE wrote:
Applied in changeset 8526b7dd7632fb48f495b5c9b4d2cc8dcb71181a.
Updated by Jonathan CLARKE about 13 years ago
- Status changed from Pending technical review to Released
Updated by Benoît PECCATTE over 9 years ago
- Category changed from 26 to Web - Nodes & inventories