fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] Operation not permitted on self.poll.register (fabric via gun


From: Владимир Янченко
Subject: [Fab-user] Operation not permitted on self.poll.register (fabric via gunicorn)
Date: Thu, 17 Dec 2015 20:22:31 +0500

Hi!

I run fabric tasks throw other python tool, that works via gunicorn.

Usually my tasks work fine, but sometimes I get the strange error "Operation not permitted".
This error appears when fabric run the first "run" function.

What could this error mean? Gunicorn restart helps me for a while, but then the error returns.

I found only one mention of such problem in internet:
https://github.com/StackStorm/st2/issues/1792

Full stack:
  File "/home/administrator/webhandler/naupp_integration/utilities.py", line 329, in create
    network = network)
  File "/home/administrator/webhandler/others/fabfile.py", line 600, in create_stand
    run('rm -f /tmp/stands_ports_list.txt; echo $?',shell=True,pty=False)
  File "/usr/local/lib/python2.7/dist-packages/fabric/network.py", line 639, in host_prompting_wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/fabric/operations.py", line 1042, in run
    shell_escape=shell_escape)
  File "/usr/local/lib/python2.7/dist-packages/fabric/operations.py", line 911, in _run_command
    stderr=stderr, timeout=timeout)
  File "/usr/local/lib/python2.7/dist-packages/fabric/operations.py", line 795, in _execute
    worker.raise_if_needed()
  File "/usr/local/lib/python2.7/dist-packages/fabric/thread_handling.py", line 12, in wrapper
    callable(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/fabric/io.py", line 231, in input_loop
    r, w, x = select([sys.stdin], [], [], 0.0)
  File "/usr/local/lib/python2.7/dist-packages/eventlet/green/select.py", line 79, in select
    listeners.append(hub.add(hub.READ, k, on_read, on_error, lambda x: None))
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/epolls.py", line 53, in add
    self.register(fileno, new=True)
  File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/poll.py", line 45, in register
    self.poll.register(fileno, mask)
IOError: [Errno 1] Operation not permitted

My code:

utilities.py:

foo = load_source('fabfile', '../others/fabfile.py')
...
result = foo.create_stand(
    ...
)

fabfile.py:

from fabric.operations import run
from fabric.api import *

env.parallel=False
@serial
def create_stand(.... stand_host = '', stand_user = '',  ....)


    with settings(
        hide('warnings'),
        host_string=stand_host,
        user=stand_user,
        warn_only=True
     ):
        disconnect_all()
        run('rm -f /tmp/stands_ports_list.txt; echo $?',shell=True,pty=False)
        ...

--

Vladimir Yanchenko
Support engineer
Naumen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]