Allow disabling ssl compression for glance client
Add a new parameter 'glance_api_ssl_compression' which allows disabling ssl layer compression negotiation for glance requests. This may improve data throughput, eg when high network bandwidth is available and you are using already compressed image formats such as qcow2 . Addresses bug 1189903. Change-Id: I180501cc25a1ea177d0d8c52a879682b8a3921c6
This commit is contained in:
parent
f34aef3a29
commit
c927949616
@ -121,7 +121,15 @@ global_opts = [
|
|||||||
cfg.BoolOpt('glance_api_insecure',
|
cfg.BoolOpt('glance_api_insecure',
|
||||||
default=False,
|
default=False,
|
||||||
help='Allow to perform insecure SSL (https) requests to '
|
help='Allow to perform insecure SSL (https) requests to '
|
||||||
'glance'),
|
'glance'),
|
||||||
|
cfg.BoolOpt('glance_api_ssl_compression',
|
||||||
|
default=False,
|
||||||
|
help='Whether to attempt to negotiate SSL layer compression '
|
||||||
|
'when using SSL (https) requests. Set to False to '
|
||||||
|
'disable SSL layer compression. In some cases disabling '
|
||||||
|
'this may improve data throughput, eg when high network '
|
||||||
|
'bandwidth is available and you are using already '
|
||||||
|
'compressed image formats such as qcow2 .'),
|
||||||
cfg.StrOpt('scheduler_topic',
|
cfg.StrOpt('scheduler_topic',
|
||||||
default='cinder-scheduler',
|
default='cinder-scheduler',
|
||||||
help='the topic scheduler nodes listen on'),
|
help='the topic scheduler nodes listen on'),
|
||||||
|
@ -60,12 +60,14 @@ def _create_glance_client(context, netloc, use_ssl,
|
|||||||
"""Instantiate a new glanceclient.Client object."""
|
"""Instantiate a new glanceclient.Client object."""
|
||||||
if version is None:
|
if version is None:
|
||||||
version = FLAGS.glance_api_version
|
version = FLAGS.glance_api_version
|
||||||
|
params = {}
|
||||||
if use_ssl:
|
if use_ssl:
|
||||||
scheme = 'https'
|
scheme = 'https'
|
||||||
|
# https specific params
|
||||||
|
params['insecure'] = FLAGS.glance_api_insecure
|
||||||
|
params['ssl_compression'] = FLAGS.glance_api_ssl_compression
|
||||||
else:
|
else:
|
||||||
scheme = 'http'
|
scheme = 'http'
|
||||||
params = {}
|
|
||||||
params['insecure'] = FLAGS.glance_api_insecure
|
|
||||||
if FLAGS.auth_strategy == 'keystone':
|
if FLAGS.auth_strategy == 'keystone':
|
||||||
params['token'] = context.auth_token
|
params['token'] = context.auth_token
|
||||||
endpoint = '%s://%s' % (scheme, netloc)
|
endpoint = '%s://%s' % (scheme, netloc)
|
||||||
|
@ -67,6 +67,14 @@
|
|||||||
# (boolean value)
|
# (boolean value)
|
||||||
#glance_api_insecure=false
|
#glance_api_insecure=false
|
||||||
|
|
||||||
|
# Whether to attempt to negotiate SSL layer compression
|
||||||
|
# when using SSL (https) requests. Set to False to
|
||||||
|
# disable SSL layer compression. In some cases disabling
|
||||||
|
# this may improve data throughput, eg when high network
|
||||||
|
# bandwidth is available and you are using already compressed
|
||||||
|
# image formats such as qcow2 .
|
||||||
|
#glance_api_ssl_compression=false
|
||||||
|
|
||||||
# the topic scheduler nodes listen on (string value)
|
# the topic scheduler nodes listen on (string value)
|
||||||
#scheduler_topic=cinder-scheduler
|
#scheduler_topic=cinder-scheduler
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user