Skip to content

Commit

Permalink
Increase the lua-time-limit to 15sec from 5sec
Browse files Browse the repository at this point in the history
contrail-collector executes delrequest.lua script when a Generator
gets disconnected. On a scale setup, some Generators (vrouter-agent,
tor-agent) originates more UVEs. Therefore, in some cases,
delrequest.lua takes more than 5 seconds [default lua-time-limit] to
complete. If the lua script runs for more than the configured time
limit, then redis returns error to other requests till the script is
completed.

This patch increases the lua-time-limit to 15000 milliseconds
in the redis config file.

Change-Id: Ieb7d543c22edad13936f58b04abb41632578f51e
Partial-Bug: #1459769
  • Loading branch information
Sundaresan Rajangam committed Jun 9, 2015
1 parent 3f5c6bc commit f554d96
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -171,7 +171,7 @@
}
->
exec { "redis-conf-exec":
command => "sed -i -e '/^[ ]*bind/s/^/#/' /etc/redis/redis.conf; dbfilename=$(grep '^dbfilename' /etc/redis/redis.conf | awk '{print $2}'); if [ -n \"${dbfilename}\" ]; then dbdir=$(grep '^dir' /etc/redis/redis.conf | awk '{print $2}'); if [ -n \"${dbdir}\" ]; then rm -f \"${dbdir}\"/\"${dbfilename}\"; fi; fi; sed -i -e '/^[ ]*save/s/^/#/' /etc/redis/redis.conf; sed -i -e '/^[ ]*dbfilename/s/^/#/' /etc/redis/redis.conf; chkconfig redis-server on; service redis-server restart && echo redis-conf-exec>> /etc/contrail/contrail-collector-exec.out",
command => "sed -i -e '/^[ ]*bind/s/^/#/' /etc/redis/redis.conf; dbfilename=$(grep '^dbfilename' /etc/redis/redis.conf | awk '{print $2}'); if [ -n \"${dbfilename}\" ]; then dbdir=$(grep '^dir' /etc/redis/redis.conf | awk '{print $2}'); if [ -n \"${dbdir}\" ]; then rm -f \"${dbdir}\"/\"${dbfilename}\"; fi; fi; sed -i -e '/^[ ]*save/s/^/#/' /etc/redis/redis.conf; sed -i -e '/^[ ]*dbfilename/s/^/#/' /etc/redis/redis.conf; sed -i -e 's/lua-time-limit.*/lua-time-limit 15000/' /etc/redis/redis.conf; chkconfig redis-server on; service redis-server restart && echo redis-conf-exec>> /etc/contrail/contrail-collector-exec.out",
onlyif => "test -f /etc/redis/redis.conf",
require => Package["contrail-openstack-analytics"],
unless => "grep -qx redis-conf-exec /etc/contrail/contrail-collector-exec.out",
Expand Down

0 comments on commit f554d96

Please sign in to comment.