Project

General

Profile

Bug #10088

Inventory is not resent in case of error - and agent don't report the error

Added by Nicolas CHARLES 8 months ago. Updated 5 months ago.

Status:
Released
Priority:
N/A
Category:
Initial promises & sys tech
Target version:
Target version (plugin):
Severity:
Minor - inconvenience | misleading | easy workaround
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
34

Description

On 4.1 (at least), if agent failed to run inventory on install, no new inventory will be sent
It does know that it failed to send it, but reports success,

verbose output says:

rudder  verbose: C: BEGIN classes / conditions (pass 2)
rudder  verbose: returnszero ran '/opt/rudder/bin/perl -I /opt/rudder/lib/perl5 /var/rudder/cfengine-community/inputs/inventory/1.0/test-inventory.pl /var/rudder/tmp/inventory/agent1-83133707-fabc-4f1d-99dc-34f22aa12a5d.ocs' successfully and it returned zero
rudder  verbose: Caching result for function 'returnszero("${perl_command} ${this.promise_dirname}/test-inventory.pl ${inventory_file}","noshell")'
rudder  verbose: C:     +  Global class: inventory_valid
rudder  verbose: C:     +  Private class: pass2
rudder  verbose: findfiles pattern '/var/rudder/tmp/inventory/*.ocs' found match '/var/rudder/tmp/inventory/agent1-83133707-fabc-4f1d-99dc-34f22aa12a5d.ocs'

problem is, condition uuid_valid.(force_inventory|(inventory_time.!inventory_sent)).inventory_valid is not set - it's not invnetory time

so even if it know it couldn't send inventory, it does not report it, and doesn't retryto send it (it generates it, but don't do the last part
 verbose: Persistent class 'cant_send_inventory' for 413 more minutes
  • cf-execd is not running
  • cron runs /opt/rudder/bin/rudder agent check, which runs /opt/rudder/share/commands/agent-check, which says
    
    Previous version of the ticket mentionned that agent was not run, which is invalid: the rudder agent check does run it, and so even though cf-execd is not restarted, agent is run. (note that cf-serverd is restarted)

Related issues

Related to Rudder - Bug #7381: Process management issues on nodes hosting LXC containers Released
Related to Rudder - Bug #10258: If rudder server component is stopped on Rudder root server, it is never restarted Released
Related to Rudder - Bug #1721: Inventories passed to the endpoint get lost if jetty is restarted before the inventory was completely handled New

Associated revisions

Revision f59ef9d2
Added by Nicolas CHARLES 6 months ago

Fixes #10088: Inventory is not resent in case of error - and agent don't report the error

History

#1 Updated by Vincent MEMBRÉ 8 months ago

  • Target version changed from 4.1.0~beta2 to 4.1.0~beta3

#2 Updated by Vincent MEMBRÉ 7 months ago

  • Target version changed from 4.1.0~beta3 to 4.1.0~rc1

#3 Updated by François ARMAND 7 months ago

  • Assignee changed from Benoît PECCATTE to Nicolas CHARLES

#4 Updated by Nicolas CHARLES 7 months ago

  • Target version changed from 4.1.0~rc1 to 4.0.4

This also happens on 4.0

#5 Updated by Nicolas CHARLES 7 months ago

  • Related to Bug #7381: Process management issues on nodes hosting LXC containers added

#6 Updated by Nicolas CHARLES 7 months ago

This was introduced in #7381, where executor is not started anymore by promises

#7 Updated by Nicolas CHARLES 7 months ago

  • Related to Bug #10258: If rudder server component is stopped on Rudder root server, it is never restarted added

#8 Updated by François ARMAND 6 months ago

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

#9 Updated by François ARMAND 6 months ago

  • Subject changed from On a fresh agent install, if inventory failed to be sent, it is not sent again, unless manually to agent does not run and is not started if errors on first run
  • Severity changed from Minor - inconvenience | misleading | easy workaround to Major - prevents use of part of Rudder | no simple workaround

This ticket was mis-qualified, and is much, much more grave that we thought.

The problem is not that the inventory is not sent, but that the agent does not run and won't run ever in some cases, like if there is a problem with inventory.

#10 Updated by Nicolas CHARLES 6 months ago

  • Subject changed from agent does not run and is not started if errors on first run to Inventory is not resent in case of error - and agent don't report the error
  • Description updated (diff)
  • Severity changed from Major - prevents use of part of Rudder | no simple workaround to Minor - inconvenience | misleading | easy workaround

#11 Updated by François ARMAND 6 months ago

  • Related to Bug #1721: Inventories passed to the endpoint get lost if jetty is restarted before the inventory was completely handled added

#12 Updated by François ARMAND 6 months ago

This was qualified again to minor because the agent does run, so the problem is ONLY that the inventory is not sent until next night.

#13 Updated by Nicolas CHARLES 6 months ago

  • Target version changed from 4.0.4 to 3.1.19

this also happens in branch 3.1

#14 Updated by Nicolas CHARLES 6 months ago

  • Status changed from New to In progress

#15 Updated by Nicolas CHARLES 6 months ago

  • Status changed from In progress to New
  • Target version changed from 3.1.19 to 4.0.4

Actually, it is only in branch 4.0 and more

#16 Updated by Nicolas CHARLES 6 months ago

  • Status changed from New to In progress

#17 Updated by Nicolas CHARLES 6 months ago

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

#18 Updated by Nicolas CHARLES 6 months ago

  • Status changed from Pending technical review to Pending release

#19 Updated by Benoît PECCATTE 6 months ago

  • Priority set to 34

#20 Updated by Vincent MEMBRÉ 5 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.0.4 and 4.1.1 which were released today.

Also available in: Atom PDF