Ask Your Question

node-ttl not working as expected

asked 2016-07-27 10:01:57 -0600

ogden gravatar image


So I'm a bit confused about how node-ttl and node-purge-ttl should work. I have them setup in the database.ini file. node-ttl is set to 35m and node-purge-ttl is set to 5m. From the puppetdb docs I draw the conclusion that with these settings, a node will be expired after 35 minutes of inactivity e.g. node is dead and didn't check in with master for 35 minutes, and after 5 minutes the node should be purged from the db.

But this doesn't seem to happen. The node is still there looking alive and happy even after more than 40 minutes after it was terminated. However, the node seems to disappear after the db performs the compaction according to gc-interval.

Am I understanding this functionality correctly? And if I am, what am I doing wrong? I'm using latest versions of puppetdb and puppetserver.

These are the parameters set in my database.ini file:

# How often (in minutes) to compact the database
# gc-interval = 60
gc-interval = 60

# Number of seconds before any SQL query is considered 'slow'; offending
# queries will not be interrupted, but will be logged at the WARN log level.
log-slow-statements = 10
syntax_pgs = true
node-ttl = 35m
node-purge-ttl = 5m
report-ttl = 14d
conn-max-age = 60
conn-keep-alive = 45
conn-lifetime = 0
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-01-23 07:08:01 -0600

b4ldr gravatar image

i know this is old but 'Nodes will be checked for staleness every gc-interval minutes.' so the gc-interval really needs to be at least the same os node-ttl but you probably want it much smaller

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2016-07-27 10:01:57 -0600

Seen: 152 times

Last updated: Jan 23