test/{librbd, rgw}: retry when bind fail with port 0
there is chance that the bind() call may fail if we have another test
happen to pick the free port picked by operating system. in this case,
we just retry up to 42 times.
in theory, this change does not fully address the racing, but it should
help to alleviate this issue.
See-also: https://tracker.ceph.com/issues/57116
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit
aa7885f7cc41390fcc8eeb82bc7142c3ff6a53f9)
Conflicts:
src/test/rgw/test_http_manager.cc [ commit
f5019d2a8388 ("rgw:
Set CURLOPT_NOBODY for HEAD request") not in pacific ]