]> 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)
committerSage Weil <sage@newdream.net>
Mon, 26 Jul 2021 20:23:17 +0000 (16:23 -0400)
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>
src/pybind/mgr/cephadm/services/ingress.py

index 9c49cc6932d9ce4f48a7fd6d9c5998e6cbe57e20..9f8cc676556ccaacbe63dfc70c1f96c6c0c826b6 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]