feat: add cluster auditing, management, and upgrade scripts
This commit is contained in:
20
scripts/deep_search_coder.py
Normal file
20
scripts/deep_search_coder.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import paramiko
|
||||
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
ssh.connect('140.44.4.52', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
|
||||
|
||||
print("Searching for Coder postgres data on wrk02 (140.44.4.52)...")
|
||||
cmd = """find /var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/ -name "coderv2" 2>/dev/null"""
|
||||
_, out, err = ssh.exec_command(cmd)
|
||||
res = out.read().decode().strip()
|
||||
if res:
|
||||
print("Found coderv2 paths:\n", res)
|
||||
else:
|
||||
print("No coderv2 found directly. Searching for pg_control...")
|
||||
cmd2 = """find /var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/ -path "*coderv2*" 2>/dev/null | head -n 20"""
|
||||
_, out2, _ = ssh.exec_command(cmd2)
|
||||
print("Search result:\n", out2.read().decode().strip())
|
||||
|
||||
ssh.close()
|
||||
|
||||
Reference in New Issue
Block a user