cassandra contact_points bug
persister get contact_points from configuration file with "[ip.dest for ip in conf.cassandra.contact_points]". cfg.dest replace "-" with "_".if user config cassandra hosts cassandra-0,then persister crashed. Task: 29957 Story: 2005195 Change-Id: I9ee29fdce781739f06683e4b4a80183669663189
This commit is contained in:
parent
4ec934518e
commit
2bef4e500a
@ -16,12 +16,13 @@
|
||||
# limitations under the License.
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_config import types
|
||||
|
||||
cassandra_opts = [
|
||||
cfg.ListOpt('contact_points',
|
||||
help='Comma separated list of Cassandra node IP addresses',
|
||||
default=['127.0.0.1'],
|
||||
item_type=cfg.IPOpt),
|
||||
item_type=types.HostAddress()),
|
||||
cfg.IntOpt('port',
|
||||
help='Cassandra port number',
|
||||
default=8086),
|
||||
|
@ -31,8 +31,7 @@ def create_cluster():
|
||||
else:
|
||||
auth_provider = None
|
||||
|
||||
contact_points = [ip.dest for ip in conf.cassandra.contact_points]
|
||||
cluster = Cluster(contact_points,
|
||||
cluster = Cluster(conf.cassandra.contact_points,
|
||||
port=conf.cassandra.port,
|
||||
auth_provider=auth_provider,
|
||||
connect_timeout=conf.cassandra.connection_timeout,
|
||||
|
Loading…
Reference in New Issue
Block a user