Project

General

Profile

Bug #10449

Validation hooks should execute cf-promises by exec

Added by Janos Mattyasovszky 6 months ago. Updated 6 months ago.

Status:
Released
Priority:
N/A
Category:
-
Target version:
Target version (plugin):
Severity:
User visibility:
Effort required:
Priority:
0

Description

When currently validation is enabled, things can get pretty heavy if you have a looot of nodes (currently testing with just above 2000) - same method as ncharles, but using "real life inventories".

The problem is, that the current script /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check does run the cf-promises by starting a child process, but does nothing afterwards, so basically the exit code of the cf-promises is the exit code of the script.

Using exec before the cf-promises would reduce the number of processes (would also be better for nofiles limits) by a great deal:

root     30032  0.0  0.0  19740  1624 ?        S    22:25   0:00  \_ /bin/sh /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check
root     30057 30.4  0.0  46944 16856 ?        R    22:25   0:04  |   \_ /var/rudder/cfengine-community/bin/cf-promises -f /var/rudder/share/f8ee1cd2
root     30282  0.0  0.0  19740  1624 ?        S    22:25   0:00  \_ /bin/sh /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check
root     30290 24.6  0.0  47228 17028 ?        R    22:25   0:03  |   \_ /var/rudder/cfengine-community/bin/cf-promises -f /var/rudder/share/f4cd6516
root     30328  0.0  0.0  19740  1624 ?        S    22:25   0:00  \_ /bin/sh /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check
root     30367 26.1  0.0  47232 17036 ?        R    22:25   0:03  |   \_ /var/rudder/cfengine-community/bin/cf-promises -f /var/rudder/share/ffe280d0
root     31809  0.0  0.0  19740  1624 ?        S    22:25   0:00  \_ /bin/sh /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check
root     31830 18.2  0.0  47228 17032 ?        R    22:25   0:02  |   \_ /var/rudder/cfengine-community/bin/cf-promises -f /var/rudder/share/2025c11d
root      1572  0.0  0.0  19740  1624 ?        S    22:25   0:00  \_ /bin/sh /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check
root      1599 20.9  0.0  46944 16868 ?        R    22:25   0:02  |   \_ /var/rudder/cfengine-community/bin/cf-promises -f /var/rudder/share/0ba2e544
root      1969  0.0  0.0  19740  1628 ?        S    22:25   0:00  \_ /bin/sh /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check
root      1980 20.9  0.0  47240 17036 ?        R    22:25   0:02  |   \_ /var/rudder/cfengine-community/bin/cf-promises -f /var/rudder/share/c9b4ff24
root      4161  0.0  0.0  19740  1624 ?        S    22:25   0:00  \_ /bin/sh /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check
root      4185 17.6  0.0  47236 17032 ?        R    22:25   0:01  |   \_ /var/rudder/cfengine-community/bin/cf-promises -f /var/rudder/share/50c350ba
root      4844  0.0  0.0  19740  1624 ?        S    22:25   0:00  \_ /bin/sh /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check
root      4874 18.5  0.0  46940 16856 ?        R    22:25   0:01  |   \_ /var/rudder/cfengine-community/bin/cf-promises -f /var/rudder/share/ef68c3ec
root      5340  0.0  0.0  19740  1624 ?        S    22:25   0:00  \_ /bin/sh /opt/rudder/etc/hooks.d/policy-generation-node-ready/10-cf-promise-check
root      5356 16.0  0.0  46944 16860 ?        S    22:25   0:01  |   \_ /var/rudder/cfengine-community/bin/cf-promises -f /var/rudder/share/6d486886

=> Half of the running processes for each validation could be saved from the process table.

Associated revisions

Revision 1a181edf
Added by Benoît PECCATTE 6 months ago

Fixes #10449: validation hooks should execute cf-promises by exec

History

#1 Updated by Alexis MOUSSET 6 months ago

  • Target version set to 4.1.0

#2 Updated by Benoît PECCATTE 6 months ago

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

#3 Updated by Benoît PECCATTE 6 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Benoît PECCATTE to Alexis MOUSSET
  • Pull Request set to https://github.com/Normation/rudder/pull/1599

#4 Updated by Benoît PECCATTE 6 months ago

  • Status changed from Pending technical review to Pending release

#5 Updated by Alexis MOUSSET 6 months ago

  • Subject changed from validation hooks should execute cf-promises by exec to Validation hooks should execute cf-promises by exec
  • Priority set to 0

#6 Updated by Benoît PECCATTE 6 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.0 which was released today.

Also available in: Atom PDF