Inappropriate checking of connection timeout in db_replicator._repl_to_node
Bug #1359018 reported by
Takashi Kajinami
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Low
|
Unassigned |
Bug Description
Account/
Changed in swift: | |
status: | New → Confirmed |
Changed in swift: | |
importance: | Undecided → Low |
Changed in swift: | |
milestone: | none → 2.2.1 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Here I show detailed description about this problem.
_repl_to_node checks timeout in _http_connect function. (swift. common. db_replicator l373)
def _repl_to_node(self, node, broker, partition, info): ut(self. conn_timeout) : connect( node, partition, broker.db_file)
...
with ConnectionTimeo
http = self._http_
_http_connect creates and returns ReplConecction class. (swift. common. db_replicator l338)
It never calls "connect".
def _http_connect(self, node, partition, db_file): node, partition,
os.path. basename( db_file) .split( '.', 1)[0],
self. logger)
...
return ReplConnection(
ReplConnection doesn't create connection in __init__. (swift. common. db_replicator l115)
def __init__(self, node, partition, hash_, logger): replication_ ip'], node['replicati on_port' ])
BufferedHTTPCo nnection. __init_ _(self, host)
...
self.logger = logger
self.node = node
host = "%s:%s" % (node['
self.path = '/%s/%s/%s' % (node['device'], partition, hash_)