Xander Cage <christia...@itsv.at> writes:
executing the python module directly in shell clearly returns zero…``` root@aixstp17t1: /var/cfengine/outputs # /var/cfengine/modules/cfe_db_check;echo $? +CFE_DB_OK 0 ``` including 1 in kept_returncodes will silence this but i want to know the reason for this.cfengine version is 3.18.2an idea whats wrong here…
I guess your cfe_db_check
script runs cf-check
? I suspicion that
whatever is happening might be related to running that while agents are
in motion vs running directly from the shell the agent is not in motion.
Care to share a gist or something with the source of your cfe_db_check
?
I recall, but don't immediately find reference to the specifics that
some of the cf-check
functionality is automtic by the agent. Like if
there is a corrupt lmdb the agent will automatically attempt to export
and import the data and failing that just move it out of the way and let
it regenerate automatically.
Xander Cage <christia...@itsv.at> writes:
Hi Nick,clairvoyant g…yes there is indeed a cf-check call…
Epic: bo...@hellskitchen.org
So, it looks like this was perhaps introduced back in 3.12. I would consider disabling it as I believe there has been more robust automatic lmdb issue detection and remediation introduced into the agent.
Again, I haven't searched deeply but as I recall when the agent starts going if it encounters an error with the lmdbs (not all errors, but the one that cf-check repair would fix at least) happen automatically.
Also since that is poking at the lmdbs while the agent is running, if you want to keep it, I would consider moving it's execution outside agent runs to cron or something. Perhaps peek at the watchdog stuff1, looks like it might be a good fit to put into that sort of thing.