command/module promise laments about return code 1
Xander Cage <[email protected]>
| Newsgroups | gmane.comp.sysutils.cfengine.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
So i have this simple module promise which calls a python script (module).
i dont know why, but from one day to another it starts complaining about a
not zero return code and
therefor goes to failed state.
the promise:
```
bundle agent cfe_internals_checkup { commands:
"$(sys.workdir)/modules/cfe_db_check" args => "", module => "true", contain
=> command_timeout(30), comment => "run the check meck fuck script",
classes => cfe_db_module; reports: #CFE_DB_MODULE_KEPT:: # "Time:
$(sys.date) - Bundle: $(this.bundle) - Message: cfe_db_check was running
successfully."; CFAGENT_HANGS:: "Time: $(sys.date) - Bundle: $(this.bundle)
- Message: Agent hangs, The Purge was initiated."; CFE_DB_ERRORS_FATAL::
"Time: $(sys.date) - Bundle: $(this.bundle) - Message: CFE internal
Databases are bonkers, cfengine killed, cleanup triggered.";
CFE_DB_IN_DIFFICULTIES:: "Time: $(sys.date) - Bundle: $(this.bundle) -
Message: CFE internal Databases are in danger."; #CFE_DB_OK:: # "Time:
$(sys.date) - Bundle: $(this.bundle) - Message: CFE internal Databases are
good."; } body classes cfe_db_module { kept_returncodes => { "0" };
promise_kept => { "CFE_DB_MODULE_KEPT" }; }
```
outcome:
```
root@aixstp17t1: /var/cfengine/outputs # /var/cfengine/bin/cf-agent -KI -b
cfe_internals_checkup
info: Using command line specified bundlesequence
info: Executing 'timeout=30s' ... '/var/cfengine/modules/cfe_db_check '
info: Command related to promiser '/var/cfengine/modules/cfe_db_check'
returned code '1' not defined as promise kept, not kept or repaired;
setting to failed
info: Completed execution of '/var/cfengine/modules/cfe_db_check '
```
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.2
an idea whats wrong here...
--
You received this message because you are subscribed to the Google Groups "help-cfengine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/help-cfengine/432ad003-d34d-4e1c-8af8-c620b4b8799an%40googlegroups.com.