Bug 563818 - condor_trigger_config -i complains "Session was not closed cleanly"
Summary: condor_trigger_config -i complains "Session was not closed cleanly"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: grid
Version: Development
Hardware: All
OS: Linux
medium
medium
Target Milestone: 1.3
: ---
Assignee: Nuno Santos
QA Contact: Jan Sarenik
URL:
Whiteboard:
Depends On: 601828
Blocks: 499864
TreeView+ depends on / blocked
 
Reported: 2010-02-11 09:21 UTC by Jan Sarenik
Modified: 2013-09-12 22:11 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
test_triggers core backtrace (1.76 KB, text/plain)
2010-05-13 11:25 UTC, Jan Sarenik
no flags Details
Triggerd initialization test (2.37 KB, application/x-gzip)
2010-05-13 16:17 UTC, Jan Sarenik
no flags Details
port of trigger_config tool to python (7.94 KB, application/octet-stream)
2010-06-11 19:25 UTC, Nuno Santos
no flags Details
updated port of trigger_config to python (to catch connection errors) (8.63 KB, application/octet-stream)
2010-06-11 20:55 UTC, Nuno Santos
no flags Details
working, updated port of trigger_config (8.43 KB, application/octet-stream)
2010-06-11 21:06 UTC, Nuno Santos
no flags Details
working, updated port (8.64 KB, application/octet-stream)
2010-06-11 21:20 UTC, Nuno Santos
no flags Details

Description Jan Sarenik 2010-02-11 09:21:24 UTC
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

Comment 3 Jan Sarenik 2010-05-13 11:23:44 UTC
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.

Comment 4 Jan Sarenik 2010-05-13 11:25:01 UTC
Created attachment 413720 [details]
test_triggers core backtrace

Comment 5 Jan Sarenik 2010-05-13 16:17:00 UTC
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)

Comment 8 Matthew Farrellee 2010-06-09 15:35:37 UTC
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.

Comment 9 Nuno Santos 2010-06-11 19:25:51 UTC
Created attachment 423377 [details]
port of trigger_config tool to python

Comment 10 Nuno Santos 2010-06-11 19:33:29 UTC
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).

Comment 11 Matthew Farrellee 2010-06-11 19:52:44 UTC
I'll review and push it along.

Comment 12 Matthew Farrellee 2010-06-11 20:20:05 UTC
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')

Comment 13 Matthew Farrellee 2010-06-11 20:22:16 UTC
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)

Comment 14 Nuno Santos 2010-06-11 20:55:32 UTC
Created attachment 423389 [details]
updated port of trigger_config to python (to catch connection errors)

Comment 15 Nuno Santos 2010-06-11 21:06:15 UTC
Created attachment 423391 [details]
working, updated port of trigger_config

Thanks to pmackinn for catching the args bug

Comment 16 Nuno Santos 2010-06-11 21:20:56 UTC
Created attachment 423394 [details]
working, updated port

Added option to delete all installed triggers (-d 0)

Comment 17 Matthew Farrellee 2010-06-11 21:56:22 UTC
added copyright, changed self.query = name to self.query = query

built into condor 7.4.3-0.19

Comment 18 Jan Sarenik 2010-06-21 12:12:35 UTC
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?

Comment 20 Robert Rati 2010-06-21 13:24:38 UTC
Please try the tool in 7.4.3-0.19 and verify it addresses your concerns.

Comment 22 Jan Sarenik 2010-06-21 14:17:50 UTC
This is why it did not work: https://bugzilla.redhat.com/show_bug.cgi?id=606391

Comment 23 Jan Sarenik 2010-06-21 14:45:07 UTC
Verified on
  condor-qmf-7.4.3-0.20.el5 and condor-qmf-7.4.3-0.21.el5


Note You need to log in before you can comment on or make changes to this bug.