]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: fix haproxy nfs backend server ip gathering 50446/head
authorAdam King <kingamk3@gmail.com>
Sun, 15 Jan 2023 22:18:47 +0000 (17:18 -0500)
committerAdam King <adking@redhat.com>
Fri, 10 Mar 2023 13:58:54 +0000 (08:58 -0500)
commit4191614394b4d6c3de882e5cfef9b94a982f9bb9
tree257ce8995e1804f1fce9ece52dc7530f3662fbc1
parentce8682fac192a9b7cd846125ffd75b545e89f661
mgr/cephadm: fix haproxy nfs backend server ip gathering

Fixes: https://tracker.ceph.com/issues/58465
Previously, if there were 2 nfs daemons of the same
rank, we could not check the rank generation, which
is intended to mark which one is the "real" on of that
rank in cases where we cannot remove the other one due
to its host being offline. The nfs of a given rank with
the highest rank_generation is the one we want haproxy
to use for its backend IP. Since we didn't actually
check this, it was random, depending on what order we
happened to iterate over the nfs daemons of the same
rank, which IP we actually got. If the nfs with the
lower rank_generation on an offline host happened
to come later in the iterations, we'd use that one
for the IP, which is incorrect.

Signed-off-by: Adam King <adking@redhat.com>
(cherry picked from commit e0dd6cac0229e75feb85b10bb31a70e4638733cc)

Conflicts:
src/pybind/mgr/cephadm/tests/test_services.py
src/pybind/mgr/cephadm/services/ingress.py
src/pybind/mgr/cephadm/tests/test_services.py