ceph/src/cephadm
Adam King b2f133fd99 cephadm: have attempt_bind raise up OSErrors
Before it was always converting the OSError to
our self-defined "Error" class. This causes an issue
with the port_in_use function that has special handling
for OSError when the errno is EADDRNOTAVAIL or
EAFNOSUPPORT. Since the error being raised was no
longer an OSError it wasn't being caught and checked
properly in port_in_use.

This has the additional property of being necessary
to check port availability for haproxy on its VIP. If
we fail deployment when EADDRNOTAVAIL is raised, it becomes
difficult to deploy the ingress service. If we deploy
haproxy first it fails because the VIP isn't available
yet (since keepalive isn't up) and it fails saying the port
it wants to bind to is unavailable (specifically EADDRNOTAVAIL).
If we try to deploy keepalive first it fails because it
needs to know the location of the haproxy daemons in
order to build its config file. This has worked in the past
by just having the haproxy fail to bind at first and then
fix itself once the keepalive daemon is deployed. That
no longer works if the haproxy daemon fails to deploy
because cephadm is reporting the port it needs is
unavailable. Since EADDRNOTAVAIL when deploying
haproxy likely means the VIP is not up rather than
something else is taking up the port it needs, fixing
the handling of this allows ingress deployment to
work while also allowing multiple haproxy daemons
on the same host to use the same frontend port
bound to different VIPs.

Signed-off-by: Adam King <adking@redhat.com>
2023-08-22 10:05:21 -04:00
..
box
containers/keepalived orchestrator: fix spelling errors 2023-04-26 09:21:42 -04:00
samples
tests cephadm: have attempt_bind raise up OSErrors 2023-08-22 10:05:21 -04:00
.gitignore
CMakeLists.txt cephadm: configure cmake to pass versioning values to build.py 2023-05-22 13:25:58 -04:00
build.py Merge pull request #51267 from phlogistonjohn/jjm-cephadm-versioning 2023-06-14 14:23:27 -04:00
build.sh
cephadm.py cephadm: have attempt_bind raise up OSErrors 2023-08-22 10:05:21 -04:00
tox.ini cephadm: fix autopep8 arg parsing on newer tox versions 2023-02-12 22:18:25 -05:00
vstart-cleanup.sh
vstart-smoke.sh