]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mgr/cephadm: tolerate old host inventory without 'hostname' key 38850/head
authorSage Weil <sage@newdream.net>
Mon, 11 Jan 2021 18:41:12 +0000 (12:41 -0600)
committerSage Weil <sage@newdream.net>
Mon, 11 Jan 2021 19:19:51 +0000 (13:19 -0600)
commitad4ea787d063ba65269f38f185ff18a327cb7bbb
tree0f04c181326654790d55e6797efc1751b0a9f4f9
parentd20916964984242e513a645bd275fad89777466a
mgr/cephadm: tolerate old host inventory without 'hostname' key

Older cephadm clusters lack the 'hostname' key in the host spec.  e.g.,

 "cpach": {"addr": "cpach", "labels": ["mon"]}, "eutow": {"addr": "eutow", "labels": ["mon"]}, "stud": {"addr": "stud", "labels": ["mon"]}}

Populate hostname from the dict key if necessary for compatibility.

Signed-off-by: Sage Weil <sage@newdream.net>
src/pybind/mgr/cephadm/inventory.py