Project

General

Profile

Actions

Bug #19771

closed

slow policy generation in Rudder 7.0

Added by Nicolas CHARLES over 1 year ago. Updated over 1 year ago.

Status:
Released
Priority:
N/A
Category:
System techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Regression:

Description

6 seconds for empty promises with 3 nodes
Turns out the policies validation for root server is really slow: it takes about 2secondes

a lot of commands are executed that could be skipped

# grep "Caching result" /tmp/out | sort | uniq
 verbose: Caching result for function 'execresult("${compatible_inputs_cmd} common","${shell_type}")'
 verbose: Caching result for function 'execresult("${compatible_inputs_cmd} local","${shell_type}")'
rudder  verbose: Caching result for function 'execresult("${paths.path[find]} ${g.rudder_ncf_origin_common} -not -name ${g.rudder_ncf_hash_file} -type f -print0  | ${paths.path[sort]} -z | /usr/bin/xargs -0 /usr/bin/sha1sum | /usr/bin/sha1sum","useshell")'
rudder  verbose: Caching result for function 'execresult("${paths.path[find]} ${g.rudder_ncf_origin_local} -not -name ${g.rudder_ncf_hash_file} -type f -print0  | ${paths.path[sort]} -z | /usr/bin/xargs -0 /usr/bin/sha1sum | /usr/bin/sha1sum","useshell")'
rudder  verbose: Caching result for function 'execresult("${paths.systemctl} --no-ask-password list-unit-files --type service | ${paths.awk} -F'.' '{print $1}' | ${paths.grep} -E \"^postgresql-?[0-9]*$\" | tail -n 1","useshell")'
rudder  verbose: Caching result for function 'execresult("/bin/date -u \"+%Y-%m-%d %T+00:00\"","noshell")'
rudder  verbose: Caching result for function 'execresult("/usr/bin/getent passwd root | cut -d: -f6","useshell")'
rudder  verbose: Caching result for function 'execresult("/usr/bin/printf '%d' 0x${splay_hex}","noshell")'
rudder  verbose: Caching result for function 'host2ip("${server_info.policy_server}")'
rudder  verbose: Caching result for function 'host2ip("127.0.0.1")'
Actions

Also available in: Atom PDF