]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: fix haproxy nfs backend server ip gathering 50511/head
authorAdam King <kingamk3@gmail.com>
Sun, 15 Jan 2023 22:18:47 +0000 (17:18 -0500)
committerAdam King <adking@redhat.com>
Mon, 13 Mar 2023 21:30:31 +0000 (17:30 -0400)
commit0ba570a46e63231e303de17540c898a294daff33
tree1032ad88b218186c3f4256e105e40ed2c4ee4eab
parent79333c0390905771d4c6891192520a172ee7e00e
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)
src/pybind/mgr/cephadm/services/ingress.py
src/pybind/mgr/cephadm/tests/test_services.py