Skip to content

Commit

Permalink
msg: async: start over after failing to bind a port in specified range
Browse files Browse the repository at this point in the history
The original report associated with this fix can be found at
http://tracker.ceph.com/issues/13002. I reopen one in case it
needs to be backported or something alike.

Fixes: ceph#14928
Signed-off-by: xie xingguo <[email protected]>
  • Loading branch information
xiexingguo committed Mar 1, 2016
1 parent cbe8dfb commit 8ffc4e8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/msg/async/AsyncMessenger.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ int Processor::bind(const entity_addr_t &bind_addr, const set<int>& avoid_ports)
<< "-" << msgr->cct->_conf->ms_bind_port_max << ": "
<< cpp_strerror(errno) << dendl;
r = -errno;
listen_addr.set_port(0); // Clear port before retry, otherwise we shall fail again.
continue;
}
ldout(msgr->cct, 10) << __func__ << " bound on random port " << listen_addr << dendl;
Expand Down

0 comments on commit 8ffc4e8

Please sign in to comment.