]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: ingress: tolerate no daemons
authorSage Weil <sage@newdream.net>
Mon, 19 Jul 2021 22:12:24 +0000 (18:12 -0400)
committerSebastian Wagner <sewagner@redhat.com>
Thu, 9 Sep 2021 14:20:37 +0000 (16:20 +0200)
This doesn't normally happen, but did before the daemon inventory breakage
(see previous patches) was fixed.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit bae406f74607b16c0da1382537d9bab49d45061e)

src/pybind/mgr/cephadm/services/ingress.py

index 3825ca862ab2230c48d636e563f24b47fc96e221..8a1a4c93875c99f4bbaf50925921167cb5ffdf7b 100644 (file)
@@ -192,7 +192,7 @@ class IngressService(CephService):
         deps = sorted([d.name() for d in daemons if d.daemon_type == 'haproxy'])
 
         host = daemon_spec.host
-        hosts = sorted(list(set([str(d.hostname) for d in daemons])))
+        hosts = sorted(list(set([host] + [str(d.hostname) for d in daemons])))
 
         # interface
         bare_ip = str(spec.virtual_ip).split('/')[0]