Remove eventlet_hub option
The option has a default value that is not portable, and therefore the test fails on OS like Darwin. There's actually no need to specify any hub – no other OpenStack projects as that option – as in theory Eventlet is smart enough to pick the best implementation available anyway. However, since Glance only works with poll or select as a hub, let's try them in that order. That avoids a user selecting things like 'epolls' and expecting Glance to work, whereas it would fail. Also remove a useless cleanup() call in the failing test as the start_servers() method already does a cleanup itself. Change-Id: Ia7765151ebb00cdf01e96cf39f3242899d358772
This commit is contained in:
parent
38dd10bb98
commit
9bb7ec57fb
@ -79,11 +79,6 @@ eventlet_opts = [
|
|||||||
help=_('The number of child process workers that will be '
|
help=_('The number of child process workers that will be '
|
||||||
'created to service requests. The default will be '
|
'created to service requests. The default will be '
|
||||||
'equal to the number of CPUs available.')),
|
'equal to the number of CPUs available.')),
|
||||||
cfg.StrOpt('eventlet_hub', default='poll',
|
|
||||||
help=_('Name of eventlet hub to use. Traditionally, we have '
|
|
||||||
'only supported \'poll\', however \'selects\' may be '
|
|
||||||
'appropriate for some platforms. See '
|
|
||||||
'http://eventlet.net/doc/hubs.html for more details.')),
|
|
||||||
cfg.IntOpt('max_header_line', default=16384,
|
cfg.IntOpt('max_header_line', default=16384,
|
||||||
help=_('Maximum line size of message headers to be accepted. '
|
help=_('Maximum line size of message headers to be accepted. '
|
||||||
'max_header_line may need to be increased when using '
|
'max_header_line may need to be increased when using '
|
||||||
@ -197,11 +192,15 @@ def get_socket(default_port):
|
|||||||
|
|
||||||
def set_eventlet_hub():
|
def set_eventlet_hub():
|
||||||
try:
|
try:
|
||||||
eventlet.hubs.use_hub(cfg.CONF.eventlet_hub)
|
eventlet.hubs.use_hub('poll')
|
||||||
except Exception:
|
except Exception:
|
||||||
msg = _("eventlet '%s' hub is not available on this platform")
|
try:
|
||||||
|
eventlet.hubs.use_hub('selects')
|
||||||
|
except Exception:
|
||||||
|
msg = _("eventlet 'poll' nor 'selects' hubs are available "
|
||||||
|
"on this platform")
|
||||||
raise exception.WorkerCreationFailure(
|
raise exception.WorkerCreationFailure(
|
||||||
reason=msg % cfg.CONF.eventlet_hub)
|
reason=msg)
|
||||||
|
|
||||||
|
|
||||||
class Server(object):
|
class Server(object):
|
||||||
|
@ -54,7 +54,6 @@ class TestMultiprocessing(functional.FunctionalTest):
|
|||||||
Ensure an interrupt signal does not cause a respawn storm.
|
Ensure an interrupt signal does not cause a respawn storm.
|
||||||
See bug #978130
|
See bug #978130
|
||||||
"""
|
"""
|
||||||
self.cleanup()
|
|
||||||
self.start_servers(**self.__dict__.copy())
|
self.start_servers(**self.__dict__.copy())
|
||||||
|
|
||||||
children = self._get_children()
|
children = self._get_children()
|
||||||
|
@ -102,7 +102,6 @@ class OptsTestCase(utils.BaseTestCase):
|
|||||||
'bind_host',
|
'bind_host',
|
||||||
'bind_port',
|
'bind_port',
|
||||||
'workers',
|
'workers',
|
||||||
'eventlet_hub',
|
|
||||||
'max_header_line',
|
'max_header_line',
|
||||||
'backlog',
|
'backlog',
|
||||||
'tcp_keepidle',
|
'tcp_keepidle',
|
||||||
@ -202,7 +201,6 @@ class OptsTestCase(utils.BaseTestCase):
|
|||||||
'cert_file',
|
'cert_file',
|
||||||
'key_file',
|
'key_file',
|
||||||
'workers',
|
'workers',
|
||||||
'eventlet_hub',
|
|
||||||
'max_header_line',
|
'max_header_line',
|
||||||
'flavor',
|
'flavor',
|
||||||
'config_file'
|
'config_file'
|
||||||
|
Loading…
Reference in New Issue
Block a user