Uploaded image for project: 'Network Edge'
  1. Network Edge
  2. NE-2280

Implement Active DNS and Network Diagnostic Probes

XMLWordPrintable

    • Icon: Epic Epic
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • Implement Active DNS and Network Diagnostic Probes
    • To Do
    • Product / Portfolio Work
    • OCPSTRAT-2811Integrate Model Context Protocol for Agentic AI-driven Ingress and DNS Troubleshooting
    • 100% To Do, 0% In Progress, 0% Done
    • False
    • Hide

      None

      Show
      None
    • False
    • Not Selected
    • None
    • None
    • None
    • 8
    • 0

      Description

      Implement active diagnostic tools that generate network traffic to verify connectivity and resolution. Unlike inspection tools (NE-2278), these require a live environment and involve executing network calls from the MCP server or from within the cluster.

      Goals

      1. Implement DNS probing from the server.
      2. Implement HTTP probing from the server.
      3. Implement in-cluster probing via ephemeral pods.

      Tool Definitions

      1. probe_dns_local

      • Description: Run a DNS query using local libraries on the MCP server host.
      • Input Schema:
        {
          "type": "object",
          "properties": {
            "server": { "type": "string", "description": "DNS server IP" },
            "name": { "type": "string", "description": "FQDN to query" },
            "type": { "type": "string", "description": "Record type (A, AAAA, CNAME, TXT)", "default": "A" }
          },
          "required": ["server", "name"]
        }
        
      • Output Schema:
        {
          "answers": [ /* List of answer strings */ ],
          "rcode": "string (NOERROR, NXDOMAIN, etc.)",
          "latency_ms": number
        }
        

      2. probe_http

      • Description: Run an HTTP(S) request to verify reachability and status codes.
      • Input Schema:
        {
          "type": "object",
          "properties": {
            "url": { "type": "string", "description": "Target URL" },
            "method": { "type": "string", "description": "HTTP Method", "default": "GET" },
            "timeout_seconds": { "type": "integer", "default": 5 }
          },
          "required": ["url"]
        }
        
      • Output Schema:
        {
          "status_code": integer,
          "headers": { /* map of headers */ },
          "latency_ms": number,
          "error": "string (optional)"
        }
        

      3. exec_dns_in_pod

      • Description: Spin up a temporary pod in the cluster to execute a DNS lookup, verifying internal cluster networking and DNS path.
      • Input Schema:
        {
          "type": "object",
          "properties": {
            "namespace": { "type": "string", "description": "Namespace to run the ephemeral pod" },
            "target_server": { "type": "string", "description": "DNS server IP to query" },
            "target_name": { "type": "string", "description": "DNS name to query" },
            "record_type": { "type": "string", "description": "A, AAAA, etc.", "default": "A" }
          },
          "required": ["namespace", "target_server", "target_name"]
        }
        
      • Output Schema:
        {
          "pod_name": "string",
          "output": "string (raw dig output or parsed structure)",
          "phase": "string (Succeeded/Failed)"
        }
        

      Implementation Steps

      1. Implement probe_dns_local:
        • Logic:
          • Use a Go DNS library (e.g., github.com/miekg/dns).
          • Construct the message, send to server:53 (UDP/TCP).
          • Parse and return the answer section.
      2. Implement probe_http:
        • Logic:
          • Use net/http client.
          • Perform a request.
          • Return Status Code, Latency, and Headers.
      3. Implement exec_dns_in_pod:
        • Logic:
          • Use client-go to create a Pod specification:
            • Image: registry.redhat.io/openshift4/network-tools-rhel9.
            • Command: /usr/bin/dig @server name.
          • Wait for Pod Succeeded or Failed.
          • Retrieve logs.
          • Delete the Pod.

      Acceptance Criteria

      • probe_dns_local matches schema and works.
      • probe_http matches schema and works.
      • exec_dns_in_pod matches schema, creates pod, works, and cleans up.
      • Proper timeouts and error handling for all network operations.

              Unassigned Unassigned
              btofelrh Brett Tofel
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: