]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/orchestrator: set node labels to empty list if none specified 31914/head
authorTim Serong <tserong@suse.com>
Thu, 28 Nov 2019 05:25:21 +0000 (16:25 +1100)
committerTim Serong <tserong@suse.com>
Thu, 28 Nov 2019 05:26:15 +0000 (16:26 +1100)
f06366836ff tries to ' '.join(node.labels), which raises an exception
if labels is None, so we need to default it to an empty list.

Signed-off-by: Tim Serong <tserong@suse.com>
src/pybind/mgr/orchestrator.py

index 7ddba059ac02578bfc955573fb814a5cdc8250b5..15a4175065582aa5cd841acc3d092ce5cdc33327 100644 (file)
@@ -1296,6 +1296,8 @@ class InventoryNode(object):
         # type: (str, inventory.Devices, List[str]) -> None
         if devices is None:
             devices = inventory.Devices([])
+        if labels is None:
+            labels = []
         assert isinstance(devices, inventory.Devices)
 
         self.name = name  # unique within cluster.  For example a hostname.