Skip to content

Instantly share code, notes, and snippets.

@kevints
Created March 23, 2015 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevints/1a1279e6ce4d7ec650e0 to your computer and use it in GitHub Desktop.
Save kevints/1a1279e6ce4d7ec650e0 to your computer and use it in GitHub Desktop.
pesos test failure
% tox
GLOB sdist-make: /home/ksweeney/workspace/pesos/setup.py
py26 create: /home/ksweeney/workspace/pesos/.tox/py26
py26 installdeps: compactor[pb]==0.2.1, futures==2.1.6, mesos.interface==0.21.1, pytest, mock
py26 inst: /home/ksweeney/workspace/pesos/.tox/dist/pesos-0.2.0.zip
py26 runtests: PYTHONHASHSEED='2061337895'
py26 runtests: commands[0] | py.test tests
========================================================================= test session starts =========================================================================
platform linux2 -- Python 2.6.9 -- py-1.4.26 -- pytest-2.6.4
collected 18 items
tests/test_detector.py ..
tests/test_executor.py .FFFFFF....F
tests/test_protobuf_passing.py .
tests/test_scheduler.py .
tests/test_util.py ..
============================================================================== FAILURES ===============================================================================
____________________________________________________________ TestExecutor.test_mesos_executor_driver_abort ____________________________________________________________
args = (<test_executor.TestExecutor testMethod=test_mesos_executor_driver_abort>,), kw = {}
@wraps(f)
def _inner(*args, **kw):
self._patch_dict()
try:
> return f(*args, **kw)
.tox/py26/lib/python2.6/site-packages/mock.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_executor.py:270: in test_mesos_executor_driver_abort
assert driver.start() == mesos_pb2.DRIVER_RUNNING
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:279: in _wrapper
return method(self, *args, **kw)
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:314: in start
self.context.spawn(self.executor_process)
.tox/py26/lib/python2.6/site-packages/compactor/context.py:131: in spawn
process.initialize()
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:69: in initialize
self.link(self.slave)
.tox/py26/lib/python2.6/site-packages/compactor/process.py:114: in link
self._context.link(self.pid, to)
.tox/py26/lib/python2.6/site-packages/compactor/context.py:257: in link
self.maybe_connect(to, on_connect)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Context(Thread-3, stopped daemon 140188692899584)>, to_pid = PID(127.0.0.1, 59043, slave(3)), callback = <function null_wrapper at 0x31dc230>
def maybe_connect(self, to_pid, callback=None):
"""Synchronously open a connection to to_pid or return a connection if it exists."""
callback = stack_context.wrap(callback or (lambda stream: None))
def streaming_callback(data):
# we are not guaranteed to get an acknowledgment, but log and discard bytes if we do.
log.info('Received %d bytes from %s, discarding.' % (len(data), to_pid))
log.debug(' data: %r' % (data,))
def on_connect(exit_cb, stream):
log.info('Connection to %s established' % to_pid)
self._connections[to_pid] = stream
callback(stream)
self.loop.add_callback(
stream.read_until_close,
exit_cb,
streaming_callback=streaming_callback)
stream = self._connections.get(to_pid)
if stream is not None:
callback(stream)
return
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
if not sock:
raise self.SocketError('Failed opening socket')
# Set the socket non-blocking
sock.setblocking(0)
stream = IOStream(sock, io_loop=self.loop)
stream.set_nodelay(True)
stream.set_close_callback(partial(self.__on_exit, to_pid, b'closed from maybe_connect'))
connect_callback = partial(on_connect, partial(self.__on_exit, to_pid), stream)
log.info('Establishing connection to %s' % to_pid)
stream.connect((to_pid.ip, to_pid.port), callback=connect_callback)
if stream.closed():
> raise self.SocketError('Failed to initiate stream connection')
E SocketError: Failed to initiate stream connection
.tox/py26/lib/python2.6/site-packages/compactor/context.py:195: SocketError
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:13.490 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:13.490 MainThread Mounting message handler /slave(3)/mesos.internal.StatusUpdateMessage
INFO:2015-03-23 11:29:13.490 MainThread Mounting message handler /slave(3)/mesos.internal.ExecutorToFrameworkMessage
INFO:2015-03-23 11:29:13.491 MainThread Mounting message handler /slave(3)/mesos.internal.RegisterExecutorMessage
INFO:2015-03-23 11:29:13.491 MainThread Mounting message handler /slave(3)/mesos.internal.ReregisterExecutorMessage
INFO:2015-03-23 11:29:13.491 MainThread MesosExecutorDriver.start called
INFO:2015-03-23 11:29:13.491 MainThread Establishing connection to slave(3)@127.0.0.1:59043
WARNING:2015-03-23 11:29:13.492 Thread-3 error on read
Traceback (most recent call last):
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 630, in _handle_read
pos = self._read_to_buffer_loop()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 600, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 712, in _read_to_buffer
chunk = self.read_from_fd()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 976, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 107] Transport endpoint is not connected
DEBUG:2015-03-23 11:29:13.492 MainThread Stopping context
INFO:2015-03-23 11:29:13.492 Thread-3 Disconnected from slave(3)@127.0.0.1:59043 (closed from maybe_connect)
INFO:2015-03-23 11:29:13.492 MainThread Terminating slave(3)@127.0.0.1:59043
ERROR:2015-03-23 11:29:13.492 Thread-3 Received disconnection from slave(3)@127.0.0.1:59043 but no stream found.
INFO:2015-03-23 11:29:13.493 MainThread Unmounting <pesos.testing.MockSlave object at 0x3269950>
______________________________________________________ TestExecutor.test_mesos_executor_driver_framework_message ______________________________________________________
args = (<test_executor.TestExecutor testMethod=test_mesos_executor_driver_framework_message>,), kw = {}
@wraps(f)
def _inner(*args, **kw):
self._patch_dict()
try:
> return f(*args, **kw)
.tox/py26/lib/python2.6/site-packages/mock.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_executor.py:300: in test_mesos_executor_driver_framework_message
assert driver.start() == mesos_pb2.DRIVER_RUNNING
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:279: in _wrapper
return method(self, *args, **kw)
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:314: in start
self.context.spawn(self.executor_process)
.tox/py26/lib/python2.6/site-packages/compactor/context.py:131: in spawn
process.initialize()
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:69: in initialize
self.link(self.slave)
.tox/py26/lib/python2.6/site-packages/compactor/process.py:114: in link
self._context.link(self.pid, to)
.tox/py26/lib/python2.6/site-packages/compactor/context.py:257: in link
self.maybe_connect(to, on_connect)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Context(Thread-4, stopped daemon 140188692899584)>, to_pid = PID(127.0.0.1, 33338, slave(5)), callback = <function null_wrapper at 0x32d4848>
def maybe_connect(self, to_pid, callback=None):
"""Synchronously open a connection to to_pid or return a connection if it exists."""
callback = stack_context.wrap(callback or (lambda stream: None))
def streaming_callback(data):
# we are not guaranteed to get an acknowledgment, but log and discard bytes if we do.
log.info('Received %d bytes from %s, discarding.' % (len(data), to_pid))
log.debug(' data: %r' % (data,))
def on_connect(exit_cb, stream):
log.info('Connection to %s established' % to_pid)
self._connections[to_pid] = stream
callback(stream)
self.loop.add_callback(
stream.read_until_close,
exit_cb,
streaming_callback=streaming_callback)
stream = self._connections.get(to_pid)
if stream is not None:
callback(stream)
return
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
if not sock:
raise self.SocketError('Failed opening socket')
# Set the socket non-blocking
sock.setblocking(0)
stream = IOStream(sock, io_loop=self.loop)
stream.set_nodelay(True)
stream.set_close_callback(partial(self.__on_exit, to_pid, b'closed from maybe_connect'))
connect_callback = partial(on_connect, partial(self.__on_exit, to_pid), stream)
log.info('Establishing connection to %s' % to_pid)
stream.connect((to_pid.ip, to_pid.port), callback=connect_callback)
if stream.closed():
> raise self.SocketError('Failed to initiate stream connection')
E SocketError: Failed to initiate stream connection
.tox/py26/lib/python2.6/site-packages/compactor/context.py:195: SocketError
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:13.570 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:13.571 MainThread Mounting message handler /slave(5)/mesos.internal.StatusUpdateMessage
INFO:2015-03-23 11:29:13.571 MainThread Mounting message handler /slave(5)/mesos.internal.ExecutorToFrameworkMessage
INFO:2015-03-23 11:29:13.572 MainThread Mounting message handler /slave(5)/mesos.internal.RegisterExecutorMessage
INFO:2015-03-23 11:29:13.572 MainThread Mounting message handler /slave(5)/mesos.internal.ReregisterExecutorMessage
INFO:2015-03-23 11:29:13.572 MainThread MesosExecutorDriver.start called
INFO:2015-03-23 11:29:13.572 MainThread Establishing connection to slave(5)@127.0.0.1:33338
WARNING:2015-03-23 11:29:13.573 Thread-4 error on read
Traceback (most recent call last):
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 630, in _handle_read
pos = self._read_to_buffer_loop()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 600, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 712, in _read_to_buffer
chunk = self.read_from_fd()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 976, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 107] Transport endpoint is not connected
DEBUG:2015-03-23 11:29:13.573 MainThread Stopping context
INFO:2015-03-23 11:29:13.573 Thread-4 Disconnected from slave(5)@127.0.0.1:33338 (closed from maybe_connect)
INFO:2015-03-23 11:29:13.573 MainThread Terminating slave(5)@127.0.0.1:33338
ERROR:2015-03-23 11:29:13.573 Thread-4 Received disconnection from slave(5)@127.0.0.1:33338 but no stream found.
INFO:2015-03-23 11:29:13.573 MainThread Unmounting <pesos.testing.MockSlave object at 0x31dba10>
____________________________________________________________ TestExecutor.test_mesos_executor_driver_init _____________________________________________________________
args = (<test_executor.TestExecutor testMethod=test_mesos_executor_driver_init>,), kw = {}
@wraps(f)
def _inner(*args, **kw):
self._patch_dict()
try:
> return f(*args, **kw)
.tox/py26/lib/python2.6/site-packages/mock.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_executor.py:261: in test_mesos_executor_driver_init
assert driver.start() == mesos_pb2.DRIVER_RUNNING
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:279: in _wrapper
return method(self, *args, **kw)
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:314: in start
self.context.spawn(self.executor_process)
.tox/py26/lib/python2.6/site-packages/compactor/context.py:131: in spawn
process.initialize()
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:69: in initialize
self.link(self.slave)
.tox/py26/lib/python2.6/site-packages/compactor/process.py:114: in link
self._context.link(self.pid, to)
.tox/py26/lib/python2.6/site-packages/compactor/context.py:257: in link
self.maybe_connect(to, on_connect)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Context(Thread-5, stopped daemon 140188692899584)>, to_pid = PID(127.0.0.1, 47684, slave(7)), callback = <function null_wrapper at 0x32439b0>
def maybe_connect(self, to_pid, callback=None):
"""Synchronously open a connection to to_pid or return a connection if it exists."""
callback = stack_context.wrap(callback or (lambda stream: None))
def streaming_callback(data):
# we are not guaranteed to get an acknowledgment, but log and discard bytes if we do.
log.info('Received %d bytes from %s, discarding.' % (len(data), to_pid))
log.debug(' data: %r' % (data,))
def on_connect(exit_cb, stream):
log.info('Connection to %s established' % to_pid)
self._connections[to_pid] = stream
callback(stream)
self.loop.add_callback(
stream.read_until_close,
exit_cb,
streaming_callback=streaming_callback)
stream = self._connections.get(to_pid)
if stream is not None:
callback(stream)
return
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
if not sock:
raise self.SocketError('Failed opening socket')
# Set the socket non-blocking
sock.setblocking(0)
stream = IOStream(sock, io_loop=self.loop)
stream.set_nodelay(True)
stream.set_close_callback(partial(self.__on_exit, to_pid, b'closed from maybe_connect'))
connect_callback = partial(on_connect, partial(self.__on_exit, to_pid), stream)
log.info('Establishing connection to %s' % to_pid)
stream.connect((to_pid.ip, to_pid.port), callback=connect_callback)
if stream.closed():
> raise self.SocketError('Failed to initiate stream connection')
E SocketError: Failed to initiate stream connection
.tox/py26/lib/python2.6/site-packages/compactor/context.py:195: SocketError
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:13.599 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:13.600 MainThread Mounting message handler /slave(7)/mesos.internal.StatusUpdateMessage
INFO:2015-03-23 11:29:13.600 MainThread Mounting message handler /slave(7)/mesos.internal.ExecutorToFrameworkMessage
INFO:2015-03-23 11:29:13.600 MainThread Mounting message handler /slave(7)/mesos.internal.RegisterExecutorMessage
INFO:2015-03-23 11:29:13.600 MainThread Mounting message handler /slave(7)/mesos.internal.ReregisterExecutorMessage
INFO:2015-03-23 11:29:13.601 MainThread MesosExecutorDriver.start called
INFO:2015-03-23 11:29:13.601 MainThread Establishing connection to slave(7)@127.0.0.1:47684
WARNING:2015-03-23 11:29:13.601 Thread-5 error on read
Traceback (most recent call last):
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 630, in _handle_read
pos = self._read_to_buffer_loop()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 600, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 712, in _read_to_buffer
chunk = self.read_from_fd()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 976, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 107] Transport endpoint is not connected
DEBUG:2015-03-23 11:29:13.601 MainThread Stopping context
INFO:2015-03-23 11:29:13.602 Thread-5 Disconnected from slave(7)@127.0.0.1:47684 (closed from maybe_connect)
INFO:2015-03-23 11:29:13.602 MainThread Terminating slave(7)@127.0.0.1:47684
ERROR:2015-03-23 11:29:13.602 Thread-5 Received disconnection from slave(7)@127.0.0.1:47684 but no stream found.
INFO:2015-03-23 11:29:13.602 MainThread Unmounting <pesos.testing.MockSlave object at 0x32f9950>
________________________________________________________ TestExecutor.test_mesos_executor_driver_run_and_abort ________________________________________________________
args = (<test_executor.TestExecutor testMethod=test_mesos_executor_driver_run_and_abort>,), kw = {}
@wraps(f)
def _inner(*args, **kw):
self._patch_dict()
try:
> return f(*args, **kw)
.tox/py26/lib/python2.6/site-packages/mock.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_executor.TestExecutor testMethod=test_mesos_executor_driver_run_and_abort>
def test_mesos_executor_driver_run_and_abort(self):
os.environ['MESOS_SLAVE_PID'] = str(self.slave.pid)
executor = Executor()
driver = PesosExecutorDriver(executor, context=self.context)
join_event = threading.Event()
def runner():
assert driver.run() == mesos_pb2.DRIVER_ABORTED
join_event.set()
threading.Thread(target=runner).start()
assert not join_event.is_set()
driver.started.wait(timeout=10)
> assert driver.started.is_set()
E AssertionError: assert <bound method _Event.isSet of <threading._Event object at 0x3246910>>()
E + where <bound method _Event.isSet of <threading._Event object at 0x3246910>> = <threading._Event object at 0x3246910>.is_set
E + where <threading._Event object at 0x3246910> = <pesos.executor.PesosExecutorDriver object at 0x3246550>.started
tests/test_executor.py:289: AssertionError
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:13.629 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:13.630 MainThread Mounting message handler /slave(9)/mesos.internal.StatusUpdateMessage
INFO:2015-03-23 11:29:13.630 MainThread Mounting message handler /slave(9)/mesos.internal.ExecutorToFrameworkMessage
INFO:2015-03-23 11:29:13.631 MainThread Mounting message handler /slave(9)/mesos.internal.RegisterExecutorMessage
INFO:2015-03-23 11:29:13.631 MainThread Mounting message handler /slave(9)/mesos.internal.ReregisterExecutorMessage
INFO:2015-03-23 11:29:13.631 Thread-7 MesosExecutorDriver.start called
INFO:2015-03-23 11:29:13.632 Thread-7 Establishing connection to slave(9)@127.0.0.1:51728
WARNING:2015-03-23 11:29:13.632 Thread-6 error on read
Traceback (most recent call last):
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 630, in _handle_read
pos = self._read_to_buffer_loop()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 600, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 712, in _read_to_buffer
chunk = self.read_from_fd()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 976, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 107] Transport endpoint is not connected
INFO:2015-03-23 11:29:13.632 Thread-6 Disconnected from slave(9)@127.0.0.1:51728 (closed from maybe_connect)
ERROR:2015-03-23 11:29:13.632 Thread-6 Received disconnection from slave(9)@127.0.0.1:51728 but no stream found.
Exception in thread Thread-7:
Traceback (most recent call last):
File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/usr/lib/python2.6/threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/ksweeney/workspace/pesos/tests/test_executor.py", line 283, in runner
assert driver.run() == mesos_pb2.DRIVER_ABORTED
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/pesos/executor.py", line 279, in _wrapper
return method(self, *args, **kw)
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/pesos/executor.py", line 358, in run
self.status = self.start()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/pesos/executor.py", line 279, in _wrapper
return method(self, *args, **kw)
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/pesos/executor.py", line 314, in start
self.context.spawn(self.executor_process)
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/compactor/context.py", line 131, in spawn
process.initialize()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/pesos/executor.py", line 69, in initialize
self.link(self.slave)
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/compactor/process.py", line 114, in link
self._context.link(self.pid, to)
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/compactor/context.py", line 257, in link
self.maybe_connect(to, on_connect)
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/compactor/context.py", line 195, in maybe_connect
raise self.SocketError('Failed to initiate stream connection')
SocketError: Failed to initiate stream connection
DEBUG:2015-03-23 11:29:23.632 MainThread Stopping context
INFO:2015-03-23 11:29:23.632 MainThread Terminating slave(9)@127.0.0.1:51728
INFO:2015-03-23 11:29:23.632 MainThread Unmounting <pesos.testing.MockSlave object at 0x35194d0>
________________________________________________________ TestExecutor.test_mesos_executor_driver_status_update ________________________________________________________
args = (<test_executor.TestExecutor testMethod=test_mesos_executor_driver_status_update>,), kw = {}
@wraps(f)
def _inner(*args, **kw):
self._patch_dict()
try:
> return f(*args, **kw)
.tox/py26/lib/python2.6/site-packages/mock.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_executor.py:325: in test_mesos_executor_driver_status_update
assert driver.start() == mesos_pb2.DRIVER_RUNNING
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:279: in _wrapper
return method(self, *args, **kw)
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:314: in start
self.context.spawn(self.executor_process)
.tox/py26/lib/python2.6/site-packages/compactor/context.py:131: in spawn
process.initialize()
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:69: in initialize
self.link(self.slave)
.tox/py26/lib/python2.6/site-packages/compactor/process.py:114: in link
self._context.link(self.pid, to)
.tox/py26/lib/python2.6/site-packages/compactor/context.py:257: in link
self.maybe_connect(to, on_connect)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Context(Thread-8, stopped daemon 140188701292288)>, to_pid = PID(127.0.0.1, 59751, slave(11)), callback = <function null_wrapper at 0x32d4d70>
def maybe_connect(self, to_pid, callback=None):
"""Synchronously open a connection to to_pid or return a connection if it exists."""
callback = stack_context.wrap(callback or (lambda stream: None))
def streaming_callback(data):
# we are not guaranteed to get an acknowledgment, but log and discard bytes if we do.
log.info('Received %d bytes from %s, discarding.' % (len(data), to_pid))
log.debug(' data: %r' % (data,))
def on_connect(exit_cb, stream):
log.info('Connection to %s established' % to_pid)
self._connections[to_pid] = stream
callback(stream)
self.loop.add_callback(
stream.read_until_close,
exit_cb,
streaming_callback=streaming_callback)
stream = self._connections.get(to_pid)
if stream is not None:
callback(stream)
return
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
if not sock:
raise self.SocketError('Failed opening socket')
# Set the socket non-blocking
sock.setblocking(0)
stream = IOStream(sock, io_loop=self.loop)
stream.set_nodelay(True)
stream.set_close_callback(partial(self.__on_exit, to_pid, b'closed from maybe_connect'))
connect_callback = partial(on_connect, partial(self.__on_exit, to_pid), stream)
log.info('Establishing connection to %s' % to_pid)
stream.connect((to_pid.ip, to_pid.port), callback=connect_callback)
if stream.closed():
> raise self.SocketError('Failed to initiate stream connection')
E SocketError: Failed to initiate stream connection
.tox/py26/lib/python2.6/site-packages/compactor/context.py:195: SocketError
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:23.674 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:23.675 MainThread Mounting message handler /slave(11)/mesos.internal.StatusUpdateMessage
INFO:2015-03-23 11:29:23.675 MainThread Mounting message handler /slave(11)/mesos.internal.ExecutorToFrameworkMessage
INFO:2015-03-23 11:29:23.675 MainThread Mounting message handler /slave(11)/mesos.internal.RegisterExecutorMessage
INFO:2015-03-23 11:29:23.675 MainThread Mounting message handler /slave(11)/mesos.internal.ReregisterExecutorMessage
INFO:2015-03-23 11:29:23.676 MainThread MesosExecutorDriver.start called
INFO:2015-03-23 11:29:23.676 MainThread Establishing connection to slave(11)@127.0.0.1:59751
WARNING:2015-03-23 11:29:23.676 Thread-8 error on read
Traceback (most recent call last):
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 630, in _handle_read
pos = self._read_to_buffer_loop()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 600, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 712, in _read_to_buffer
chunk = self.read_from_fd()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 976, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 107] Transport endpoint is not connected
DEBUG:2015-03-23 11:29:23.677 MainThread Stopping context
INFO:2015-03-23 11:29:23.677 Thread-8 Disconnected from slave(11)@127.0.0.1:59751 (closed from maybe_connect)
INFO:2015-03-23 11:29:23.677 MainThread Terminating slave(11)@127.0.0.1:59751
ERROR:2015-03-23 11:29:23.677 Thread-8 Received disconnection from slave(11)@127.0.0.1:59751 but no stream found.
INFO:2015-03-23 11:29:23.677 MainThread Unmounting <pesos.testing.MockSlave object at 0x3246d10>
_____________________________________________________ TestExecutor.test_mesos_executor_framework_message_delivery _____________________________________________________
args = (<test_executor.TestExecutor testMethod=test_mesos_executor_framework_message_delivery>,), kw = {}
@wraps(f)
def _inner(*args, **kw):
self._patch_dict()
try:
> return f(*args, **kw)
.tox/py26/lib/python2.6/site-packages/mock.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_executor.py:222: in test_mesos_executor_framework_message_delivery
assert driver.start() == mesos_pb2.DRIVER_RUNNING
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:279: in _wrapper
return method(self, *args, **kw)
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:314: in start
self.context.spawn(self.executor_process)
.tox/py26/lib/python2.6/site-packages/compactor/context.py:131: in spawn
process.initialize()
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:69: in initialize
self.link(self.slave)
.tox/py26/lib/python2.6/site-packages/compactor/process.py:114: in link
self._context.link(self.pid, to)
.tox/py26/lib/python2.6/site-packages/compactor/context.py:257: in link
self.maybe_connect(to, on_connect)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Context(Thread-9, stopped daemon 140188701292288)>, to_pid = PID(127.0.0.1, 55364, slave(13)), callback = <function null_wrapper at 0x32e42a8>
def maybe_connect(self, to_pid, callback=None):
"""Synchronously open a connection to to_pid or return a connection if it exists."""
callback = stack_context.wrap(callback or (lambda stream: None))
def streaming_callback(data):
# we are not guaranteed to get an acknowledgment, but log and discard bytes if we do.
log.info('Received %d bytes from %s, discarding.' % (len(data), to_pid))
log.debug(' data: %r' % (data,))
def on_connect(exit_cb, stream):
log.info('Connection to %s established' % to_pid)
self._connections[to_pid] = stream
callback(stream)
self.loop.add_callback(
stream.read_until_close,
exit_cb,
streaming_callback=streaming_callback)
stream = self._connections.get(to_pid)
if stream is not None:
callback(stream)
return
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
if not sock:
raise self.SocketError('Failed opening socket')
# Set the socket non-blocking
sock.setblocking(0)
stream = IOStream(sock, io_loop=self.loop)
stream.set_nodelay(True)
stream.set_close_callback(partial(self.__on_exit, to_pid, b'closed from maybe_connect'))
connect_callback = partial(on_connect, partial(self.__on_exit, to_pid), stream)
log.info('Establishing connection to %s' % to_pid)
stream.connect((to_pid.ip, to_pid.port), callback=connect_callback)
if stream.closed():
> raise self.SocketError('Failed to initiate stream connection')
E SocketError: Failed to initiate stream connection
.tox/py26/lib/python2.6/site-packages/compactor/context.py:195: SocketError
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:23.704 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:23.705 MainThread Mounting message handler /slave(13)/mesos.internal.StatusUpdateMessage
INFO:2015-03-23 11:29:23.705 MainThread Mounting message handler /slave(13)/mesos.internal.ExecutorToFrameworkMessage
INFO:2015-03-23 11:29:23.706 MainThread Mounting message handler /slave(13)/mesos.internal.RegisterExecutorMessage
INFO:2015-03-23 11:29:23.706 MainThread Mounting message handler /slave(13)/mesos.internal.ReregisterExecutorMessage
INFO:2015-03-23 11:29:23.708 MainThread MesosExecutorDriver.start called
INFO:2015-03-23 11:29:23.709 MainThread Establishing connection to slave(13)@127.0.0.1:55364
WARNING:2015-03-23 11:29:23.709 Thread-9 error on read
Traceback (most recent call last):
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 630, in _handle_read
pos = self._read_to_buffer_loop()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 600, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 712, in _read_to_buffer
chunk = self.read_from_fd()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 976, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 107] Transport endpoint is not connected
DEBUG:2015-03-23 11:29:23.709 MainThread Stopping context
INFO:2015-03-23 11:29:23.710 Thread-9 Disconnected from slave(13)@127.0.0.1:55364 (closed from maybe_connect)
INFO:2015-03-23 11:29:23.710 MainThread Terminating slave(13)@127.0.0.1:55364
ERROR:2015-03-23 11:29:23.710 Thread-9 Received disconnection from slave(13)@127.0.0.1:55364 but no stream found.
INFO:2015-03-23 11:29:23.710 MainThread Unmounting <pesos.testing.MockSlave object at 0x3519c90>
______________________________________________________________ TestExecutor.test_mesos_executor_shutdown ______________________________________________________________
args = (<test_executor.TestExecutor testMethod=test_mesos_executor_shutdown>,), kw = {}
@wraps(f)
def _inner(*args, **kw):
self._patch_dict()
try:
> return f(*args, **kw)
.tox/py26/lib/python2.6/site-packages/mock.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_executor.py:245: in test_mesos_executor_shutdown
assert driver.start() == mesos_pb2.DRIVER_RUNNING
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:279: in _wrapper
return method(self, *args, **kw)
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:314: in start
self.context.spawn(self.executor_process)
.tox/py26/lib/python2.6/site-packages/compactor/context.py:131: in spawn
process.initialize()
.tox/py26/lib/python2.6/site-packages/pesos/executor.py:69: in initialize
self.link(self.slave)
.tox/py26/lib/python2.6/site-packages/compactor/process.py:114: in link
self._context.link(self.pid, to)
.tox/py26/lib/python2.6/site-packages/compactor/context.py:257: in link
self.maybe_connect(to, on_connect)
.tox/py26/lib/python2.6/site-packages/compactor/context.py:193: in maybe_connect
stream.connect((to_pid.ip, to_pid.port), callback=connect_callback)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <tornado.iostream.IOStream object at 0x3454250>, address = ('127.0.0.1', 58169), callback = <functools.partial object at 0x346e208>, server_hostname = None
def connect(self, address, callback=None, server_hostname=None):
"""Connects the socket to a remote address without blocking.
May only be called if the socket passed to the constructor was
not previously connected. The address parameter is in the
same format as for `socket.connect <socket.socket.connect>` for
the type of socket passed to the IOStream constructor,
e.g. an ``(ip, port)`` tuple. Hostnames are accepted here,
but will be resolved synchronously and block the IOLoop.
If you have a hostname instead of an IP address, the `.TCPClient`
class is recommended instead of calling this method directly.
`.TCPClient` will do asynchronous DNS resolution and handle
both IPv4 and IPv6.
If ``callback`` is specified, it will be called with no
arguments when the connection is completed; if not this method
returns a `.Future` (whose result after a successful
connection will be the stream itself).
If specified, the ``server_hostname`` parameter will be used
in SSL connections for certificate validation (if requested in
the ``ssl_options``) and SNI (if supported; requires
Python 3.2+).
Note that it is safe to call `IOStream.write
<BaseIOStream.write>` while the connection is pending, in
which case the data will be written as soon as the connection
is ready. Calling `IOStream` read methods before the socket is
connected works on some platforms but is non-portable.
.. versionchanged:: 4.0
If no callback is given, returns a `.Future`.
"""
self._connecting = True
if callback is not None:
self._connect_callback = stack_context.wrap(callback)
future = None
else:
future = self._connect_future = TracebackFuture()
try:
> self.socket.connect(address)
E AttributeError: 'NoneType' object has no attribute 'connect'
.tox/py26/lib/python2.6/site-packages/tornado/iostream.py:1031: AttributeError
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:23.802 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:23.803 MainThread Mounting message handler /slave(23)/mesos.internal.StatusUpdateMessage
INFO:2015-03-23 11:29:23.803 MainThread Mounting message handler /slave(23)/mesos.internal.ExecutorToFrameworkMessage
INFO:2015-03-23 11:29:23.803 MainThread Mounting message handler /slave(23)/mesos.internal.RegisterExecutorMessage
INFO:2015-03-23 11:29:23.804 MainThread Mounting message handler /slave(23)/mesos.internal.ReregisterExecutorMessage
INFO:2015-03-23 11:29:23.806 MainThread MesosExecutorDriver.start called
INFO:2015-03-23 11:29:23.806 MainThread Establishing connection to slave(23)@127.0.0.1:58169
WARNING:2015-03-23 11:29:23.806 Thread-15 error on read
Traceback (most recent call last):
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 630, in _handle_read
pos = self._read_to_buffer_loop()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 600, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 712, in _read_to_buffer
chunk = self.read_from_fd()
File "/home/ksweeney/workspace/pesos/.tox/py26/lib/python2.6/site-packages/tornado/iostream.py", line 976, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 107] Transport endpoint is not connected
DEBUG:2015-03-23 11:29:23.807 MainThread Stopping context
INFO:2015-03-23 11:29:23.807 Thread-15 Disconnected from slave(23)@127.0.0.1:58169 (closed from maybe_connect)
INFO:2015-03-23 11:29:23.807 MainThread Terminating slave(23)@127.0.0.1:58169
ERROR:2015-03-23 11:29:23.807 Thread-15 Received disconnection from slave(23)@127.0.0.1:58169 but no stream found.
INFO:2015-03-23 11:29:23.807 MainThread Unmounting <pesos.testing.MockSlave object at 0x345f590>
================================================================ 7 failed, 11 passed in 10.66 seconds =================================================================
ERROR: InvocationError: '/home/ksweeney/workspace/pesos/.tox/py26/bin/py.test tests'
py27 create: /home/ksweeney/workspace/pesos/.tox/py27
py27 installdeps: compactor[pb]==0.2.1, futures==2.1.6, mesos.interface==0.21.1, pytest, mock
py27 inst: /home/ksweeney/workspace/pesos/.tox/dist/pesos-0.2.0.zip
py27 runtests: PYTHONHASHSEED='2061337895'
py27 runtests: commands[0] | py.test tests
========================================================================= test session starts =========================================================================
platform linux2 -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4
collected 18 items
tests/test_detector.py ..
tests/test_executor.py FF..F.FF.F.F
tests/test_protobuf_passing.py .
tests/test_scheduler.py .
tests/test_util.py ..
============================================================================== FAILURES ===============================================================================
_______________________________________________________ TestExecutor.test_mesos_executor_abort_on_disconnection _______________________________________________________
args = (<test_executor.TestExecutor testMethod=test_mesos_executor_abort_on_disconnection>,), kw = {}
@wraps(f)
def _inner(*args, **kw):
self._patch_dict()
try:
> return f(*args, **kw)
.tox/py27/local/lib/python2.7/site-packages/mock.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_executor.py:108: in test_mesos_executor_abort_on_disconnection
assert driver.start() == mesos_pb2.DRIVER_RUNNING
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:279: in _wrapper
return method(self, *args, **kw)
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:314: in start
self.context.spawn(self.executor_process)
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:131: in spawn
process.initialize()
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:69: in initialize
self.link(self.slave)
.tox/py27/local/lib/python2.7/site-packages/compactor/process.py:114: in link
self._context.link(self.pid, to)
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:257: in link
self.maybe_connect(to, on_connect)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Context(Thread-2, started daemon 140633201178368)>, to_pid = PID(127.0.0.1, 45101, slave(1)), callback = <function null_wrapper at 0x7fe7bcb7faa0>
def maybe_connect(self, to_pid, callback=None):
"""Synchronously open a connection to to_pid or return a connection if it exists."""
callback = stack_context.wrap(callback or (lambda stream: None))
def streaming_callback(data):
# we are not guaranteed to get an acknowledgment, but log and discard bytes if we do.
log.info('Received %d bytes from %s, discarding.' % (len(data), to_pid))
log.debug(' data: %r' % (data,))
def on_connect(exit_cb, stream):
log.info('Connection to %s established' % to_pid)
self._connections[to_pid] = stream
callback(stream)
self.loop.add_callback(
stream.read_until_close,
exit_cb,
streaming_callback=streaming_callback)
stream = self._connections.get(to_pid)
if stream is not None:
callback(stream)
return
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
if not sock:
raise self.SocketError('Failed opening socket')
# Set the socket non-blocking
sock.setblocking(0)
stream = IOStream(sock, io_loop=self.loop)
stream.set_nodelay(True)
stream.set_close_callback(partial(self.__on_exit, to_pid, b'closed from maybe_connect'))
connect_callback = partial(on_connect, partial(self.__on_exit, to_pid), stream)
log.info('Establishing connection to %s' % to_pid)
stream.connect((to_pid.ip, to_pid.port), callback=connect_callback)
if stream.closed():
> raise self.SocketError('Failed to initiate stream connection')
E SocketError: Failed to initiate stream connection
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:195: SocketError
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:30.032 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:30.033 MainThread Mounting message handler /slave(1)/mesos.internal.StatusUpdateMessage
INFO:2015-03-23 11:29:30.033 MainThread Mounting message handler /slave(1)/mesos.internal.ExecutorToFrameworkMessage
INFO:2015-03-23 11:29:30.033 MainThread Mounting message handler /slave(1)/mesos.internal.RegisterExecutorMessage
INFO:2015-03-23 11:29:30.033 MainThread Mounting message handler /slave(1)/mesos.internal.ReregisterExecutorMessage
DEBUG:2015-03-23 11:29:30.035 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:30.036 MainThread MesosExecutorDriver.start called
INFO:2015-03-23 11:29:30.036 MainThread Establishing connection to slave(1)@127.0.0.1:45101
WARNING:2015-03-23 11:29:30.036 Thread-2 error on read
Traceback (most recent call last):
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 630, in _handle_read
pos = self._read_to_buffer_loop()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 600, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 712, in _read_to_buffer
chunk = self.read_from_fd()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 976, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 107] Transport endpoint is not connected
DEBUG:2015-03-23 11:29:30.037 MainThread Stopping context
INFO:2015-03-23 11:29:30.038 Thread-2 Disconnected from slave(1)@127.0.0.1:45101 (closed from maybe_connect)
INFO:2015-03-23 11:29:30.038 MainThread Terminating slave(1)@127.0.0.1:45101
ERROR:2015-03-23 11:29:30.038 Thread-2 Received disconnection from slave(1)@127.0.0.1:45101 but no stream found.
INFO:2015-03-23 11:29:30.038 MainThread Unmounting <pesos.testing.MockSlave object at 0x7fe7bcbe0750>
DEBUG:2015-03-23 11:29:30.038 MainThread Stopping context
____________________________________________________________ TestExecutor.test_mesos_executor_driver_abort ____________________________________________________________
args = (<test_executor.TestExecutor testMethod=test_mesos_executor_driver_abort>,), kw = {}
@wraps(f)
def _inner(*args, **kw):
self._patch_dict()
try:
> return f(*args, **kw)
.tox/py27/local/lib/python2.7/site-packages/mock.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_executor.py:270: in test_mesos_executor_driver_abort
assert driver.start() == mesos_pb2.DRIVER_RUNNING
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:279: in _wrapper
return method(self, *args, **kw)
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:314: in start
self.context.spawn(self.executor_process)
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:131: in spawn
process.initialize()
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:69: in initialize
self.link(self.slave)
.tox/py27/local/lib/python2.7/site-packages/compactor/process.py:114: in link
self._context.link(self.pid, to)
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:257: in link
self.maybe_connect(to, on_connect)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Context(Thread-3, stopped daemon 140633280038656)>, to_pid = PID(127.0.0.1, 47582, slave(3)), callback = <function null_wrapper at 0x7fe7bc2c1ed8>
def maybe_connect(self, to_pid, callback=None):
"""Synchronously open a connection to to_pid or return a connection if it exists."""
callback = stack_context.wrap(callback or (lambda stream: None))
def streaming_callback(data):
# we are not guaranteed to get an acknowledgment, but log and discard bytes if we do.
log.info('Received %d bytes from %s, discarding.' % (len(data), to_pid))
log.debug(' data: %r' % (data,))
def on_connect(exit_cb, stream):
log.info('Connection to %s established' % to_pid)
self._connections[to_pid] = stream
callback(stream)
self.loop.add_callback(
stream.read_until_close,
exit_cb,
streaming_callback=streaming_callback)
stream = self._connections.get(to_pid)
if stream is not None:
callback(stream)
return
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
if not sock:
raise self.SocketError('Failed opening socket')
# Set the socket non-blocking
sock.setblocking(0)
stream = IOStream(sock, io_loop=self.loop)
stream.set_nodelay(True)
stream.set_close_callback(partial(self.__on_exit, to_pid, b'closed from maybe_connect'))
connect_callback = partial(on_connect, partial(self.__on_exit, to_pid), stream)
log.info('Establishing connection to %s' % to_pid)
stream.connect((to_pid.ip, to_pid.port), callback=connect_callback)
if stream.closed():
> raise self.SocketError('Failed to initiate stream connection')
E SocketError: Failed to initiate stream connection
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:195: SocketError
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:30.090 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:30.091 MainThread Mounting message handler /slave(3)/mesos.internal.StatusUpdateMessage
INFO:2015-03-23 11:29:30.091 MainThread Mounting message handler /slave(3)/mesos.internal.ExecutorToFrameworkMessage
INFO:2015-03-23 11:29:30.091 MainThread Mounting message handler /slave(3)/mesos.internal.RegisterExecutorMessage
INFO:2015-03-23 11:29:30.091 MainThread Mounting message handler /slave(3)/mesos.internal.ReregisterExecutorMessage
INFO:2015-03-23 11:29:30.092 MainThread MesosExecutorDriver.start called
INFO:2015-03-23 11:29:30.092 MainThread Establishing connection to slave(3)@127.0.0.1:47582
WARNING:2015-03-23 11:29:30.092 Thread-3 error on read
Traceback (most recent call last):
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 630, in _handle_read
pos = self._read_to_buffer_loop()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 600, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 712, in _read_to_buffer
chunk = self.read_from_fd()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 976, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 107] Transport endpoint is not connected
DEBUG:2015-03-23 11:29:30.092 MainThread Stopping context
INFO:2015-03-23 11:29:30.092 Thread-3 Disconnected from slave(3)@127.0.0.1:47582 (closed from maybe_connect)
INFO:2015-03-23 11:29:30.093 MainThread Terminating slave(3)@127.0.0.1:47582
ERROR:2015-03-23 11:29:30.093 Thread-3 Received disconnection from slave(3)@127.0.0.1:47582 but no stream found.
INFO:2015-03-23 11:29:30.093 MainThread Unmounting <pesos.testing.MockSlave object at 0x7fe7bc0da950>
________________________________________________________ TestExecutor.test_mesos_executor_driver_run_and_abort ________________________________________________________
args = (<test_executor.TestExecutor testMethod=test_mesos_executor_driver_run_and_abort>,), kw = {}
@wraps(f)
def _inner(*args, **kw):
self._patch_dict()
try:
> return f(*args, **kw)
.tox/py27/local/lib/python2.7/site-packages/mock.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <test_executor.TestExecutor testMethod=test_mesos_executor_driver_run_and_abort>
def test_mesos_executor_driver_run_and_abort(self):
os.environ['MESOS_SLAVE_PID'] = str(self.slave.pid)
executor = Executor()
driver = PesosExecutorDriver(executor, context=self.context)
join_event = threading.Event()
def runner():
assert driver.run() == mesos_pb2.DRIVER_ABORTED
join_event.set()
threading.Thread(target=runner).start()
assert not join_event.is_set()
driver.started.wait(timeout=10)
> assert driver.started.is_set()
E AssertionError: assert <bound method _Event.isSet of <threading._Event object at 0x7fe7bc20f9d0>>()
E + where <bound method _Event.isSet of <threading._Event object at 0x7fe7bc20f9d0>> = <threading._Event object at 0x7fe7bc20f9d0>.is_set
E + where <threading._Event object at 0x7fe7bc20f9d0> = <pesos.executor.PesosExecutorDriver object at 0x7fe7bc20fed0>.started
tests/test_executor.py:289: AssertionError
------------------------------------------------------------------------ Captured stderr setup ------------------------------------------------------------------------
INFO:2015-03-23 11:29:30.138 Thread-5 Disconnected from slave(7)@127.0.0.1:35892 ()
ERROR:2015-03-23 11:29:30.138 Thread-5 Received disconnection from slave(7)@127.0.0.1:35892 but no stream found.
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:30.139 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:30.139 MainThread Mounting message handler /slave(9)/mesos.internal.StatusUpdateMessage
INFO:2015-03-23 11:29:30.140 MainThread Mounting message handler /slave(9)/mesos.internal.ExecutorToFrameworkMessage
INFO:2015-03-23 11:29:30.140 MainThread Mounting message handler /slave(9)/mesos.internal.RegisterExecutorMessage
INFO:2015-03-23 11:29:30.140 MainThread Mounting message handler /slave(9)/mesos.internal.ReregisterExecutorMessage
INFO:2015-03-23 11:29:30.140 Thread-7 MesosExecutorDriver.start called
INFO:2015-03-23 11:29:30.140 Thread-7 Establishing connection to slave(9)@127.0.0.1:43298
WARNING:2015-03-23 11:29:30.141 Thread-6 error on read
Traceback (most recent call last):
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 630, in _handle_read
pos = self._read_to_buffer_loop()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 600, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 712, in _read_to_buffer
chunk = self.read_from_fd()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 976, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 107] Transport endpoint is not connected
INFO:2015-03-23 11:29:30.141 Thread-6 Disconnected from slave(9)@127.0.0.1:43298 (closed from maybe_connect)
ERROR:2015-03-23 11:29:30.141 Thread-6 Received disconnection from slave(9)@127.0.0.1:43298 but no stream found.
Exception in thread Thread-7:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/ksweeney/workspace/pesos/tests/test_executor.py", line 283, in runner
assert driver.run() == mesos_pb2.DRIVER_ABORTED
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py", line 279, in _wrapper
return method(self, *args, **kw)
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py", line 358, in run
self.status = self.start()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py", line 279, in _wrapper
return method(self, *args, **kw)
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py", line 314, in start
self.context.spawn(self.executor_process)
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/compactor/context.py", line 131, in spawn
process.initialize()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py", line 69, in initialize
self.link(self.slave)
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/compactor/process.py", line 114, in link
self._context.link(self.pid, to)
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/compactor/context.py", line 257, in link
self.maybe_connect(to, on_connect)
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/compactor/context.py", line 195, in maybe_connect
raise self.SocketError('Failed to initiate stream connection')
SocketError: Failed to initiate stream connection
DEBUG:2015-03-23 11:29:40.141 MainThread Stopping context
INFO:2015-03-23 11:29:40.141 MainThread Terminating slave(9)@127.0.0.1:43298
INFO:2015-03-23 11:29:40.141 MainThread Unmounting <pesos.testing.MockSlave object at 0x7fe7bc181a90>
_____________________________________________________ TestExecutor.test_mesos_executor_framework_message_delivery _____________________________________________________
args = (<test_executor.TestExecutor testMethod=test_mesos_executor_framework_message_delivery>,), kw = {}
@wraps(f)
def _inner(*args, **kw):
self._patch_dict()
try:
> return f(*args, **kw)
.tox/py27/local/lib/python2.7/site-packages/mock.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_executor.py:222: in test_mesos_executor_framework_message_delivery
assert driver.start() == mesos_pb2.DRIVER_RUNNING
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:279: in _wrapper
return method(self, *args, **kw)
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:314: in start
self.context.spawn(self.executor_process)
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:131: in spawn
process.initialize()
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:69: in initialize
self.link(self.slave)
.tox/py27/local/lib/python2.7/site-packages/compactor/process.py:114: in link
self._context.link(self.pid, to)
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:257: in link
self.maybe_connect(to, on_connect)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Context(Thread-9, stopped daemon 140633191212800)>, to_pid = PID(127.0.0.1, 54792, slave(13)), callback = <function null_wrapper at 0x7fe7b76f6ed8>
def maybe_connect(self, to_pid, callback=None):
"""Synchronously open a connection to to_pid or return a connection if it exists."""
callback = stack_context.wrap(callback or (lambda stream: None))
def streaming_callback(data):
# we are not guaranteed to get an acknowledgment, but log and discard bytes if we do.
log.info('Received %d bytes from %s, discarding.' % (len(data), to_pid))
log.debug(' data: %r' % (data,))
def on_connect(exit_cb, stream):
log.info('Connection to %s established' % to_pid)
self._connections[to_pid] = stream
callback(stream)
self.loop.add_callback(
stream.read_until_close,
exit_cb,
streaming_callback=streaming_callback)
stream = self._connections.get(to_pid)
if stream is not None:
callback(stream)
return
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
if not sock:
raise self.SocketError('Failed opening socket')
# Set the socket non-blocking
sock.setblocking(0)
stream = IOStream(sock, io_loop=self.loop)
stream.set_nodelay(True)
stream.set_close_callback(partial(self.__on_exit, to_pid, b'closed from maybe_connect'))
connect_callback = partial(on_connect, partial(self.__on_exit, to_pid), stream)
log.info('Establishing connection to %s' % to_pid)
stream.connect((to_pid.ip, to_pid.port), callback=connect_callback)
if stream.closed():
> raise self.SocketError('Failed to initiate stream connection')
E SocketError: Failed to initiate stream connection
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:195: SocketError
------------------------------------------------------------------------ Captured stderr setup ------------------------------------------------------------------------
INFO:2015-03-23 11:29:40.166 Thread-8 Disconnected from slave(11)@127.0.0.1:56672 ()
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:40.167 Thread-8 No link from executor(12)@127.0.0.1:56672:slave(11)@127.0.0.1:56672
DEBUG:2015-03-23 11:29:40.167 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:40.168 MainThread Mounting message handler /slave(13)/mesos.internal.StatusUpdateMessage
INFO:2015-03-23 11:29:40.168 MainThread Mounting message handler /slave(13)/mesos.internal.ExecutorToFrameworkMessage
INFO:2015-03-23 11:29:40.168 MainThread Mounting message handler /slave(13)/mesos.internal.RegisterExecutorMessage
INFO:2015-03-23 11:29:40.168 MainThread Mounting message handler /slave(13)/mesos.internal.ReregisterExecutorMessage
INFO:2015-03-23 11:29:40.170 MainThread MesosExecutorDriver.start called
INFO:2015-03-23 11:29:40.171 MainThread Establishing connection to slave(13)@127.0.0.1:54792
WARNING:2015-03-23 11:29:40.171 Thread-9 error on read
Traceback (most recent call last):
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 630, in _handle_read
pos = self._read_to_buffer_loop()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 600, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 712, in _read_to_buffer
chunk = self.read_from_fd()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 976, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 107] Transport endpoint is not connected
DEBUG:2015-03-23 11:29:40.171 MainThread Stopping context
INFO:2015-03-23 11:29:40.172 Thread-9 Disconnected from slave(13)@127.0.0.1:54792 (closed from maybe_connect)
INFO:2015-03-23 11:29:40.172 MainThread Terminating slave(13)@127.0.0.1:54792
ERROR:2015-03-23 11:29:40.172 Thread-9 Received disconnection from slave(13)@127.0.0.1:54792 but no stream found.
INFO:2015-03-23 11:29:40.172 MainThread Unmounting <pesos.testing.MockSlave object at 0x7fe7b76eca50>
_____________________________________________________________ TestExecutor.test_mesos_executor_kill_task ______________________________________________________________
args = (<test_executor.TestExecutor testMethod=test_mesos_executor_kill_task>,), kw = {}
@wraps(f)
def _inner(*args, **kw):
self._patch_dict()
try:
> return f(*args, **kw)
.tox/py27/local/lib/python2.7/site-packages/mock.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_executor.py:197: in test_mesos_executor_kill_task
assert driver.start() == mesos_pb2.DRIVER_RUNNING
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:279: in _wrapper
return method(self, *args, **kw)
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:314: in start
self.context.spawn(self.executor_process)
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:131: in spawn
process.initialize()
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:69: in initialize
self.link(self.slave)
.tox/py27/local/lib/python2.7/site-packages/compactor/process.py:114: in link
self._context.link(self.pid, to)
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:257: in link
self.maybe_connect(to, on_connect)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Context(Thread-10, stopped daemon 140633191212800)>, to_pid = PID(127.0.0.1, 34339, slave(15)), callback = <function null_wrapper at 0x7fe7bcbf4320>
def maybe_connect(self, to_pid, callback=None):
"""Synchronously open a connection to to_pid or return a connection if it exists."""
callback = stack_context.wrap(callback or (lambda stream: None))
def streaming_callback(data):
# we are not guaranteed to get an acknowledgment, but log and discard bytes if we do.
log.info('Received %d bytes from %s, discarding.' % (len(data), to_pid))
log.debug(' data: %r' % (data,))
def on_connect(exit_cb, stream):
log.info('Connection to %s established' % to_pid)
self._connections[to_pid] = stream
callback(stream)
self.loop.add_callback(
stream.read_until_close,
exit_cb,
streaming_callback=streaming_callback)
stream = self._connections.get(to_pid)
if stream is not None:
callback(stream)
return
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
if not sock:
raise self.SocketError('Failed opening socket')
# Set the socket non-blocking
sock.setblocking(0)
stream = IOStream(sock, io_loop=self.loop)
stream.set_nodelay(True)
stream.set_close_callback(partial(self.__on_exit, to_pid, b'closed from maybe_connect'))
connect_callback = partial(on_connect, partial(self.__on_exit, to_pid), stream)
log.info('Establishing connection to %s' % to_pid)
stream.connect((to_pid.ip, to_pid.port), callback=connect_callback)
if stream.closed():
> raise self.SocketError('Failed to initiate stream connection')
E SocketError: Failed to initiate stream connection
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:195: SocketError
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:40.214 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:40.215 MainThread Mounting message handler /slave(15)/mesos.internal.StatusUpdateMessage
INFO:2015-03-23 11:29:40.215 MainThread Mounting message handler /slave(15)/mesos.internal.ExecutorToFrameworkMessage
INFO:2015-03-23 11:29:40.215 MainThread Mounting message handler /slave(15)/mesos.internal.RegisterExecutorMessage
INFO:2015-03-23 11:29:40.215 MainThread Mounting message handler /slave(15)/mesos.internal.ReregisterExecutorMessage
INFO:2015-03-23 11:29:40.217 MainThread MesosExecutorDriver.start called
INFO:2015-03-23 11:29:40.218 MainThread Establishing connection to slave(15)@127.0.0.1:34339
WARNING:2015-03-23 11:29:40.218 Thread-10 error on read
Traceback (most recent call last):
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 630, in _handle_read
pos = self._read_to_buffer_loop()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 600, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 712, in _read_to_buffer
chunk = self.read_from_fd()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 976, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 107] Transport endpoint is not connected
DEBUG:2015-03-23 11:29:40.218 MainThread Stopping context
INFO:2015-03-23 11:29:40.218 Thread-10 Disconnected from slave(15)@127.0.0.1:34339 (closed from maybe_connect)
INFO:2015-03-23 11:29:40.218 MainThread Terminating slave(15)@127.0.0.1:34339
ERROR:2015-03-23 11:29:40.219 Thread-10 Received disconnection from slave(15)@127.0.0.1:34339 but no stream found.
INFO:2015-03-23 11:29:40.219 MainThread Unmounting <pesos.testing.MockSlave object at 0x7fe7bf246bd0>
_____________________________________________________________ TestExecutor.test_mesos_executor_reregister _____________________________________________________________
args = (<test_executor.TestExecutor testMethod=test_mesos_executor_reregister>,), kw = {}
@wraps(f)
def _inner(*args, **kw):
self._patch_dict()
try:
> return f(*args, **kw)
.tox/py27/local/lib/python2.7/site-packages/mock.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_executor.py:136: in test_mesos_executor_reregister
assert driver.start() == mesos_pb2.DRIVER_RUNNING
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:279: in _wrapper
return method(self, *args, **kw)
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:314: in start
self.context.spawn(self.executor_process)
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:131: in spawn
process.initialize()
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:69: in initialize
self.link(self.slave)
.tox/py27/local/lib/python2.7/site-packages/compactor/process.py:114: in link
self._context.link(self.pid, to)
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:257: in link
self.maybe_connect(to, on_connect)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Context(Thread-13, started daemon 140633182033664)>, to_pid = PID(127.0.0.1, 58472, slave(19)), callback = <function null_wrapper at 0x7fe7bc0d7050>
def maybe_connect(self, to_pid, callback=None):
"""Synchronously open a connection to to_pid or return a connection if it exists."""
callback = stack_context.wrap(callback or (lambda stream: None))
def streaming_callback(data):
# we are not guaranteed to get an acknowledgment, but log and discard bytes if we do.
log.info('Received %d bytes from %s, discarding.' % (len(data), to_pid))
log.debug(' data: %r' % (data,))
def on_connect(exit_cb, stream):
log.info('Connection to %s established' % to_pid)
self._connections[to_pid] = stream
callback(stream)
self.loop.add_callback(
stream.read_until_close,
exit_cb,
streaming_callback=streaming_callback)
stream = self._connections.get(to_pid)
if stream is not None:
callback(stream)
return
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
if not sock:
raise self.SocketError('Failed opening socket')
# Set the socket non-blocking
sock.setblocking(0)
stream = IOStream(sock, io_loop=self.loop)
stream.set_nodelay(True)
stream.set_close_callback(partial(self.__on_exit, to_pid, b'closed from maybe_connect'))
connect_callback = partial(on_connect, partial(self.__on_exit, to_pid), stream)
log.info('Establishing connection to %s' % to_pid)
stream.connect((to_pid.ip, to_pid.port), callback=connect_callback)
if stream.closed():
> raise self.SocketError('Failed to initiate stream connection')
E SocketError: Failed to initiate stream connection
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:195: SocketError
------------------------------------------------------------------------ Captured stderr setup ------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:40.256 Thread-11 No link from executor(18)@127.0.0.1:37319:executor(18)@127.0.0.1:37319
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:40.257 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:40.258 MainThread Mounting message handler /slave(19)/mesos.internal.StatusUpdateMessage
INFO:2015-03-23 11:29:40.258 MainThread Mounting message handler /slave(19)/mesos.internal.ExecutorToFrameworkMessage
INFO:2015-03-23 11:29:40.258 MainThread Mounting message handler /slave(19)/mesos.internal.RegisterExecutorMessage
INFO:2015-03-23 11:29:40.258 MainThread Mounting message handler /slave(19)/mesos.internal.ReregisterExecutorMessage
DEBUG:2015-03-23 11:29:40.260 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:40.261 MainThread MesosExecutorDriver.start called
INFO:2015-03-23 11:29:40.261 MainThread Establishing connection to slave(19)@127.0.0.1:58472
WARNING:2015-03-23 11:29:40.261 Thread-13 error on read
Traceback (most recent call last):
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 630, in _handle_read
pos = self._read_to_buffer_loop()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 600, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 712, in _read_to_buffer
chunk = self.read_from_fd()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 976, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 107] Transport endpoint is not connected
DEBUG:2015-03-23 11:29:40.262 MainThread Stopping context
INFO:2015-03-23 11:29:40.262 Thread-13 Disconnected from slave(19)@127.0.0.1:58472 (closed from maybe_connect)
INFO:2015-03-23 11:29:40.262 MainThread Terminating slave(19)@127.0.0.1:58472
ERROR:2015-03-23 11:29:40.262 Thread-13 Received disconnection from slave(19)@127.0.0.1:58472 but no stream found.
INFO:2015-03-23 11:29:40.262 MainThread Unmounting <pesos.testing.MockSlave object at 0x7fe7bc0b7350>
DEBUG:2015-03-23 11:29:40.263 MainThread Stopping context
______________________________________________________________ TestExecutor.test_mesos_executor_shutdown ______________________________________________________________
args = (<test_executor.TestExecutor testMethod=test_mesos_executor_shutdown>,), kw = {}
@wraps(f)
def _inner(*args, **kw):
self._patch_dict()
try:
> return f(*args, **kw)
.tox/py27/local/lib/python2.7/site-packages/mock.py:1618:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/test_executor.py:245: in test_mesos_executor_shutdown
assert driver.start() == mesos_pb2.DRIVER_RUNNING
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:279: in _wrapper
return method(self, *args, **kw)
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:314: in start
self.context.spawn(self.executor_process)
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:131: in spawn
process.initialize()
.tox/py27/local/lib/python2.7/site-packages/pesos/executor.py:69: in initialize
self.link(self.slave)
.tox/py27/local/lib/python2.7/site-packages/compactor/process.py:114: in link
self._context.link(self.pid, to)
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:257: in link
self.maybe_connect(to, on_connect)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Context(Thread-15, stopped daemon 140633173378816)>, to_pid = PID(127.0.0.1, 36431, slave(23)), callback = <function null_wrapper at 0x7fe7bc14d398>
def maybe_connect(self, to_pid, callback=None):
"""Synchronously open a connection to to_pid or return a connection if it exists."""
callback = stack_context.wrap(callback or (lambda stream: None))
def streaming_callback(data):
# we are not guaranteed to get an acknowledgment, but log and discard bytes if we do.
log.info('Received %d bytes from %s, discarding.' % (len(data), to_pid))
log.debug(' data: %r' % (data,))
def on_connect(exit_cb, stream):
log.info('Connection to %s established' % to_pid)
self._connections[to_pid] = stream
callback(stream)
self.loop.add_callback(
stream.read_until_close,
exit_cb,
streaming_callback=streaming_callback)
stream = self._connections.get(to_pid)
if stream is not None:
callback(stream)
return
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)
if not sock:
raise self.SocketError('Failed opening socket')
# Set the socket non-blocking
sock.setblocking(0)
stream = IOStream(sock, io_loop=self.loop)
stream.set_nodelay(True)
stream.set_close_callback(partial(self.__on_exit, to_pid, b'closed from maybe_connect'))
connect_callback = partial(on_connect, partial(self.__on_exit, to_pid), stream)
log.info('Establishing connection to %s' % to_pid)
stream.connect((to_pid.ip, to_pid.port), callback=connect_callback)
if stream.closed():
> raise self.SocketError('Failed to initiate stream connection')
E SocketError: Failed to initiate stream connection
.tox/py27/local/lib/python2.7/site-packages/compactor/context.py:195: SocketError
------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------
DEBUG:2015-03-23 11:29:40.301 MainThread Using selector: EpollSelector
INFO:2015-03-23 11:29:40.302 MainThread Mounting message handler /slave(23)/mesos.internal.StatusUpdateMessage
INFO:2015-03-23 11:29:40.302 MainThread Mounting message handler /slave(23)/mesos.internal.ExecutorToFrameworkMessage
INFO:2015-03-23 11:29:40.302 MainThread Mounting message handler /slave(23)/mesos.internal.RegisterExecutorMessage
INFO:2015-03-23 11:29:40.302 MainThread Mounting message handler /slave(23)/mesos.internal.ReregisterExecutorMessage
INFO:2015-03-23 11:29:40.304 MainThread MesosExecutorDriver.start called
INFO:2015-03-23 11:29:40.305 MainThread Establishing connection to slave(23)@127.0.0.1:36431
WARNING:2015-03-23 11:29:40.305 Thread-15 error on read
Traceback (most recent call last):
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 630, in _handle_read
pos = self._read_to_buffer_loop()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 600, in _read_to_buffer_loop
if self._read_to_buffer() == 0:
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 712, in _read_to_buffer
chunk = self.read_from_fd()
File "/home/ksweeney/workspace/pesos/.tox/py27/local/lib/python2.7/site-packages/tornado/iostream.py", line 976, in read_from_fd
chunk = self.socket.recv(self.read_chunk_size)
error: [Errno 107] Transport endpoint is not connected
DEBUG:2015-03-23 11:29:40.305 MainThread Stopping context
INFO:2015-03-23 11:29:40.305 Thread-15 Disconnected from slave(23)@127.0.0.1:36431 (closed from maybe_connect)
INFO:2015-03-23 11:29:40.305 MainThread Terminating slave(23)@127.0.0.1:36431
ERROR:2015-03-23 11:29:40.305 Thread-15 Received disconnection from slave(23)@127.0.0.1:36431 but no stream found.
INFO:2015-03-23 11:29:40.305 MainThread Unmounting <pesos.testing.MockSlave object at 0x7fe7bc14b350>
================================================================ 7 failed, 11 passed in 10.45 seconds =================================================================
ERROR: InvocationError: '/home/ksweeney/workspace/pesos/.tox/py27/bin/py.test tests'
pypy create: /home/ksweeney/workspace/pesos/.tox/pypy
ERROR: InterpreterNotFound: pypy
_______________________________________________________________________________ summary _______________________________________________________________________________
ERROR: py26: commands failed
ERROR: py27: commands failed
SKIPPED: pypy: InterpreterNotFound: pypy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment