<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>After a little bit of self-education, I found that <tt>/proc/sys/kernel/random/entropy_avail
</tt>was below 100, which is probably a good explanation for my
problem. A good value would have four digits, it seems.<br>
</p>
<p>My Devstack host runs Ubuntu 18, and I am now trying the <tt>rngd-tools5</tt>
package to improve the entropy situation. Since this is a test
system, I am not so concerned about random number quality.<br>
</p>
<p>In short, the problem seems to be solved, but if anybody has
additional comments, I would be interested to hear them.</p>
<p>Bernd</p>
<div class="moz-cite-prefix">On 7/28/2019 1:06 PM, Bernd Bausch
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:9488d7de-83d4-c603-70c2-829002776f6a@gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<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>
</blockquote>
</body>
</html>