I've been able to verify that version 2.2.10 of cfservd does not honor the 
LastSeen setting. I've tested this out against both libdb-4.2 and 
libdb-4.6. What happens is that with LastSeen set to 'off' (or 'false') 
the cfservd process will create a lastseen db file per client that 
connects, ex. cf_LastSeen.db.host.domain.com. More context is provided 
below from a prior email.

I'm not sure when exactly this bug was introduced, but v2.1.20 of cfservd 
works as expected. That is, if you set LastSeen to 'false' then v2.1.20 of 
cfservd will not create a lastseen database file for each client that 
connects to the server. Maybe LastSeen was omitted as being a valid option 
in cfservd.conf sometime after 2.1.20?


---------- Forwarded message ----------
Date: Tue, 30 Jun 2009 10:04:42 -0700
From: Chris Ward <kr...@facebook.com>
To: "help-cfeng...@cfengine.org" <help-cfeng...@cfengine.org>
Subject: cfservd not honoring lastseen?


Hi, has anyone else had difficulty in completely turning off the lastseen
databases on the cfservd side (v2.2.10)? I've added "LastSeen = ( off )"
to the control section in update.conf, cfagent.conf and even cfservd.conf.
According to the docs this is an option to cfagent, and not cfservd, but I
thought I'd try adding it to cfservd.conf anyway.

So even with this option set to 'off' or 'false' the lastseen database
files are populated per host on the server side, ex. cf_LastSeen.db.$fqdn.
Running 'cfservd -d0' shows that lastseen is being set to 'off' (see
below), but if I clear out all the lastseen db files and restart the
cfservd process they are still populated. Can someone speak to what might
be instructing cfservd to populate those files? Maybe I'm missing an
option to either cfservd.conf or cfagent&update.conf?

One interesting debug line is this one (full output below):

GetMacroValue(server,LastSeenExpireAfter): using scope 'server' for
variable 'LastSeenExpireAfter'

We don't define LastSeenExpireAfter on the client side, but maybe it
defaults to a value that instructs the server to record lastseen info?
I've tried setting LastSeenExpireAfter to '0', but that did not prevent
the server from creating the lastseen dbs.

-Chris



LVALUE LastSeen
HandleLVALUE(LastSeen) in action Control Defintions:
RecordMacroId(LastSeen)
EQUALS =
LEFTBRACK
RVAL-VAROBJ off
ExpandVarstring( off )
Add |off| to str, waiting at ||
Returning varstring (off)
IsInstallable(any) - true
Assign variable [LastSeen=off] when any)
AddMacroValue(server.LastSeen=off)
ExpandVarstring( off )
Add |off| to str, waiting at ||
Returning varstring (off)
Added Macro at hash address 1309 to object server with value LastSeen=off
RIGHTBRACK

LastSeen(host.example.domain.com) reg
IPV4 address
sockaddr_ntop(10.0.0.100)
Found address (10.0.0.100) for host host.example.domain.com
GetMacroValue(server,LastSeenExpireAfter)
GetMacroValue(server,LastSeenExpireAfter): using scope 'server' for
variable 'LastSeenExpireAfter'

_______________________________________________
Help-cfengine mailing list
help-cfeng...@cfengine.org
https://cfengine.org/mailman/listinfo/help-cfengine
_______________________________________________
Bug-cfengine mailing list
Bug-cfengine@cfengine.org
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to