Project

General

Profile

User story #3139

Move broken received inventories to a separate directory

Added by Fabrice FLORE-THÉBAULT over 7 years ago. Updated about 5 years ago.

Status:
Released
Priority:
2
Assignee:
Matthieu CERDA
Category:
Web - Nodes & inventories
Target version:
Pull Request:
Suggestion strength:
User visibility:
Effort required:

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

User story #3969: Move broken received inventories to a separate directory (dev)Released2013-09-27Jonathan CLARKEActions
User story #3970: Move broken received inventories to a separate directory (int)Released2013-09-27Jonathan CLARKEActions

Related issues

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

Updated by Nicolas PERRON over 7 years ago

  • Target version set to 2.3.10
#2

Updated by François ARMAND over 7 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.

#3

Updated by Matthieu CERDA over 7 years ago

  • Target version changed from 2.3.10 to 2.3.11
#4

Updated by François ARMAND over 7 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).

#5

Updated by François ARMAND over 7 years ago

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

#6

Updated by Matthieu CERDA over 7 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 ?

#7

Updated by Matthieu CERDA about 7 years ago

  • Target version changed from 2.3.11 to 2.3.12
#8

Updated by Matthieu CERDA about 7 years ago

  • Target version changed from 2.3.12 to 2.3.13
#9

Updated by Nicolas PERRON about 7 years ago

  • Target version changed from 2.3.13 to 84
#10

Updated by Nicolas PERRON almost 7 years ago

  • Target version changed from 84 to 2.4.7
#11

Updated by Nicolas PERRON almost 7 years ago

  • Target version changed from 2.4.7 to 2.4.8
#12

Updated by Jonathan CLARKE almost 7 years ago

  • Assignee changed from Jonathan CLARKE to Matthieu CERDA

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

#13

Updated by Nicolas PERRON almost 7 years ago

  • Target version changed from 2.4.8 to 2.4.9
#14

Updated by Matthieu CERDA over 6 years ago

  • Status changed from Discussion to In progress

Acknowledged. Task started.

#15

Updated by Matthieu CERDA over 6 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
#16

Updated by Matthieu CERDA over 6 years ago

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

Updated by Matthieu CERDA over 6 years ago

Task completed, awaiting subtask review / merge.

#18

Updated by Nicolas PERRON over 6 years ago

  • Target version changed from 2.4.9 to 2.4.10
#19

Updated by Nicolas PERRON over 6 years ago

  • Target version changed from 2.4.10 to 2.4.11
#20

Updated by Nicolas PERRON over 6 years ago

  • Target version changed from 2.4.11 to 2.4.12
#21

Updated by Vincent MEMBRÉ over 6 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).

#22

Updated by Matthieu CERDA over 6 years ago

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

Updated by Matthieu CERDA over 6 years ago

  • Status changed from 12 to Pending release

Applied in changeset packages:commit:3c69950fb2915ff4d0412495ad4138a4d281df21.

#24

Updated by Jonathan CLARKE over 6 years ago

Applied in changeset packages:commit:f8cd73a391935f900bf585724fc47b2742c27318.

#25

Updated by Jonathan CLARKE over 6 years ago

  • Status changed from Pending release to 12
#26

Updated by Matthieu CERDA over 6 years ago

  • Status changed from 12 to Pending release
#27

Updated by Vincent MEMBRÉ over 6 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:

#28

Updated by Benoît PECCATTE about 5 years ago

  • Category changed from 26 to Web - Nodes & inventories

Also available in: Atom PDF