I want to re-use test_triggers.cpp from the grid.git/src/condor_triggerd/ tree, but don't know why it does not run even with condor_triggerd running fine with initialized default triggers (via condor_trigger_config). The test_triggers.cpp file I am using was last changed in commit 60f432fb36077d2b17db3e0c3abcb0e12b5bedb6 condor-qmf-7.4.4-0.4.el5 qpid-cpp-client-devel-0.7.946106-6.el5 How reproducible: 100% Steps to Reproduce: 1. g++ -g test_triggers.cpp -l qmfconsole 2. ./a.out Actual results: ================= Currently installed triggers: a.out: /usr/include/boost/shared_ptr.hpp:253: T* boost::shared_ptr<T>::operator->() const [with T = qpid::console::Value]: Assertion `px != 0' failed. Aborted (core dumped) Additional info: ================== #0 0x00002b7d69560265 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 64 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); (gdb) bt #0 0x00002b7d69560265 in raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00002b7d69561d10 in abort () at abort.c:88 #2 0x00002b7d695596e6 in __assert_fail (assertion=0x40bc22 "px != 0", file=0x40bc00 "/usr/include/boost/shared_ptr.hpp", line=253, function=0x40bfe0 "T* boost::shared_ptr<T>::operator->() const [with T = qpid::console::Value]") at assert.c:78 #3 0x000000000040b0e7 in boost::shared_ptr<qpid::console::Value>::operator-> ( this=0x7fffb3c4b950) at /usr/include/boost/shared_ptr.hpp:253 #4 0x0000000000406340 in Tester::GetInterval (this=0x7fffb3c4bad0) at test_triggers.cpp:222 #5 0x00000000004088f6 in main_int (argc=1, argv=0x7fffb3c4bdf8) at test_triggers.cpp:279 #6 0x0000000000408f1c in main (argc=1, argv=0x7fffb3c4bdf8) at test_triggers.cpp:352
The issue here is primarily that the C++ Console cannot interact with QMFv2 agents, of which the condor_triggerd is one.
test_triggers.cpp can be found at http://git.fedorahosted.org/git/?p=grid.git;a=blob;f=src/condor_triggerd/test_triggers.cpp;h=75baedeeba4d4531e0125a46582a07982a031b24;hb=HEAD
As with Bug 563818, the solution here is likely to rewrite the test_triggers.cpp in Python.
Yes, python clone would help.
Since there was a lot of common code between condor_trigger_config and test_triggers, I ended up adding the trigger testing code to the python condor_trigger_config and make it callable via a new option (-s/--test).
Created attachment 442670 [details] merged test_triggers into condor_trigger_config
The code is not in grid.git tree yet. http://git.fedorahosted.org/git/?p=grid.git
Built in 7.4.4-0.11
I think something is wrong. # condor_trigger_config -i localhost Connecting to broker 'localhost'... Initializing, adding default triggers... Adding trigger 'High CPU Usage'... Adding trigger 'Low Free Mem'... Adding trigger 'Low Free Disk Space (/)'... Adding trigger 'Busy and Swapping'... Adding trigger 'Busy but Idle'... Adding trigger 'Idle for long time'... Adding trigger 'Logs with ERROR entries'... Adding trigger 'Logs with error entries'... Adding trigger 'Logs with DENIED entries'... Adding trigger 'Logs with denied entries'... Adding trigger 'Logs with WARNING entries'... Adding trigger 'Logs with warning entries'... Adding trigger 'dprintf Logs'... Adding trigger 'Logs with stack dumps'... Adding trigger 'Core Files'... [root@slanina ~]# condor_trigger_config -s localhost Connecting to broker 'localhost'... Received 'bind' event, ignoring Received 'bind' event, ignoring Received 'bind' event, ignoring Testing triggers... Listing currently installed triggers... Currently installed triggers: ID Name Query Text ========================================================================================================================================================================================================================================================================================== 1284715456 High CPU Usage (TriggerdLoadAvg1Min > 5) $(Machine) has a high load average ($(TriggerdLoadAvg1Min)) 1284715457 Low Free Mem (TriggerdMemFree <= 10240) $(Machine) has low free memory available ($(TriggerdMemFree )k) 1284715458 Low Free Disk Space (/) (TriggerdFilesystem_slash_Free < 10240) $(Machine) has low disk space on the / partition ($(TriggerdFilesystem_slash_Free)) 1284715459 Busy and Swapping (State == 'Claimed' && Activity == 'Busy' && TriggerdSwapInKBSec > 1000 && TriggerdActivityTime > 300) $(Machine) has been Claimed/Busy for $(TriggerdActivityTime) seconds and is swapping in at $(TriggerdSwapInKBSec) K/sec 1284715460 Busy but Idle (State == 'Claimed' && Activity == 'Busy' && CondorLoadAvg < 0.3 && TriggerdActivityTime > 300) $(Machine) has been Claimed/Busy for $(TriggerdActivityTime) seconds but only has a load of $(CondorLoadAvg) 1284715461 Idle for long time (State == 'Claimed' && Activity == 'Idle' && TriggerdActivityTime > 300) $(Machine) has been Claimed/Idle for $(TriggerdActivityTime) seconds 1284715462 Logs with ERROR entries (TriggerdCondorLogCapitalError != '') $(Machine) has $(TriggerdCondorLogCapitalErrorCount) ERROR messages in the following log files: $(TriggerdCondorLogCapitalError) 1284715463 Logs with error entries (TriggerdCondorLogLowerError != '') $(Machine) has $(TriggerdCondorLogLowerErrorCount) error messages in the following log files: $(TriggerdCondorLogLowerError) 1284715464 Logs with DENIED entries (TriggerdCondorLogCapitalDenied != '') $(Machine) has $(TriggerdCondorLogCapitalDeniedCount) DENIED Error messages in the following log files: $(TriggerdCondorLogCapitalDenied) 1284715465 Logs with denied entries (TriggerdCondorLogLowerDenied != '') $(Machine) has $(TriggerdCondorLogLowerDeniedCount) denied Error messages in the following log files: $(TriggerdCondorLogLowerDenied) 1284715467 Logs with WARNING entries (TriggerdCondorLogCapitalWarning != '') $(Machine) has $(TriggerdCondorLogCapitalWarningCount) WARNING messages in the following log files: $(TriggerdCondorLogCapitalWarning) 1284715468 Logs with warning entries (TriggerdCondorLogLowerWarning != '') $(Machine) has $(TriggerdCondorLogLowerWarningCount) warning messages in the following log files: $(TriggerdCondorLogLowerWarning) 1284715469 dprintf Logs (TriggerdCondorLogDPrintfs != '') $(Machine) has the following dprintf_failure log files: $(TriggerdCondorLogDPrintfs) 1284715470 Logs with stack dumps (TriggerdCondorLogStackDump != '') $(Machine) has $(TriggerdCondorLogStackDumpCount) stack dumps in the following log files: $(TriggerdCondorLogStackDump) 1284715471 Core Files (TriggerdCondorCoreFiles != '') $(Machine) has $(TriggerdCondorLogStackDumpCount) core files in the following locations: $(TriggerdCondorCoreFiles) Setting interval to '5' seconds... Retrieving interval... Interval correctly set to 5 seconds Adding trigger 'TestTrigger'... . . . the dots keep appearing like there was no end. Is this behavior correct? The only config file I am adding to condor (along with condor-qmf) is --------------------------------------------------------------------------- cat /etc/condor/config.d/40-triggerd.config QMF_BROKER_HOST = 127.0.0.1 QMF_UPDATE_INTERVAL = 1 COLLECTOR_UPDATE_INTERVAL = 1 QMF_PUBLISH_SUBMISSIONS = TRUE QUEUE_ALL_USERS_TRUSTED = TRUE DAEMON_LIST = $(DAEMON_LIST), TRIGGERD STARTD_CRON_NAME = TRIGGER_DATA STARTD_CRON_AUTOPUBLISH = If_Changed TRIGGER_DATA_JOBLIST = GetData TRIGGER_DATA_GETDATA_PREFIX = Triggerd TRIGGER_DATA_GETDATA_EXECUTABLE = $(BIN)/get_trigger_data TRIGGER_DATA_GETDATA_PERIOD = 5m TRIGGER_DATA_GETDATA_RECONFIG = FALSE ---------------------------------------------------------------------------
above was tested on condor-7.4.4-0.14.el5 condor-qmf-7.4.4-0.14.el5
Issue is that qmfv2 events aren't being passed up to the python console, so the tests are unable to run. Added a dependency on the msging BZ.
Verified test suite runs with: qpid-cpp-client-0.7.946106-22.el5 qpid-cpp-server-xml-0.7.946106-22.el5 qpid-java-example-0.7.946106-12.el5 qpid-cpp-client-devel-0.7.946106-22.el5 qpid-java-common-0.7.946106-12.el5 qpid-tools-0.7.946106-11.el5 qpid-cpp-server-ssl-0.7.946106-22.el5 qpid-cpp-server-store-0.7.946106-22.el5 qpid-java-client-0.7.946106-12.el5 qpid-cpp-server-0.7.946106-22.el5 qpid-cpp-client-ssl-0.7.946106-22.el5 python-qpid-0.7.946106-14+bz642686.el5 qpid-cpp-client-devel-docs-0.7.946106-22.el5 qpid-cpp-server-devel-0.7.946106-22.el5 qpid-cpp-server-cluster-0.7.946106-22.el5 condor-7.4.5-0.1.el5 condor-qmf-7.4.5-0.1.el5
Verified with condor-qmf-7.4.5-0.8.el5 using the same commands as in Comment #9.