← Back to Pull requests

fix(two-node): support proxy env file in bare metal diagnostic mode #242

Open
dhensel-rh opened this pull request with 153 lines diff across 4 files
View on GitHub
dhensel-rh dhensel-rh commented on Jul 24, 2026 14:11 UTC
Author

Summary

  • Add PROXY_ENV variable to diagnose-cluster.sh for bare metal deployments

  • On bare metal (direct access mode), oc commands source the proxy env file before running, instead of routing through a bastion host as in the hypervisor/VM path
  • Test plan

  • Run PROXY_ENV=/path/to/proxy.env ./diagnose-cluster.sh on a bare metal two-node cluster

  • Verify existing hypervisor mode is unaffected
  • 🤖 Generated with Claude Code

    <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    Summary by CodeRabbit

    New Features
    Added support for an optional proxy environment configuration (via a file setting) for cluster diagnostics, so oc commands load proxy settings in direct SSH mode.
    Documentation
    Added a comprehensive README for the Two-Node “TNF Cluster Diagnostic” skill, including installation, required environment variables, what it diagnoses, and example commands.
    Chores
    Bumped the two-node plugin version to 1.1.1 (marketplace/manifest).
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 153 lines (+150 / -3) across 4 files Reviewer: coderabbitai[bot] Review duration: 191029m
    All Vouch review confidence checks passed
    Residual risk 0.13 = Change Risk (0.50) × (1 − Review Confidence (0.74)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.50 · 153 lines diff across 4 files
    0.50
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.61 · 4 substantive comment(s)
    0.61
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    74%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.301
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    8 items
    openshift-ci[bot] openshift-ci[bot] commented on Jul 24, 2026 14:12 UTC
    Bot

    [APPROVALNOTIFIER] This PR is APPROVED

    This pull-request has been approved by: <a href="https://github.com/openshift-eng/edge-tooling/pull/242#" title="Author self-approved">dhensel-rh</a>

    The full list of commands accepted by this bot can be found here.

    The pull request process is described here

    <details >
    Needs approval from an approver in each of these files:

  • ~~OWNERS~~ [dhensel-rh]
  • Approvers can indicate their approval by writing /approve in a comment
    Approvers can cancel approval by writing /approve cancel in a comment
    </details>
    <!-- META={"approvers":[]} -->

    coderabbitai[bot] coderabbitai[bot] commented on Jul 24, 2026 14:12 UTC
    Bot

    <!-- coderabbit-ai-generated:v1 -->

    <!-- This is an auto-generated comment: summarize by coderabbit.ai -->
    <!-- This is an auto-generated comment: review paused by coderabbit.ai -->

    [!NOTE]

    ## Reviews paused

    > It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

    > - Last reviewed commit: 847107555f7db335a85ef4da3218e416229c1189

    - Latest commit, not reviewed: abbcd7f3c5d69cd0a979be1305e4a70442dc2ddf

    > Use the following commands to manage reviews:

    - @coderabbitai resume to resume automatic reviews.

    - @coderabbitai review to trigger a single review.

    > Use the checkboxes below for quick actions:

    - [ ] <!-- {"checkboxId": "7f6cc2e2-2e4e-497a-8c31-c9e4573e93d1"} --> ▶️ Resume reviews

    - [ ] <!-- {"checkboxId": "e9bb8d72-00e8-4f67-9cb2-caf3b22574fe"} --> 🔍 Trigger review

    <!-- end of auto-generated comment: review paused by coderabbit.ai -->
    <!-- walkthrough_start -->

    Walkthrough

    The two-node diagnosis script adds optional PROXY_ENV support for direct-mode oc commands, and a README documents the cluster diagnostic skill. Marketplace and plugin manifest versions are updated from 1.1.0 to 1.1.1.

    Changes

    Two-node diagnostics

    |Layer / File(s)|Summary|
    |:---|:---|
    |Direct oc proxy handling <br> plugins/two-node/scripts/diagnose-cluster.sh|Documents PROXY_ENV and sources an existing file before invoking oc, while preserving KUBECONFIG and default fallback behavior.|
    |Cluster diagnostic skill documentation <br> plugins/two-node/skills/cluster-diagnostic/README.md|Documents the skill’s read-only diagnostics, access configuration, fencing and Pacemaker checks, and command examples.|
    |Plugin metadata version alignment <br> .claude-plugin/marketplace.json, plugins/two-node/.claude-plugin/plugin.json|Updates the two-node plugin version from 1.1.0 to 1.1.1 in both metadata files.|

    Estimated code review effort: 2 (Simple) | ~5 minutes

    <!-- walkthrough_end -->
    <!-- pre_merge_checks_walkthrough_start -->

    <details>
    <summary><strong>🚥 Pre-merge checks | ✅ 10 | ❌ 1</strong></summary>
    <dl>
    <dd>
    <br>

    ❌ Failed checks (1 warning)

    | Check name | Status | Explanation | Resolution |
    | :------------ | :--------- | :----------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------- |
    | Ai-Attribution | ⚠️ Warning | PR mentions Claude Code, and HEAD uses Co-Authored-By: Claude Opus 4.6 instead of Red Hat AI attribution trailers. | Replace the AI co-author trailer with Red Hat-compliant Assisted-by or Generated-by trailer, and remove Co-Authored-By for AI use. |

    <details>
    <summary><strong>✅ Passed checks (10 passed)</strong></summary>
    <dl>
    <dd>
    <br>

    | Check name | Status | Explanation |
    | :------------------------ | :------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
    | Title check | ✅ Passed | The title accurately summarizes the main functional change: adding PROXY_ENV support in bare-metal diagnostic mode. |
    | Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
    | Linked Issues check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
    | Out of Scope Changes check | ✅ Passed | Check skipped because no linked issues were found for this pull request. |
    | No-Weak-Crypto | ✅ Passed | Touched files add PROXY_ENV support and version bumps only; no MD5/SHA1/DES/RC4/ECB or custom crypto/secret comparisons appear. |
    | Container-Privileges | ✅ Passed | The PR only changes a shell script, version metadata, and docs; no container/K8s manifests or privileged settings are introduced. |
    | No-Sensitive-Data-In-Logs | ✅ Passed | PASS: The patch adds no new logging of secrets; PROXY_ENV is sourced silently and the README only shows placeholder examples, not real credentials. |
    | No-Hardcoded-Secrets | ✅ Passed | No actual hardcoded secrets were added; the only password literal is a README placeholder example, not a real credential. |
    | No-Injection-Vectors | ✅ Passed | The PR adds only source "$PROXY_ENV" with a file-existence check; none of the flagged patterns (eval/exec, shell=True, os.system, yaml.load, etc.) appear in the changed files. |

    </dd>
    </dl>
    </details>

    </dd>
    </dl>
    </details>

    <!-- pre_merge_checks_walkthrough_end -->

    <!-- internal state start -->

    <!-- N4IgzgxgFgpgtgQwGowE5gJYHsB2IBcAjADTgAuqArhGZajACYDKZCZMBoYF1t9K6bHiKkADqgDyAIwBWMGhgBuMMARABidQAIACgCUtYSnESoAngB0cVgIIMGYLQAN9EgBoBNAPoBRAHJIToaUoqJYqGRaZFjODBgIAOY4WGAwALQQADaU3GgAdGBQQQBm4VpSCPRacDCsmVEA7lhpyQwwWm2imVhmNThkYHlaAJI4HRj0NFoIEBAqjnBYbcTOWBBBEFgmCDgOhlh0c1GwhqLyGMUYjFriWAAeZlowOIoTuH2Rl5ntGDi5CAwtFhilpUAcyL8EscwZQElBpuUENwhFooCkyEMABJmM6oV5gcIAeiQAFlyjAoAhXmV6Ihfo5KDhoDsEow8lYrJotABhLZwDCRGpgMCJFTBbbmDk4Ox7BBaLI5dioNJxRLJZEQLSssgQnBQ7iVdiAhKUDBtPIgUioBANJjGUxmEkIUScEBdWH0wlkJotJYwQmQVAYUQDQmqpIpdIK3KoApQNRcmzDNKsnBoNjXIwSx7A+WUvUqKVOd0JT3e5qtf2B4Oh8PqqPZGNxoIMNbGZ4DBFphpAkNCBD1Fx6dzefyBJ4vN44D5aRSVeJSb5DUaI+hpGp1LQACjik0iTCYmIAlNU/SsyCcnFQcF41kFYJlcVpkj3oPIANaOBqwC9oZyuTxfACIIMEcVJImiaYxhgO5QN1KEvhgABuLQLn2FYBX2Q4xQvNgtEQ8lSiqGD5EoeDVnWF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JMaYIljAEllEHo74dAaR3JtQMVOJ9GdVzYNIBKC8PRa0MjCeaKeEZVrQVVjIY7DqHYNVtK3IbVKQHMCeNyQdaGBJfKm1vV7I2kQKvlmwAV1vbVEVzHdVpGo6hR0m288m861FyS7Rx+zFmXGUtssgfQQCuSrjS4O4LcYQmAI8UyfWy1dtB4Q5Gy8FmirC2oZ5BiwPHXEAfN/QIc/7BlrkWjB0KUG+GUf8HW/HccOcInGSfuU3YHc3WMQoEoMoZt6oVt+i+FboXoDsMGG+CQaiyoFtzcXnPcBCgPS8/tMfYo3YMCUvI4SqW4et5wxtlvKoOdSEXQhV6OGEciC8GEOEBERJDHNEaeSuSyk4L5XEX5VAYkMkDBqAKULkeORlfS4drQJjLQcYrQMMsd4SMce54uOTL0LAYuMEB4PIZ9vIMMQHVIedpsJdjuwDw9tdzcCtzZBd6+dDzDrQAQC4R4EfCySDn5UCMoS8mhxkIkipGgRgKUQAPg3AA0Xa0H9ZLprntfQ/Fd/k8TaHGK3CgB1CMPwEJGYTZZejzWM99hdbaCPBgJAEtawF9SRpYAzFdG7fmsYEJbFTthmLmIFF5EZDIAIFmiI1rq8+GmknbgkCKWbjDxdHwFAGOjTAd3C9UgICYxlJreyiSTC7ShS+Y3GOC+IS81dAaCDHYAQJAA5kE0IBgBeyEwtdmkOLSDEykAqwtfxMAcBL/WQwqTQKkABJlwIwIyAA -->

    <!-- internal state end -->

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 24, 2026 14:14 UTC
    Code Review
    plugins/two-node/scripts/diagnose-cluster.sh:1
    @@ -83,7 +84,9 @@ run_on_node() {
     
     run_oc() {
         if [ "$ACCESS_MODE" = "direct" ]; then
    -        if [ -n "${KUBECONFIG:-}" ]; then
    +        if [ -n "${PROXY_ENV:-}" ] && [ -f "$PROXY_ENV" ]; then
    +            (source "$PROXY_ENV" > /dev/null 2>&1; oc "$@") 2>"$STDERR_REDIRECT"

    _📐 Maintainability & Code Quality_ | _🟡 Minor_ | _⚡ Quick win_

    <details>
    <summary>🧩 Analysis chain</summary>

    🏁 Script executed:

    #!/usr/bin/bash
    set -euo pipefail
    
    printf '--- diagnose-cluster.sh (relevant slice) ---\n'
    cat -n plugins/two-node/scripts/diagnose-cluster.sh | sed -n '70,100p'
    
    printf '\n--- contributing guidance ---\n'
    cat -n CONTRIBUTING.md | sed -n '1,220p'
    

    Repository: openshift-eng/edge-tooling

    Length of output: 255

    ---

    🏁 Script executed:

    #!/usr/bin/bash
    set -euo pipefail
    
    sed -n '80,95p' plugins/two-node/scripts/diagnose-cluster.sh
    

    Repository: openshift-eng/edge-tooling

    Length of output: 779

    ---

    🏁 Script executed:

    #!/usr/bin/bash
    set -euo pipefail
    
    sed -n '84,90p' plugins/two-node/scripts/diagnose-cluster.sh
    

    Repository: openshift-eng/edge-tooling

    Length of output: 474

    ---

    </details>

    Add a ShellCheck directive for the dynamic source

    Per CONTRIBUTING.md, this shell script must pass ShellCheck. source "$PROXY_ENV" will trigger SC1090 unless you add # shellcheck source=/dev/null for this intentionally arbitrary file or refactor the load so ShellCheck can resolve it.

    <details>
    <summary>🧰 Tools</summary>

    <details>
    <summary>🪛 Shellcheck (0.11.0)</summary>

    [warning] 88-88: ShellCheck can't follow non-constant source. Use a directive to specify location.

    (SC1090)

    </details>

    </details>

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@plugins/two-node/scripts/diagnose-cluster.sh` around lines 87 - 88, Add a
    ShellCheck directive immediately before the dynamic source in the PROXY_ENV
    execution branch, marking the intentionally arbitrary sourced file as /dev/null
    so SC1090 is suppressed while preserving the existing source-and-oc behavior.
    

    </details>

    <!-- fingerprinting:phantom:triton:luna -->

    <!-- cr-indicator-types:potential_issue -->

    <!-- cr-comment:v1:e05bea28b091df42911814a8 -->

    _Sources: Coding guidelines, Path instructions, Linters/SAST tools_

    <!-- This is an auto-generated comment by CodeRabbit -->

    ✅ Addressed in commit 2bcc7aa

    coderabbitai[bot] coderabbitai[bot] requested changes on Jul 24, 2026 14:14 UTC
    Changes Requested Reviewer

    Actionable comments posted: 1

    <details>
    <summary>🤖 Prompt for all review comments with AI agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    Inline comments:
    In `@plugins/two-node/scripts/diagnose-cluster.sh`:
    - Around line 87-88: Add a ShellCheck directive immediately before the dynamic
    source in the PROXY_ENV execution branch, marking the intentionally arbitrary
    sourced file as /dev/null so SC1090 is suppressed while preserving the existing
    source-and-oc behavior.
    

    </details>

    <details>
    <summary>🪄 Autofix (Beta)</summary>

    Fix all unresolved CodeRabbit comments on this PR:

  • <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended)

  • <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes
  • </details>

    ---

    <details>
    <summary>ℹ️ Review info</summary>

    <details>
    <summary>⚙️ Run configuration</summary>

    Configuration used: Repository YAML (base), Central YAML (inherited)

    Review profile: CHILL

    Plan: Enterprise

    Run ID: 6350d3dd-33f1-4469-9c31-34c65410c9c3

    </details>

    <details>
    <summary>📥 Commits</summary>

    Reviewing files that changed from the base of the PR and between 81f6a9f138e7e79d81ad88e56584d201a7ec7c6d and 8cb4f5212fc593ec3a83cf05c5bf2fcb5bc467c5.

    </details>

    <details>
    <summary>📒 Files selected for processing (1)</summary>

  • plugins/two-node/scripts/diagnose-cluster.sh
  • </details>

    </details>

    <!-- This is an auto-generated comment by CodeRabbit for review status -->

    coderabbitai[bot] coderabbitai[bot] commented on code on Jul 24, 2026 14:29 UTC
    Code Review
    plugins/two-node/skills/cluster-diagnostic/README.md:1
    @@ -0,0 +1,143 @@
    +# TNF Cluster Diagnostic — Getting Started
    +
    +A Claude Code skill that diagnoses shutdown/recovery issues on Two-Node with
    +Fencing (TNF) clusters. It gathers live cluster state via SSH, matches it
    +against tested failure scenarios, and reports findings with severity
    +classification. Read-only — it never modifies the cluster.
    +
    +## Install
    +
    +1. Install [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview)
    +   if you haven't already.
    +
    +2. Add the edge-tooling plugin marketplace:
    +
    +   ```text
    +   /plugin marketplace add openshift-eng/edge-tooling
    +   ```
    +
    +3. Install the `two-node` plugin:
    +
    +   ```text
    +   /plugin install two-node
    +   ```
    +
    +## Set Up Cluster Access
    +
    +The skill connects to your TNF cluster over SSH. Pick whichever access pattern
    +matches your setup:
    +
    +### Dev-scripts (hypervisor hop)
    +
    +```bash
    +export HYPERVISOR=10.0.0.5   # your EC2 / hypervisor IP
    +```
    +
    +Or, if you have the `two-node-toolbox/` submodule checked out, it auto-detects.
    +
    +### Bare metal (direct SSH)
    +
    +```bash
    +export NODE_0=10.1.155.141
    +export NODE_1=10.1.155.142
    +```
    +
    +### Tip: use an env file
    +
    +Create `~/.tnf-cluster.env` with all your settings to avoid repeating exports:
    +
    +```bash
    +export NODE_0=10.1.155.141
    +export NODE_1=10.1.155.142
    +export SSH_KEY=~/.ssh/my-key         # defaults to ~/.ssh/id_rsa
    +export KUBECONFIG=/path/to/kubeconfig
    +
    +# If your cluster requires a proxy for oc commands, point PROXY_ENV
    +# at the file instead of sourcing it directly. The diagnostic script
    +# sources it internally — only for oc calls — so proxy vars don't
    +# leak into Claude Code's shell and break its API/MCP connections.
    +export PROXY_ENV=/path/to/auth/proxy.env
    +
    +# BMC vars — see "Debugging Fencing / BMC Issues" below
    +export BMC_0=bmc-node0.example.com
    +export BMC_1=bmc-node1.example.com
    +export BMC_USER=admin
    +export BMC_PASS=changeme

    _🔒 Security & Privacy_ | _🟠 Major_ | _⚡ Quick win_

    Remove the hardcoded BMC password example.

    Per CONTRIBUTING.md: “Avoid hardcoded credentials (use environment variables).” BMC_PASS=changeme encourages copying a known weak password into the runtime environment. Document setting it securely outside the committed template instead.

    <details>
    <summary>Proposed change</summary>

     export BMC_USER=admin
    -export BMC_PASS=changeme
    +# Set BMC_PASS securely in your environment or secret manager.
    

    </details>

    <!-- suggestion_start -->

    <details>
    <summary>📝 Committable suggestion</summary>

    ‼️ IMPORTANT

    Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    export BMC_USER=admin
    # Set BMC_PASS securely in your environment or secret manager.
    

    </details>

    <!-- suggestion_end -->

    <details>
    <summary>🤖 Prompt for AI Agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    In `@plugins/two-node/skills/cluster-diagnostic/README.md` around lines 64 - 65,
    Remove the hardcoded BMC_PASS=changeme assignment from the README example and
    instruct users to provide BMC_PASS securely through their external environment
    or secret management instead. Keep the BMC_USER example and surrounding setup
    guidance intact.
    

    </details>

    <!-- fingerprinting:phantom:triton:luna -->

    <!-- cr-indicator-types:potential_issue -->

    <!-- cr-comment:v1:51788fed40d0ef8f1d1d8eda -->

    _Sources: Coding guidelines, Path instructions_

    <!-- This is an auto-generated comment by CodeRabbit -->

    coderabbitai[bot] coderabbitai[bot] requested changes on Jul 24, 2026 14:29 UTC
    Changes Requested Reviewer

    Actionable comments posted: 1

    <details>
    <summary>🤖 Prompt for all review comments with AI agents</summary>

    Verify each finding against current code. Fix only still-valid issues, skip the
    rest with a brief reason, keep changes minimal, and validate.
    
    Inline comments:
    In `@plugins/two-node/skills/cluster-diagnostic/README.md`:
    - Around line 64-65: Remove the hardcoded BMC_PASS=changeme assignment from the
    README example and instruct users to provide BMC_PASS securely through their
    external environment or secret management instead. Keep the BMC_USER example and
    surrounding setup guidance intact.
    

    </details>

    <details>
    <summary>🪄 Autofix (Beta)</summary>

    Fix all unresolved CodeRabbit comments on this PR:

  • <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended)

  • <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes
  • </details>

    ---

    <details>
    <summary>ℹ️ Review info</summary>

    <details>
    <summary>⚙️ Run configuration</summary>

    Configuration used: Repository YAML (base), Central YAML (inherited)

    Review profile: CHILL

    Plan: Enterprise

    Run ID: 3c57b91e-4cfd-457a-a569-8d5daec7e227

    </details>

    <details>
    <summary>📥 Commits</summary>

    Reviewing files that changed from the base of the PR and between 2bcc7aab70aa5d3780d8eafb3d9c45d376f2ce2b and 847107555f7db335a85ef4da3218e416229c1189.

    </details>

    <details>
    <summary>📒 Files selected for processing (1)</summary>

  • plugins/two-node/skills/cluster-diagnostic/README.md
  • </details>

    </details>

    <!-- This is an auto-generated comment by CodeRabbit for review status -->

    coderabbitai[bot] coderabbitai[bot] approved these changes on Jul 24, 2026 14:44 UTC
    Approved Reviewer

    Approved these changes.

    Assignees
    dhensel-rh dhensel-rh
    Labels
    risk: low confidence: 74.3% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 49.5% (MEDIUM) · Higher = larger blast radius
    49.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 74.3% · Lower = rushed or shallow review
    74.3%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 12.7% · Safe to merge
    12.7%