Skip to content

Commit

Permalink
Update check_paas.py
Browse files Browse the repository at this point in the history
  • Loading branch information
disa1217 authored Sep 10, 2024
1 parent 4b0672d commit e133fe7
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions kubemarine/procedures/check_paas.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _check_same_os(cluster: KubernetesCluster) -> None:
different_os = set(os_ids.values())
if len(different_os) > 1:
cluster.log.warning(
f"Nodes have different OS families or versions, packages versions cannot be checked. "
f"Nodes have different OS families or versions, packages versions cannot be checked."
f"List of (OS family, version): {list(different_os)}")
raise TestFailure(f"Nodes have different OS families or versions")

Expand Down Expand Up @@ -1021,7 +1021,7 @@ def verify_modprobe_rules(cluster: KubernetesCluster) -> None:
else:
raise TestFailure('invalid',
hint=f"Modprobe rules do not match those loaded in modprobe on cluster nodes. Check "
f"manually what the differences are and make changes on the appropriate nodes.")
f"the differences manually and make changes on the appropriate nodes.")


def verify_sysctl_config(cluster: KubernetesCluster) -> None:
Expand All @@ -1042,7 +1042,7 @@ def verify_sysctl_config(cluster: KubernetesCluster) -> None:
else:
raise TestFailure('invalid',
hint=f"Some configured kernel parameters are not loaded on the cluster nodes.\n"
f"Check manually what the differences are, and make changes on the appropriate nodes.")
f"Check the differences manually and make changes on the appropriate nodes.")


def verify_system_audit_rules(cluster: KubernetesCluster) -> None:
Expand All @@ -1063,7 +1063,7 @@ def verify_system_audit_rules(cluster: KubernetesCluster) -> None:
else:
raise TestFailure('invalid',
hint=f"Some configured Audit rules are not loaded on the cluster nodes.\n"
f"Check manually what the differences are, and make changes on the appropriate nodes.")
f"Check the differences manually and make changes on the appropriate nodes.")


def etcd_health_status(cluster: KubernetesCluster) -> None:
Expand Down Expand Up @@ -1573,8 +1573,8 @@ def verify_kubernetes_version(cluster: KubernetesCluster) -> None:
target_version = cluster.inventory['services']['kubeadm']['kubernetesVersion']
if not kubernetes.verify_supported_version(target_version, cluster.log):
raise TestWarn(f"Kubernetes version {target_version} is deprecated",
hint=f"Used kubernetes version is deprecated and will be excluded from support "
f"in future kubemarine releases. Please, plan upgrade to newer version")
hint=f"Used Kubernetes version is deprecated and will be excluded from support "
f"in future Kubemarine releases. Please plan upgrade to the newer version.")

tc.success(results='Kubernetes version is OK')

Expand Down Expand Up @@ -1614,7 +1614,7 @@ def geo_check(cluster: KubernetesCluster) -> None:

peers = yaml.safe_load(io.StringIO(peers_result))
if len(peers) == 0:
raise TestFailure("configuration error", hint="geo-monitor instance has no peers")
raise TestFailure("configuration error", hint="geo-monitor instance has no peers.")

for peer in peers:
status = peer["clusterIpStatus"]
Expand Down Expand Up @@ -1644,7 +1644,7 @@ def geo_check(cluster: KubernetesCluster) -> None:

with TestCase(cluster, '226', "Geo Monitor", "Geo check - Pod-to-service") as tc_svc:
if not status_collected:
raise TestFailure("configuration error", hint="DNS check failed with error, statuses not collected")
raise TestFailure("configuration error", hint="DNS check failed with error, statuses not collected.")

if svc_status["failed"]:
raise TestFailure("found unavailable peer services",
Expand All @@ -1655,7 +1655,7 @@ def geo_check(cluster: KubernetesCluster) -> None:

with TestCase(cluster, '226', "Geo Monitor", "Geo check - Pod-to-pod") as tc_pod:
if not status_collected:
raise TestFailure("configuration error", hint="DNS check failed with error, statuses not collected")
raise TestFailure("configuration error", hint="DNS check failed with error, statuses not collected.")

if pod_status["failed"]:
raise TestFailure("found unavailable peer pod",
Expand Down Expand Up @@ -1711,7 +1711,7 @@ def verify_apparmor_config(cluster: KubernetesCluster) -> None:
tc.success(results='valid')
else:
raise TestFailure('invalid',
hint=f"Some nodes do not have properly configured Apparmor service")
hint=f"Some nodes do not have properly configured Apparmor service.")
else:
tc.success(results='skipped')

Expand Down

0 comments on commit e133fe7

Please sign in to comment.