Testing triggerd implies initializing the service with the default set of triggers according to the documentation which can be found at https://bugzilla.redhat.com/show_bug.cgi?id=510139#c1 After issuing the command `condor_trigger_config -i' I get this output: 2010-02-11 09:49:04 warning Session was not closed cleanly: anonymous.qmfc-133cbbe1-f758-4dce-8778-9d30b3612b90 Later when I try to use the `test_triggers.cpp' example triggerd console, I get: --- 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 --- I expect it to do everything cleanly. Testing on RHEL5 x86_64 condor-qmf-7.4.3-0.1.el5 qpid-cpp-server-0.7.908272-1.el5 all MRG-related packages are from current mrg-devel repository test_triggers.cpp can be found in repository git://git.fedorahosted.org/git/grid.git on branch with the same version number as the current condor packages and in directory src/condor_triggerd
Still the same on current -devel packages. I am setting blocker flag to raise visibility. # rpm -q condor-qmf qpid-cpp-server condor-qmf-7.4.3-0.13.el5 qpid-cpp-server-0.7.939184-1.el5 ### qpidd and properly set-up condor are both running # condor_trigger_config -i 2010-05-13 10:44:44 warning Session was not closed cleanly: anonymous.qmfc-6e958904-4b9d-4e0e-879b-b039c93882cb 2010-05-13 10:44:44 warning Connection closed # ./test_triggers Currently installed triggers: test_triggers: /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) The backtraced output of dumped core will be attached in next comment.
Created attachment 413720 [details] test_triggers core backtrace
Created attachment 413807 [details] Triggerd initialization test May not verify yet, but at least proves it does not work. Run 'make' after extracting the tarball. (tested on RHEL5.5)
C++ Console (trigger_config) can only talk to v1 Agents. C++ Agents (triggerd) are all v2. Decision on this is to rewrite the trigger_config tool in Python, which can talk to v2 Agents.
Created attachment 423377 [details] port of trigger_config tool to python
Not sure where the grid guys want to put this (git? svn?) so I've attached the python port, feel free to commit it where appropriate (or let me know where and I'll check it in).
I'll review and push it along.
Please update to avoid dumping stack traces to stdout: $ python ./trigger_config.py asdf Connecting to broker 'asdf'... Traceback (most recent call last): File "./trigger_config.py", line 194, in ? main() File "./trigger_config.py", line 172, in main session.addBroker(broker) File "/usr/lib/python2.4/site-packages/qmf/console.py", line 617, in addBroker ssl = url.scheme == URL.AMQPS, connTimeout=timeout) File "/usr/lib/python2.4/site-packages/qmf/console.py", line 1979, in __init__ self._tryToConnect() File "/usr/lib/python2.4/site-packages/qmf/console.py", line 2078, in _tryToConnect sock = connect(self.host, self.port) File "/usr/lib/python2.4/site-packages/qpid/util.py", line 43, in connect sock.connect((host, port)) File "<string>", line 1, in connect socket.gaierror: (-2, 'Name or service not known')
Can't verify script works because of Bug 601828 $ python ./trigger_config.py --init mrg13 Connecting to broker 'mrg13'... Initializing, adding default triggers... Adding trigger 'High CPU Usage'... Error: Failed to add trigger 'High CPU Usage' (error message: 7 - error) Adding trigger 'Low Free Mem'... Error: Failed to add trigger 'Low Free Mem' (error message: 7 - error) Adding trigger 'Low Free Disk Space (/)'... Error: Failed to add trigger 'Low Free Disk Space (/)' (error message: 7 - error) Adding trigger 'Busy and Swapping'... Error: Failed to add trigger 'Busy and Swapping' (error message: 7 - error) Adding trigger 'Busy but Idle'... Error: Failed to add trigger 'Busy but Idle' (error message: 7 - error) Adding trigger 'Idle for long time'... Error: Failed to add trigger 'Idle for long time' (error message: 7 - error) Adding trigger 'Logs with ERROR entriess'... Error: Failed to add trigger 'Logs with ERROR entriess' (error message: 7 - error) Adding trigger 'Logs with error entriess'... Error: Failed to add trigger 'Logs with error entriess' (error message: 7 - error) Adding trigger 'Logs with DENIED entries'... Error: Failed to add trigger 'Logs with DENIED entries' (error message: 7 - error) Adding trigger 'Logs with denied entries'... Error: Failed to add trigger 'Logs with denied entries' (error message: 7 - error) Adding trigger 'Logs with WARNING entries'... Error: Failed to add trigger 'Logs with WARNING entries' (error message: 7 - error) Adding trigger 'Logs with warning entries'... Error: Failed to add trigger 'Logs with warning entries' (error message: 7 - error) Adding trigger 'dprintf Logs'... Error: Failed to add trigger 'dprintf Logs' (error message: 7 - error) Adding trigger 'Logs with stack dumps'... Error: Failed to add trigger 'Logs with stack dumps' (error message: 7 - error) Adding trigger 'Core Files'... Error: Failed to add trigger 'Core Files' (error message: 7 - error)
Created attachment 423389 [details] updated port of trigger_config to python (to catch connection errors)
Created attachment 423391 [details] working, updated port of trigger_config Thanks to pmackinn for catching the args bug
Created attachment 423394 [details] working, updated port Added option to delete all installed triggers (-d 0)
added copyright, changed self.query = name to self.query = query built into condor 7.4.3-0.19
I am using condor-qmf-7.4.3-0.20.el5 (which should depend also on python-qmf as it uses qmf.console in that condor_trigger_config) with no success: # condor_trigger_config -i localhost Connecting to broker 'localhost'... No condor trigger service found Qpidd is running with auth=no. Condor is running with following config.local: ---------------------------------------------------------------------------- CONDOR_DEVELOPERS = NONE CONDOR_DEVELOPERS_COLLECTOR = NONE CONDOR_ADMIN = root@$(FULL_HOSTNAME) CONDOR_HOST = $(FULL_HOSTNAME) COLLECTOR_NAME = Personal Condor START = TRUE SUSPEND = FALSE PREEMPT = FALSE KILL = FALSE DAEMON_LIST = COLLECTOR, MASTER, NEGOTIATOR, SCHEDD, STARTD, TRIGGERD NEGOTIATOR_INTERVAL = 20 LOCAL_CONFIG_DIR = $(LOCAL_DIR)/config TRUST_UID_DOMAIN = TRUE SCHEDD.PLUGINS = $(LIB)/plugins/MgmtScheddPlugin-plugin.so COLLECTOR.PLUGINS = $(LIB)/plugins/MgmtCollectorPlugin-plugin.so NEGOTIATOR.PLUGINS = $(LIB)/plugins/MgmtNegotiatorPlugin-plugin.so MASTER.PLUGINS = $(LIB)/plugins/MgmtMasterPlugin-plugin.so 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 QMF_BROKER_HOST = 127.0.0.1 ---------------------------------------------------------------------------- Am I missing something?
Please try the tool in 7.4.3-0.19 and verify it addresses your concerns.
This is why it did not work: https://bugzilla.redhat.com/show_bug.cgi?id=606391
Verified on condor-qmf-7.4.3-0.20.el5 and condor-qmf-7.4.3-0.21.el5