threefoldtecharchive / jumpscale9_core

Apache License 2.0
0 stars 2 forks source link

jumpscale config returns an error with gevent #145

Closed 0xIslamTaha closed 5 years ago

0xIslamTaha commented 5 years ago
root@js:~/minio/test/failures_testsuite# nosetests -v -s testcases/s3_redundant/test04_minio_active_passive.py 
Traceback (most recent call last):
  File "src/gevent/greenlet.py", line 716, in gevent._greenlet.Greenlet.run
  File "/root/minio/test/failures_testsuite/utils/failures.py", line 29, in do
    robot = j.clients.zrobot.robots[namespace['node']]
  File "/opt/code/github/threefoldtech/0-robot/JumpscaleZrobot/clients/zerorobot/ZeroRobotFactory.py", line 58, in __getitem__
    return self.get(key)
  File "/opt/code/github/threefoldtech/0-robot/JumpscaleZrobot/clients/zerorobot/ZeroRobotFactory.py", line 82, in get
    return ZeroRobotManager(key)
  File "/opt/code/github/threefoldtech/0-robot/zerorobot/dsl/ZeroRobotManager.py", line 255, in __init__
    self._client = j.clients.zrobot.get(instance)
  File "/opt/code/github/threefoldtech/jumpscale_core/Jumpscale/tools/configmanager/JSBaseClassConfigs.py", line 43, in get
    return self._child_class(instance=instance, data=data, parent=self, interactive=interactive,**kwargs)
  File "/opt/code/github/threefoldtech/0-robot/JumpscaleZrobot/clients/zerorobot/ZeroRobotClient.py", line 27, in __init__
    super().__init__(instance=instance, data=data, parent=parent, template=_template, ui=ui, interactive=interactive)
  File "/opt/code/github/threefoldtech/jumpscale_core/Jumpscale/tools/configmanager/JSBaseClassConfig.py", line 28, in __init__
    self, instance=self._instance, data=data, template=self._template, ui=self._ui)
  File "/opt/code/github/threefoldtech/jumpscale_core/Jumpscale/tools/configmanager/FileConfigManager.py", line 132, in _get_for_obj
    sc = FileConfig(instance=instance, location=location, template=template, data=data)
  File "/opt/code/github/threefoldtech/jumpscale_core/Jumpscale/tools/configmanager/FileConfig.py", line 36, in __init__
    dataOnFS = self.data  # now decrypt
  File "/opt/code/github/threefoldtech/jumpscale_core/Jumpscale/tools/configmanager/FileConfig.py", line 161, in data
    res[key] = self.nacl.decryptSymmetric(item, hex=True).decode()
  File "/opt/code/github/threefoldtech/jumpscale_core/Jumpscale/tools/configmanager/FileConfig.py", line 73, in nacl
    self._nacl = j.data.nacl.get(sshkeyname=j.tools.configmanager.keyname)
  File "/opt/code/github/threefoldtech/jumpscale_core/Jumpscale/data/nacl/NACLFactory.py", line 25, in get
    return NACL(name, secret, sshkeyname=j.tools.configmanager.keyname)
  File "/opt/code/github/threefoldtech/jumpscale_core/Jumpscale/data/nacl/NACL.py", line 58, in __init__
    self.sign_with_ssh_key(secretseed + secret))
  File "/opt/code/github/threefoldtech/jumpscale_core/Jumpscale/data/nacl/NACL.py", line 255, in sign_with_ssh_key
    signeddata = j.data.nacl.agent.sign_ssh_data(hash)
  File "/usr/local/lib/python3.6/dist-packages/paramiko/agent.py", line 416, in sign_ssh_data
    ptype, result = self.agent._send_message(msg)
  File "/usr/local/lib/python3.6/dist-packages/paramiko/agent.py", line 83, in _send_message
    l = self._read_all(4)
  File "/usr/local/lib/python3.6/dist-packages/paramiko/agent.py", line 88, in _read_all
    result = self._conn.recv(wanted)
  File "/usr/local/lib/python3.6/dist-packages/gevent/_socket3.py", line 382, in recv
    self._wait(self._read_event)
  File "src/gevent/_hub_primitives.py", line 265, in gevent.__hub_primitives.wait_on_socket
  File "src/gevent/_hub_primitives.py", line 266, in gevent.__hub_primitives.wait_on_socket
  File "src/gevent/_hub_primitives.py", line 245, in gevent.__hub_primitives._primitive_wait
gevent.exceptions.ConcurrentObjectUseError: This socket is already used by another greenlet: <bound method Waiter.switch of <gevent.__waiter.Waiter object at 0x7f9385c575e8>>
2018-11-08T09:34:10Z <Greenlet "Greenlet-0" at 0x7f9385eff348: do({'name': '36c6fa12-141f-4bb6-a5f3-b42e9cf05470', ')> failed with ConcurrentObjectUseError

Branch development

zaibon commented 5 years ago

I've found a way to reproduce the problem. Will see how I can solve it