Project

General

Profile

Actions

Bug #45031

open

Ansible installation required on teuthology.front.sepia.ceph.com

Added by Prasad Krishnan about 4 years ago. Updated about 4 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):

Description

I recently obtained access to the teuthology box but I'm unable to lock test machines and launch my tests.
Primarily it appears to be due to absence of requisite packages like teuthology and ansible.

Pasting the logs below for your reference.

macprasad ~/sepia Sat Apr 11 01:25 AM $ ssh -A prasad@teuthology.front.sepia.ceph.com
Last login: Fri Apr 10 19:50:07 2020 from 172.21.0.100
prasad@teuthology:~$
prasad@teuthology:~$ cd teuthology/
prasad@teuthology:~/teuthology$ source virtualenv/bin/activate
(virtualenv) prasad@teuthology:~/teuthology$
(virtualenv) prasad@teuthology:~/teuthology$ teuthology-lock --lock-many 1 --machine-type vps --os-type ubuntu --os-version 18.04
Traceback (most recent call last):
  File "/home/prasad/teuthology/virtualenv/bin/teuthology-lock", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/home/prasad/teuthology/virtualenv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2927, in <module>
    @_call_aside
  File "/home/prasad/teuthology/virtualenv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2913, in _call_aside
    f(*args, **kwargs)
  File "/home/prasad/teuthology/virtualenv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/home/prasad/teuthology/virtualenv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 635, in _build_master
    ws.require(__requires__)
  File "/home/prasad/teuthology/virtualenv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 943, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/home/prasad/teuthology/virtualenv/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 829, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'ansible>=2.0' distribution was not found and is required by teuthology
(virtualenv) prasad@teuthology:~/teuthology$
Actions #1

Updated by Nathan Cutler about 4 years ago

@Prasad Did you run "./bootstrap" and what was the output when you did?

https://docs.ceph.com/teuthology/docs/INSTALL.html

Actions #2

Updated by Nathan Cutler about 4 years ago

Another thing I noticed is:

--machine-type vps

I'm not 100% sure, but I think "vps" is deprecated and not expected to work.

Actions #3

Updated by Prasad Krishnan about 4 years ago

Digging further into the error message, I realised that I must have used /home/prasad/teuthology/virtualenv/bin/python2 instead of just doing a `python setup.py develop` while following instructions here: https://docs.ceph.com/teuthology/docs/INSTALL.html#other-operating-systems

That helped, meanwhile, I ran into another error as below (documenting so that someone else benefits from it) while running teuthology-lock

prasad@teuthology:~/teuthology$ teuthology-lock --lock-many 1 --machine-type vps --os-type ubuntu --os-version 18.04
Traceback (most recent call last):
  File "/home/prasad/.local/bin/teuthology-lock", line 5, in <module>
    from scripts.lock import main
  File "/home/prasad/.local/lib/python2.7/site-packages/scripts/lock.py", line 5, in <module>
    import teuthology.lock
  File "/home/prasad/.local/lib/python2.7/site-packages/teuthology/__init__.py", line 2, in <module>
    monkey.patch_all(dns=False)
  File "/home/prasad/.local/lib/python2.7/site-packages/gevent/monkey.py", line 197, in patch_all
    patch_socket(dns=dns, aggressive=aggressive)
  File "/home/prasad/.local/lib/python2.7/site-packages/gevent/monkey.py", line 119, in patch_socket
    from gevent import socket
  File "/home/prasad/.local/lib/python2.7/site-packages/gevent/socket.py", line 784, in <module>
    from gevent.ssl import sslwrap_simple as ssl, SSLError as sslerror, SSLSocket as SSLType
  File "/home/prasad/.local/lib/python2.7/site-packages/gevent/ssl.py", line 422, in <module>
    def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
NameError: name 'PROTOCOL_SSLv3' is not defined

This was solved by doing:

prasad@teuthology:~/teuthology$ python -m pip install -U gevent
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting gevent
  Downloading gevent-1.5.0-cp27-cp27mu-manylinux2010_x86_64.whl (4.6 MB)
     |████████████████████████████████| 4.6 MB 5.3 MB/s
Requirement already satisfied, skipping upgrade: greenlet>=0.4.14; platform_python_implementation == "CPython" in /home/prasad/.local/lib/python2.7/site-packages (from gevent) (0.4.15)
Installing collected packages: gevent
  Attempting uninstall: gevent
    Found existing installation: gevent 0.13.6
    Uninstalling gevent-0.13.6:
      Successfully uninstalled gevent-0.13.6
Successfully installed gevent-1.5.0
prasad@teuthology:~/teuthology$ teuthology-lock --lock-many 1 --machine-type vps --os-type ubuntu --os-version 18.04

Actions #4

Updated by Prasad Krishnan about 4 years ago

Nathan Cutler wrote:

Another thing I noticed is:

[...]

I'm not 100% sure, but I think "vps" is deprecated and not expected to work.

oops, is that the reason why I don't find any free machines?

prasad@teuthology:~/teuthology$ teuthology-lock --lock-many 1 --machine-type vps --os-type ubuntu --os-version 18.04
2020-04-13 17:50:16,371.371 ERROR:teuthology.lock:Insufficient nodes available to lock 1 vps nodes.
2020-04-13 17:50:16,371.371 ERROR:teuthology.lock:{"message": "only 0 nodes available"}
prasad@teuthology:~/teuthology$

What should I use instead?

I was merely following instructions from here: https://wiki.sepia.ceph.com/doku.php?id=testnodeaccess

Actions #5

Updated by Nathan Cutler about 4 years ago

@Prasad - I suggest that you raise your questions on the #sepia or #ceph-devel IRC channels, or on the mailing list.

See https://ceph.io/irc/

(Making this suggestion on the assumption that your immediate priority is to get timely answers to your questions and, in general, help with using Sepia....)

Actions

Also available in: Atom PDF