Project

General

Profile

Actions

User story #3139

closed

Move broken received inventories to a separate directory

Added by Fabrice FLORE-THÉBAULT over 11 years ago. Updated over 9 years ago.

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

Description

when a faulty inventory from a node has arrived in /var/rudder/inventories/incoming/, and the processing of the inventory fails (for example UUID is missing), then the faulty inventory stays in /var/rudder/inventories/incoming/ and can't be overwritten by a new (hopefully not faulty) inventory sent by the node.


Subtasks 2 (0 open2 closed)

User story #3969: Move broken received inventories to a separate directory (dev)ReleasedJonathan CLARKE2013-09-27Actions
User story #3970: Move broken received inventories to a separate directory (int)ReleasedJonathan CLARKE2013-09-27Actions

Related issues 1 (0 open1 closed)

Has duplicate Rudder - User story #3167: Invalid inventory (rejected by ldap-inventory endpoint) should go to a "faulty-inventory" directoryRejected2013-01-10Actions
Actions #1

Updated by Nicolas PERRON over 11 years ago

  • Target version set to 2.3.10
Actions #2

Updated by François ARMAND over 11 years ago

  • Status changed from New to 8
  • Assignee set to Matthieu CERDA
  • Priority changed from N/A to 2

We need to look to our Apache webdav configuration to see how to have the behaviour: each time a "put file" is send, override any existing file.

Actions #3

Updated by Matthieu CERDA over 11 years ago

  • Target version changed from 2.3.10 to 2.3.11
Actions #4

Updated by François ARMAND over 11 years ago

It could be easier to have our sript that takes inventory from the webdav directory to send them to Rudder have to always move the file in an other directory (error inventories, for example for that case).

Actions #5

Updated by François ARMAND over 11 years ago

And it could be great to append the timestamp to the filename, to know when the problem occured.

Actions #6

Updated by Matthieu CERDA over 11 years ago

  • Status changed from 8 to Discussion
  • Assignee changed from Matthieu CERDA to Jonathan CLARKE

I suggest to change the /var/rudder/tools/send-clean.sh script, which sends the inventory to the endpoint on the Rudder server side, adding a small part that moves the failed file to a special location:

# Abort if sending failed
if [ ${SEND_COMMAND_RET} -ne 0 ]; then
        if [ ! -d "${FAILEDDIR}" ]; then
                mkdir -p ${FAILEDDIR}
        fi
        mv "${FILENAME}" "${FAILEDDIR}/${BASENAME}-$(date --rfc-3339=date)" 
        exit ${SEND_COMMAND_RET}
fi

Is this acceptable ?

Actions #7

Updated by Matthieu CERDA about 11 years ago

  • Target version changed from 2.3.11 to 2.3.12
Actions #8

Updated by Matthieu CERDA about 11 years ago

  • Target version changed from 2.3.12 to 2.3.13
Actions #9

Updated by Nicolas PERRON about 11 years ago

  • Target version changed from 2.3.13 to 84
Actions #10

Updated by Nicolas PERRON about 11 years ago

  • Target version changed from 84 to 2.4.7
Actions #11

Updated by Nicolas PERRON almost 11 years ago

  • Target version changed from 2.4.7 to 2.4.8
Actions #12

Updated by Jonathan CLARKE almost 11 years ago

  • Assignee changed from Jonathan CLARKE to Matthieu CERDA

Matthieu, this looks like a great approach. Please go ahead and implement it.

Actions #13

Updated by Nicolas PERRON almost 11 years ago

  • Target version changed from 2.4.8 to 2.4.9
Actions #14

Updated by Matthieu CERDA over 10 years ago

  • Status changed from Discussion to In progress

Acknowledged. Task started.

Actions #15

Updated by Matthieu CERDA over 10 years ago

  • Tracker changed from Bug to User story
  • Subject changed from on the server, if processing incoming inventory has error, is stays in incoming and new inventory can't be sent to Move broken received inventories to a separate directory
  • Status changed from In progress to 13
Actions #16

Updated by Matthieu CERDA over 10 years ago

  • Status changed from 13 to 10
  • Assignee changed from Matthieu CERDA to Jonathan CLARKE
Actions #17

Updated by Matthieu CERDA over 10 years ago

Task completed, awaiting subtask review / merge.

Actions #18

Updated by Nicolas PERRON over 10 years ago

  • Target version changed from 2.4.9 to 2.4.10
Actions #19

Updated by Nicolas PERRON over 10 years ago

  • Target version changed from 2.4.10 to 2.4.11
Actions #20

Updated by Nicolas PERRON over 10 years ago

  • Target version changed from 2.4.11 to 2.4.12
Actions #21

Updated by Vincent MEMBRÉ over 10 years ago

  • Target version changed from 2.4.12 to 2.8.0~rc1

This fix implies a lot of changes onf the general behavior and therefore will be fixed in 2.8.

This will be fixed in 2.8.0.

As of 2.4, 2.6 and 2.7, we will document the workaround (deleting faulty inventories from /incoming, see #4095).

Actions #22

Updated by Matthieu CERDA over 10 years ago

  • Status changed from 10 to 12
  • Assignee changed from Jonathan CLARKE to Matthieu CERDA
Actions #23

Updated by Matthieu CERDA over 10 years ago

  • Status changed from 12 to Pending release

Applied in changeset packages:commit:3c69950fb2915ff4d0412495ad4138a4d281df21.

Actions #24

Updated by Jonathan CLARKE over 10 years ago

Applied in changeset packages:commit:f8cd73a391935f900bf585724fc47b2742c27318.

Actions #25

Updated by Jonathan CLARKE over 10 years ago

  • Status changed from Pending release to 12
Actions #26

Updated by Matthieu CERDA over 10 years ago

  • Status changed from 12 to Pending release
Actions #27

Updated by Vincent MEMBRÉ over 10 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.8.0~rc1, which was released on Friday 25/10/2013.
Check out:

Actions #28

Updated by Benoît PECCATTE over 9 years ago

  • Category changed from 26 to Web - Nodes & inventories
Actions

Also available in: Atom PDF