Bug #10449
closedValidation hooks should execute cf-promises by exec
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.
Updated by Benoît PECCATTE almost 8 years ago
- Status changed from New to In progress
- Assignee set to Benoît PECCATTE
Updated by Benoît PECCATTE almost 8 years 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
Updated by Benoît PECCATTE almost 8 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|1a181edf97bc7b0e3caece653bfe3e8713d0f9df.
Updated by Alexis Mousset over 7 years 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
Updated by Benoît PECCATTE over 7 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 4.1.0 which was released today.
- 4.1.0: Announce Changelog
- Download: https://www.rudder-project.org/site/get-rudder/downloads/