Project

General

Profile

User story #7490

Make the agent resend the inventory if sending failed

Added by Nicolas CHARLES about 3 years ago. Updated 5 months ago.

Status:
Released
Priority:
N/A
Category:
System techniques
Target version:
Suggestion strength:
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:

Description

On first runs, the webdav is not correctly configured on the rudder server root, so the promises will configure the webdav password, and restart apache, and the root server will send its inventory to the webdav, that may be not yet configured, or restarting.
So there is a slight possibility that it fails, and keep an incomplete inventory of the server (with file staying in /var/rudder/inventory), and there is also a possibility that the initial promises never had a chance to quick in to send the inventory to the default apache endpoint

To be on the safe side, the root server should always send its inventory to the endpoint

This won't be done in the initial promises (as the web interface may not be configured when we are in intial promises), but really in normal operation (so when promises have been generated)

Associated revisions

Revision 3b073218 (diff)
Added by Benoît PECCATTE 6 months ago

Fixes #7490: Make the agent resend the inventory if sending failed

History

#1 Updated by Nicolas CHARLES about 3 years ago

  • Status changed from New to In progress

#2 Updated by Vincent MEMBRÉ about 3 years ago

  • Target version changed from 3.2.0~beta1 to 3.2.0~rc1

#3 Updated by Benoît PECCATTE almost 3 years ago

  • Target version changed from 3.2.0~rc1 to 3.2.0~rc2

#4 Updated by Benoît PECCATTE almost 3 years ago

  • Target version changed from 3.2.0~rc2 to 3.2.0

#5 Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 3.2.0 to 3.2.1

#6 Updated by Vincent MEMBRÉ almost 3 years ago

  • Target version changed from 3.2.1 to 3.2.2

#7 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 3.2.2 to 3.2.3

#8 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 3.2.3 to 3.2.4

#9 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 3.2.4 to 3.2.5

#10 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 3.2.5 to 3.2.6

#11 Updated by Vincent MEMBRÉ over 2 years ago

  • Target version changed from 3.2.6 to 3.2.7

#12 Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 3.2.7 to 3.2.8

#13 Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 3.2.8 to 3.2.9

#14 Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 3.2.9 to 3.2.10

#15 Updated by Nicolas CHARLES about 2 years ago

  • Status changed from In progress to New

#16 Updated by Vincent MEMBRÉ about 2 years ago

  • Target version changed from 3.2.10 to 3.2.11

#17 Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 3.2.11 to 339

#18 Updated by Vincent MEMBRÉ almost 2 years ago

  • Target version changed from 339 to 4.0.4

#19 Updated by Jonathan CLARKE over 1 year ago

  • Severity set to Minor - inconvenience | misleading | easy workaround
  • User visibility set to Getting started - demo | first install | level 1 Techniques

Sending directly to the endpoint from promises is not a good idea, because if the endpoint is overloaded it will simply return an error (as designed) but promises don't have any retry mechanism to handle this (which is why this bug is a problem in the first place).

We could and probably should add a retry mechanism to send failed inventories in promises.

Also I don't think we should bypass the webdav to send inventories. Everything is much easier when there are no exceptions, and all inventories are processed in the same way. We have plans to use apache hooks to add actions when inventories are received for example.

#20 Updated by Benoît PECCATTE over 1 year ago

  • Priority set to 29

#21 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.0.4 to 4.0.5

#22 Updated by Jonathan CLARKE over 1 year ago

  • Assignee deleted (Nicolas CHARLES)

#23 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.0.5 to 4.0.6

#24 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.0.6 to 4.0.7

#25 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.0.7 to 357

#26 Updated by Benoît PECCATTE over 1 year ago

  • Priority changed from 29 to 42

#27 Updated by Alexis MOUSSET over 1 year ago

  • Target version changed from 357 to 4.1.6

#28 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.1.6 to 4.1.7

#29 Updated by Vincent MEMBRÉ over 1 year ago

  • Target version changed from 4.1.7 to 4.1.8

#30 Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 4.1.8 to 4.1.9

#31 Updated by Vincent MEMBRÉ about 1 year ago

  • Target version changed from 4.1.9 to 4.1.10

#32 Updated by Benoît PECCATTE 10 months ago

I don't see the inconvenience, if the inventory is not sent, the server still works, and the inventory will be sent again the day after.

#33 Updated by Nicolas CHARLES 10 months ago

Benoît PECCATTE wrote:

I don't see the inconvenience, if the inventory is not sent, the server still works, and the inventory will be sent again the day after.

It shows in the interface "No machine inventory", which is not great for a first contact with Rudder

#34 Updated by Benoît PECCATTE 10 months ago

Wouldn't it be the right to implement inventory resend in case of error ?

#35 Updated by Nicolas CHARLES 10 months ago

Yes, but here the case can be vicious: inventory is send, received, and then the webapp can be restarted before it's fully parsed.

#36 Updated by Benoît PECCATTE 10 months ago

Does the webapp return an OK code before processing inventories ?

#37 Updated by Benoît PECCATTE 10 months ago

In fact we would send to webdav, so this case would be handled by send-clean

#38 Updated by Benoît PECCATTE 10 months ago

  • Status changed from New to In progress
  • Assignee set to Benoît PECCATTE

#39 Updated by Benoît PECCATTE 10 months ago

  • Tracker changed from Bug to User story
  • Subject changed from root server sends inventory to itself via the webdav rather than the endpoint, which can fail because of race condition to Make the agent resend the inventory if sending failed

#40 Updated by Benoît PECCATTE 10 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Nicolas CHARLES
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/1250

#41 Updated by Vincent MEMBRÉ 10 months ago

  • Target version changed from 4.1.10 to 4.1.11

#42 Updated by Vincent MEMBRÉ 8 months ago

  • Target version changed from 4.1.11 to 4.1.12

#43 Updated by Vincent MEMBRÉ 7 months ago

  • Target version changed from 4.1.12 to 4.1.13

#44 Updated by Normation Quality Assistant 6 months ago

  • Status changed from Pending technical review to Discussion
  • Assignee changed from Nicolas CHARLES to Benoît PECCATTE

#45 Updated by Benoît PECCATTE 6 months ago

  • Status changed from Discussion to Pending technical review
  • Assignee changed from Benoît PECCATTE to Nicolas CHARLES

#46 Updated by Normation Quality Assistant 6 months ago

  • Status changed from Pending technical review to Discussion
  • Assignee changed from Nicolas CHARLES to Benoît PECCATTE

#47 Updated by Benoît PECCATTE 6 months ago

  • Status changed from Discussion to Pending release

#48 Updated by Vincent MEMBRÉ 5 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.13, 4.2.7 and 4.3.3 which were released today.

Also available in: Atom PDF