Project

General

Profile

Bug #4932

cf-agent slowed by users addition into inventory and displays a lot of warnings about that

Added by Nicolas CHARLES about 6 years ago. Updated almost 6 years ago.

Status:
Released
Priority:
4
Category:
System techniques
Target version:
Severity:
User visibility:
Effort required:
Priority:

Description

When we run the agent (version 2.9 or more), the inventory generation is riddled with

> 2014-06-03T10:26:15+0000     info: insert_lines promise uses the same select_line_matching anchor '.*<USERSLIST>.*' as another promise. This will lead to non-convergent behaviour unless 'empty_file_before_editing' is set
> 2014-06-03T10:26:15+0000     info: Promise belongs to bundle 'add_users_information_to_inventory' in file '/var/rudder/cfengine-community/inputs/inventory/1.0/fusionAgent.cf' near line 516
> 2014-06-03T10:26:15+0000     info: Comment is 'Add the UUID and CFKEY tags in the inventory file'

which is quite scary.
The cause is that we do the insert of user list in the inventory by iterating over the user list, rather than passing the list to the bundle edit_line and do one iteration.
Changing the $ by a @ saves 50KB of Inform output for the inventory generation.

#1

Updated by Nicolas CHARLES about 6 years ago

  • Assignee set to Nicolas CHARLES
  • Target version changed from 2.9.5 to 2.6.13

ok, replacing the $ by a @ gives the following improvement:
before:

6.80user 0.52system 0:12.56elapsed 58%CPU (0avgtext+0avgdata 137904maxresident)k
59312inputs+8680outputs (243major+91584minor)pagefaults 0swaps

after
2.91user 0.52system 0:09.31elapsed 36%CPU (0avgtext+0avgdata 137904maxresident)k
53600inputs+2120outputs (246major+89447minor)pagefaults 0swaps

#2

Updated by Nicolas CHARLES about 6 years ago

  • Status changed from New to Pending technical review
  • Assignee changed from Nicolas CHARLES to Jonathan CLARKE
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/392
#3

Updated by Nicolas CHARLES about 6 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100

Applied in changeset policy-templates:commit:1bb5bc94f727f1fb8062a4ffd73278e9497a4975.

#4

Updated by Jonathan CLARKE about 6 years ago

Applied in changeset policy-templates:commit:2de24052c5e2bf05a27ddb09b301b372901b38a9.

#5

Updated by Vincent MEMBRÉ about 6 years ago

  • Subject changed from The insertion of users in the inventory is really inefficient and causes a lot of scary warning messages to cf-agent slowed by user addition into inventory and displays a lot of warnings about that
#6

Updated by Vincent MEMBRÉ about 6 years ago

  • Subject changed from cf-agent slowed by user addition into inventory and displays a lot of warnings about that to cf-agent slowed by users addition into inventory and displays a lot of warnings about that
#7

Updated by Vincent MEMBRÉ almost 6 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 2.6.13 (announcement , changelog), 2.9.5 (announcement , changelog) and 2.10.1 (announcement , changelog), which were released today.

Also available in: Atom PDF