<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>I run Stein Devstack in a virtual machine. Occasionally,
      openstack client commands take minutes to complete, which didn't
      happen at earlier releases, and which is rather annoying. The
      delay seems to take place at an early stage: Even when I forget to
      set the OS_* environment, it takes minutes until I am told that
      the request requires authentication.<br>
    </p>
    <p>Interrupting the command, the stack trace confirms this (as a
      side remark, it also takes a long while until my ^C is processed):</p>
    <p><font size="-1"><tt>Traceback (most recent call last):</tt><tt><br>
        </tt><tt>  File "/usr/local/bin/openstack", line 7, in
          <module></tt><tt><br>
        </tt><tt>    from openstackclient.shell import main</tt><tt><br>
        </tt><tt>  File
          "/usr/local/lib/python2.7/dist-packages/openstackclient/shell.py",
          line 22, in <module></tt><tt><br>
        </tt><tt>    from osc_lib.api import auth</tt><tt><br>
        </tt><tt>  File
          "/usr/local/lib/python2.7/dist-packages/osc_lib/api/auth.py",
          line 19, in <module></tt><tt><br>
        </tt><tt>    from keystoneauth1.loading import base</tt><tt><br>
        </tt><tt>  File
"/usr/local/lib/python2.7/dist-packages/keystoneauth1/loading/__init__.py",
          line 13, in <module></tt><tt><br>
        </tt><tt>    from keystoneauth1.loading import adapter</tt><tt><br>
        </tt><tt>  File
"/usr/local/lib/python2.7/dist-packages/keystoneauth1/loading/adapter.py",
          line 13, in <module></tt><tt><br>
        </tt><tt>    from keystoneauth1 import adapter</tt><tt><br>
        </tt><tt>  File
          "/usr/local/lib/python2.7/dist-packages/keystoneauth1/adapter.py",
          line 17, in <module></tt><tt><br>
        </tt><tt>    from keystoneauth1 import session</tt><tt><br>
        </tt><tt>  File
          "/usr/local/lib/python2.7/dist-packages/keystoneauth1/session.py",
          line 25, in <module></tt><tt><br>
        </tt><tt>    import requests</tt><tt><br>
        </tt><tt>  File
          "/usr/local/lib/python2.7/dist-packages/requests/__init__.py",
          line 95, in <module></tt><tt><br>
        </tt><tt>    from urllib3.contrib import pyopenssl</tt><tt><br>
        </tt><tt>  File
          "/usr/local/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py",
          line 48, in <module></tt><tt><br>
        </tt><tt>    from cryptography.hazmat.backends.openssl import
          backend as openssl_backend</tt><tt><br>
        </tt><tt>  File
"/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/backends/openssl/__init__.py",
          line 7, in <module></tt><tt><br>
        </tt><tt>    from cryptography.hazmat.backends.openssl.backend
          import backend</tt><tt><br>
        </tt><tt>  File
"/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/backends/openssl/backend.py",
          line 2419, in <module></tt><tt><br>
        </tt><tt>    backend = Backend()</tt><tt><br>
        </tt><tt>  File
"/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/backends/openssl/backend.py",
          line 119, in __init__</tt><tt><br>
        </tt><tt>    self.activate_osrandom_engine()</tt><tt><br>
        </tt><tt>  File
"/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/backends/openssl/backend.py",
          line 163, in activate_osrandom_engine</tt><tt><br>
        </tt><tt>    with self._get_osurandom_engine() as e:</tt><tt><br>
        </tt><tt>  File "/usr/lib/python2.7/contextlib.py", line 17, in
          __enter__</tt><tt><br>
        </tt><tt>    return self.gen.next()</tt><tt><br>
        </tt><tt>  File
"/usr/local/lib/python2.7/dist-packages/cryptography/hazmat/backends/openssl/backend.py",
          line 146, in _get_osurandom_engine</tt><tt><br>
        </tt><tt>    res = self._lib.ENGINE_init(e)</tt><tt><br>
        </tt><tt>KeyboardInterrupt</tt></font><br>
    </p>
    <p>My wild speculation is that the delay has something to do with
      obtaining a random number, which can be a problem on virtual
      machines due to their lack of entropy. My knowledge in this area
      is paper-thin, though. And I wonder what happens to all the
      Devstacks used in CI?<br>
    </p>
    <p>Thus my questions: <b>Is the delay really caused by my running
        the cloud on a VM? What can I do to improve this?</b></p>
    <p>Thanks,</p>
    <p>Bernd<br>
    </p>
  </body>
</html>