]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: fix haproxy nfs backend server ip gathering 49754/head
authorAdam King <kingamk3@gmail.com>
Sun, 15 Jan 2023 22:18:47 +0000 (17:18 -0500)
committerAdam King <adking@redhat.com>
Mon, 6 Feb 2023 13:51:49 +0000 (08:51 -0500)
commite0dd6cac0229e75feb85b10bb31a70e4638733cc
tree6eae8f6a6d264a78f458bccab87aeb44448daa9d
parente1d3e38f87bce4e53eb7e4c29c812a7ed750fa80
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>
src/pybind/mgr/cephadm/services/ingress.py
src/pybind/mgr/cephadm/tests/test_services.py