Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: update az iot ops check --pre to not warn for multi-node clusters #279

Merged
merged 3 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions azext_edge/edge/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def load_iotops_help():
- {COMPAT_MQTT_BROKER_APIS.as_str()}
- {COMPAT_OPCUA_APIS.as_str()}

For more information on cluster requirements, please check https://aka.ms/iot-ops-cluster-requirements

examples:
- name: Basic usage. Checks `broker` health with summary output.
text: >
Expand Down
16 changes: 0 additions & 16 deletions azext_edge/edge/providers/check/base/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,6 @@ def check_nodes(as_list: bool = False) -> Dict[str, Any]:
check_manager.add_display(target_name=target, display=target_display)
return check_manager.as_dict()

check_manager.add_target_eval(
target_name=target,
status=CheckTaskStatus.warning.value if len(nodes.items) > 1 else CheckTaskStatus.success.value,
value=len(nodes.items)
)
if len(nodes.items) > 1:
check_manager.add_display(
target_name=target,
display=Padding(
COLOR_STR_FORMAT.format(
color=CheckTaskStatus.warning.color,
value=MULTINODE_CLUSTER_MSG
),
padding
),
)
table = _generate_node_table(check_manager, nodes)
check_manager.add_display(target_name=target, display=Padding(table, padding))

Expand Down
4 changes: 0 additions & 4 deletions azext_edge/tests/edge/checks/base/test_nodes_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ def test_check_nodes(mocked_node_client):
assert result["status"] == "error"
assert evaluation[0]["value"] == "No nodes detected."
return
elif len(nodes) > 1:
warning = result["targets"]["cluster/nodes"]["_all_"]["displays"][0].renderable
assert "Currently, only single-node clusters are officially supported for AIO deployments" in warning
assert result["targets"]["cluster/nodes"]["_all_"]["status"] == "warning"
else:
assert result["targets"]["cluster/nodes"]["_all_"]["status"] == "success"

Expand Down
Loading