From 8c22b7c35bd5fc85db2f74395e9bec0660974299 Mon Sep 17 00:00:00 2001 From: Maddiaa0 <47148561+Maddiaa0@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:50:09 +0000 Subject: [PATCH] fix: remove troubleshooting --- spartan/chaos-mesh/values.yaml | 5 -- .../network-shaping/scripts/troubleshoot.sh | 59 ------------------- .../end-to-end/scripts/network_test.sh | 4 +- 3 files changed, 1 insertion(+), 67 deletions(-) delete mode 100755 spartan/network-shaping/scripts/troubleshoot.sh diff --git a/spartan/chaos-mesh/values.yaml b/spartan/chaos-mesh/values.yaml index 3c3a22867cf..9a91dedaf47 100644 --- a/spartan/chaos-mesh/values.yaml +++ b/spartan/chaos-mesh/values.yaml @@ -16,11 +16,6 @@ chaos-mesh: privileged: true runtime: "containerd" socketPath: "/run/containerd/containerd.sock" - # capabilities: - # - SYS_PTRACE - # - NET_ADMIN - # - IPC_LOCK - # - SYS_ADMIN dnsServer: create: true diff --git a/spartan/network-shaping/scripts/troubleshoot.sh b/spartan/network-shaping/scripts/troubleshoot.sh deleted file mode 100755 index c8d601a8d13..00000000000 --- a/spartan/network-shaping/scripts/troubleshoot.sh +++ /dev/null @@ -1,59 +0,0 @@ -#!/bin/bash - -# Script to troubleshoot chaos network experiment failures -# Specifically for network chaos (latency) on StatefulSet pods - -# Check pod status -check_pod_status() { - local namespace=$1 - local pod_name=$2 - echo "=== Checking Pod Status ===" - kubectl get pod -n $namespace $pod_name -o wide - kubectl describe pod -n $namespace $pod_name -} - -# Check network policies -check_network_policies() { - local namespace=$1 - echo "=== Checking Network Policies ===" - kubectl get networkpolicies -n $namespace -} - -# Check chaos experiment status -check_chaos_status() { - local namespace=$1 - echo "=== Checking Chaos Experiment Status ===" - kubectl get chaosengine -n $namespace - kubectl get chaosresult -n $namespace -} - -# Check iptables rules on the node -check_iptables() { - local node=$1 - echo "=== Checking iptables rules ===" - kubectl debug node/$node -it --image=ubuntu -- bash -c "apt-get update && apt-get install -y iptables && iptables -L" -} - -# Check privilege settings -check_privileges() { - local namespace=$1 - local pod_name=$2 - echo "=== Checking Pod Security Context ===" - kubectl get pod $pod_name -n $namespace -o jsonpath='{.spec.securityContext}' -} - -# Main execution -main() { - local namespace="smoke" - local pod_name="spartan-aztec-network-validator-0" - local node=$(kubectl get pod -n $namespace $pod_name -o jsonpath='{.spec.nodeName}') - - check_pod_status $namespace $pod_name - check_network_policies $namespace - check_chaos_status $namespace - check_iptables $node - check_privileges $namespace $pod_name -} - -# Run script -main \ No newline at end of file diff --git a/yarn-project/end-to-end/scripts/network_test.sh b/yarn-project/end-to-end/scripts/network_test.sh index 30ae596d0aa..c5969fbf1b3 100755 --- a/yarn-project/end-to-end/scripts/network_test.sh +++ b/yarn-project/end-to-end/scripts/network_test.sh @@ -5,10 +5,10 @@ # NAMESPACE # Optional environment variables: # VALUES_FILE (default: "default.yaml") +# INSTALL_CHAOS_MESH (default: "") # CHAOS_VALUES (default: "") # FRESH_INSTALL (default: "false") # AZTEC_DOCKER_TAG (default: current git commit) -# NETWORK_SHAPING_CONFIG (default: "") set -eux @@ -126,8 +126,6 @@ FREE_PORTS=$(comm -23 <(seq 9000 10000 | sort) <(ss -Htan | awk '{print $4}' | c PXE_PORT=$(echo $FREE_PORTS | awk '{print $1}') ANVIL_PORT=$(echo $FREE_PORTS | awk '{print $2}') -## TODO: why is namespace down here??? - # Namespace variable (assuming it's set) NAMESPACE=${NAMESPACE:-default}