Skip to content

Commit 2fa381d

Browse files
improve logging
Signed-off-by: Marvin Frommhold <depressiveRobot@users.noreply.github.com>
1 parent 27595fe commit 2fa381d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Tests/kaas/k8s-node-distribution/k8s_node_distribution_check.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def compare_labels(node_list, node_type="control"):
149149
try:
150150
label_data[key].append(node[key])
151151
except KeyError:
152-
raise LabelException(f"The label for {key.split('/')[1]}s doesn't seem to be set for all nodes.")
152+
raise LabelException(f"The label for {key.split('/')[1]}s doesn't seem to be set for all {node_type} nodes.")
153153

154154
for label in LABELS:
155155
if len(set(label_data[label])) <= 1:
@@ -165,7 +165,8 @@ def compare_labels(node_list, node_type="control"):
165165
#
166166
# if node_type == "control":
167167
# raise DistributionException("The distribution of nodes described in the standard couldn't be detected.")
168-
logger.warning("No node distribution could be detected for the worker nodes. "
168+
if node_type == "worker":
169+
logger.warning("No node distribution could be detected for the worker nodes. "
169170
"This produces only a warning, since it is just a recommendation.")
170171

171172

0 commit comments

Comments
 (0)