Skip to content

Commit 20030f5

Browse files
Update plugins/must-gather/commands/camgi.md
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 56ed740 commit 20030f5

File tree

9 files changed

+67
-72
lines changed

9 files changed

+67
-72
lines changed

plugins/must-gather/PLUGIN-SUMMARY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## What We Built
44

5-
A comprehensive Claude Code plugin for analyzing OpenShift must-gather diagnostic data with 13 Python analysis scripts, automation tooling, and detailed documentation.
5+
A comprehensive Claude Code plugin for analyzing OpenShift must-gather diagnostic data with 14 Python analysis scripts, automation tooling, and detailed documentation.
66

77
## Analysis Scripts (14 Total)
88

@@ -58,7 +58,7 @@ Scripts designed to work together for root cause investigation:
5858
## Automation & Reporting
5959

6060
### Comprehensive Analysis Command
61-
`.claude-plugin/commands/comprehensive-analysis.md`
61+
`plugins/must-gather/commands/comprehensive-analysis.md`
6262
- Systematic 5-phase analysis workflow
6363
- Report generation template
6464
- Cross-referencing guidelines

plugins/must-gather/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ Generates a comprehensive report with:
441441
- Detailed recommendations
442442
- Cross-referenced findings
443443

444-
See `/home/psundara/ws/src/github.com/openshift/must-gather/.claude-plugin/commands/comprehensive-analysis.md` for full details.
444+
See `plugins/must-gather/commands/comprehensive-analysis.md` for full details.
445445

446446
#### Automation Script
447447

@@ -459,14 +459,14 @@ This generates a timestamped report file with complete analysis output.
459459

460460
If you're working in the must-gather repository:
461461

462-
1. The plugin is already available in `.claude-plugin/`
462+
1. The plugin is already available in `plugins/must-gather`
463463
2. Claude Code will automatically detect project plugins
464464

465465
### Manual Installation
466466

467467
To use this plugin in other projects:
468468

469-
1. Copy the `.claude-plugin/` directory to your desired location
469+
1. Copy the `plugins/must-gather` directory to your desired location
470470
2. Add to Claude Code:
471471
```bash
472472
/plugin marketplace add /path/to/.claude-plugin
@@ -576,11 +576,11 @@ For detailed comprehensive analysis with full report:
576576

577577
Or use the automation script:
578578
```bash
579-
cd .claude-plugin/skills/must-gather-analyzer/scripts
579+
cd plugins/must-gather/skills/must-gather-analyzer/scripts
580580
./run-comprehensive-analysis.sh /path/to/must-gather
581581
```
582582

583-
This runs all 13 analysis scripts in systematic order and generates a detailed report with:
583+
This runs all 14 analysis scripts in systematic order and generates a detailed report with:
584584
- Executive summary and health assessment
585585
- Critical issues prioritized by severity
586586
- Root cause analysis with cross-referenced findings

plugins/must-gather/commands/camgi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ The command performs the following steps:
9696
3. **Launch CAMGI**:
9797
Execute the CAMGI launcher script:
9898
```bash
99-
/home/psundara/ws/src/github.com/openshift/must-gather/.claude-plugin/skills/must-gather-analyzer/scripts/run-camgi.sh <must-gather-path>
99+
plugins/must-gather/skills/must-gather-analyzer/scripts/run-camgi.sh <must-gather-path>
100100
```
101101

102102
The script will:
@@ -197,7 +197,7 @@ podman run --rm -it -p 8080:8080 \
197197

198198
- CAMGI GitHub: https://github.com/elmiko/okd-camgi
199199
- CAMGI PyPI: https://pypi.org/project/okd-camgi/
200-
- Launcher Script: `.claude-plugin/skills/must-gather-analyzer/scripts/run-camgi.sh`
200+
- Launcher Script: `plugins/must-gather/skills/must-gather-analyzer/scripts/run-camgi.sh`
201201

202202
## Arguments
203203

plugins/must-gather/commands/comprehensive-analysis.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The actual must-gather directory is the subdirectory with the hash name, not the
4848

4949
Analysis scripts must be available at:
5050
```
51-
.claude-plugin/skills/must-gather-analyzer/scripts/
51+
plugins/must-gather/skills/must-gather-analyzer/scripts/
5252
├── analyze_clusterversion.py
5353
├── analyze_clusteroperators.py
5454
├── analyze_nodes.py
@@ -70,7 +70,7 @@ Analysis scripts must be available at:
7070
**CRITICAL: Script-Only Analysis**
7171

7272
- **NEVER** attempt to analyze must-gather data directly using bash commands, grep, or manual file reading
73-
- **ONLY** use the provided Python scripts in `.claude-plugin/skills/must-gather-analyzer/scripts/`
73+
- **ONLY** use the provided Python scripts in `plugins/must-gather/skills/must-gather-analyzer/scripts/`
7474
- If scripts are missing or not found:
7575
1. Stop immediately
7676
2. Inform the user that the analysis scripts are not available
@@ -81,12 +81,12 @@ Analysis scripts must be available at:
8181

8282
Before running any analysis, first verify:
8383
```bash
84-
ls .claude-plugin/skills/must-gather-analyzer/scripts/analyze_clusteroperators.py
84+
ls plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_clusteroperators.py
8585
```
8686

8787
If this fails, STOP and report to the user:
8888
```
89-
The must-gather analysis scripts are not available at .claude-plugin/skills/must-gather-analyzer/scripts/. Please ensure the must-gather-analyzer skill is properly installed before running analysis.
89+
The must-gather analysis scripts are not available at plugins/must-gather/skills/must-gather-analyzer/scripts/. Please ensure the must-gather-analyzer skill is properly installed before running analysis.
9090
```
9191

9292
## Implementation
@@ -108,15 +108,15 @@ These provide the overall cluster state and identify system-wide issues.
108108

109109
1. **Cluster Version**
110110
```bash
111-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_clusterversion.py <must-gather-path>
111+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_clusterversion.py <must-gather-path>
112112
```
113113
- Identifies cluster version and update status
114114
- Shows if cluster is progressing through an update
115115
- Reveals capability configuration
116116

117117
2. **Cluster Operators**
118118
```bash
119-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_clusteroperators.py <must-gather-path>
119+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_clusteroperators.py <must-gather-path>
120120
```
121121
- Identifies degraded, unavailable, or progressing operators
122122
- **Critical**: Operator issues often cascade to other components
@@ -127,23 +127,23 @@ These analyze the underlying infrastructure supporting workloads.
127127

128128
3. **Nodes**
129129
```bash
130-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_nodes.py <must-gather-path>
130+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_nodes.py <must-gather-path>
131131
```
132132
- Shows node conditions (Ready, DiskPressure, MemoryPressure)
133133
- Identifies nodes with issues
134134
- **Critical**: Node problems affect all pods on that node
135135

136136
4. **Network**
137137
```bash
138-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_network.py <must-gather-path>
138+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_network.py <must-gather-path>
139139
```
140140
- Shows network type (OVN-Kubernetes, OpenShift SDN)
141141
- Checks network operator health
142142
- Validates pod network connectivity
143143

144144
5. **OVN Databases** (OVN-Kubernetes clusters only)
145145
```bash
146-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_ovn_dbs.py <must-gather-path>
146+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_ovn_dbs.py <must-gather-path>
147147
```
148148
- Analyzes OVN Northbound/Southbound databases from network_logs
149149
- Shows logical switches, switch ports, ACLs, and routers per node
@@ -153,8 +153,8 @@ These analyze the underlying infrastructure supporting workloads.
153153

154154
6. **Ingress and Routes**
155155
```bash
156-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_ingress.py <must-gather-path> --ingresscontrollers
157-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_ingress.py <must-gather-path> --routes --problems-only
156+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_ingress.py <must-gather-path> --ingresscontrollers
157+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_ingress.py <must-gather-path> --routes --problems-only
158158
```
159159
- Checks IngressController availability
160160
- Identifies routes not admitted
@@ -165,23 +165,23 @@ These analyze application workloads and their dependencies.
165165

166166
7. **Pods**
167167
```bash
168-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_pods.py <must-gather-path> --problems-only
168+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_pods.py <must-gather-path> --problems-only
169169
```
170170
- Shows crashlooping, pending, or failed pods
171171
- **Cross-reference**: Match pod issues with node and operator problems
172172
- Note which namespaces have the most issues
173173

174174
8. **Storage**
175175
```bash
176-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_pvs.py <must-gather-path>
176+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_pvs.py <must-gather-path>
177177
```
178178
- Shows PersistentVolume and PersistentVolumeClaim status
179179
- Identifies pending or unbound volumes
180180
- **Important**: Storage issues can cause pod failures
181181

182182
9. **MachineConfigPools**
183183
```bash
184-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_machineconfigpools.py <must-gather-path>
184+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_machineconfigpools.py <must-gather-path>
185185
```
186186
- Shows node configuration rollout status
187187
- Identifies stuck node updates
@@ -192,15 +192,15 @@ These provide insights into cluster stability and specific events.
192192

193193
10. **etcd Cluster**
194194
```bash
195-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_etcd.py <must-gather-path>
195+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_etcd.py <must-gather-path>
196196
```
197197
- Checks etcd member health and quorum
198198
- **Critical**: etcd issues can cause API server instability
199199
- Shows leader status and database size
200200

201201
11. **Events**
202202
```bash
203-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_events.py <must-gather-path> --type Warning --count 100
203+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_events.py <must-gather-path> --type Warning --count 100
204204
```
205205
- Shows warning events across the cluster
206206
- Helps identify recent problems and their timeline
@@ -211,7 +211,7 @@ These provide detailed error patterns from various log sources.
211211

212212
12. **Service Logs** (Master Node Services)
213213
```bash
214-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_servicelogs.py <must-gather-path> --errors-only
214+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_servicelogs.py <must-gather-path> --errors-only
215215
```
216216
- Analyzes kubelet and crio logs from systemd
217217
- **Note**: Only collected from master nodes in must-gather
@@ -220,18 +220,18 @@ These provide detailed error patterns from various log sources.
220220
13. **Pod Logs** (Container Application Logs)
221221
```bash
222222
# Start with problem namespaces identified in Phase 3
223-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_pod_logs.py <must-gather-path> --errors-only --top 5
223+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_pod_logs.py <must-gather-path> --errors-only --top 5
224224
225225
# Or analyze specific namespace
226-
# python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_pod_logs.py <must-gather-path> --namespace <namespace> --top 10
226+
# python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_pod_logs.py <must-gather-path> --namespace <namespace> --top 10
227227
```
228228
- Analyzes application container logs
229229
- Shows error patterns from failing components
230230
- **Cross-reference**: Match with pod failures from Phase 3
231231

232232
14. **Node Logs** (Kubelet Logs)
233233
```bash
234-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_node_logs.py <must-gather-path> --log-type kubelet --errors-only --top 5
234+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_node_logs.py <must-gather-path> --log-type kubelet --errors-only --top 5
235235
```
236236
- Analyzes kubelet logs from all nodes
237237
- **Note**: Kubelet logs are gzipped and extracted on-the-fly
@@ -504,16 +504,16 @@ When a specific namespace has issues:
504504
NAMESPACE="openshift-etcd"
505505
506506
# 1. Check pods in namespace
507-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_pods.py <mg-path> --namespace $NAMESPACE
507+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_pods.py <mg-path> --namespace $NAMESPACE
508508
509509
# 2. Check events in namespace
510-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_events.py <mg-path> --namespace $NAMESPACE
510+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_events.py <mg-path> --namespace $NAMESPACE
511511
512512
# 3. Analyze pod logs in namespace
513-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_pod_logs.py <mg-path> --namespace $NAMESPACE --show-warnings
513+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_pod_logs.py <mg-path> --namespace $NAMESPACE --show-warnings
514514
515515
# 4. Check PVCs in namespace
516-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_pvs.py <mg-path> --namespace $NAMESPACE
516+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_pvs.py <mg-path> --namespace $NAMESPACE
517517
```
518518

519519
### Node-Focused Investigation
@@ -524,16 +524,16 @@ When a specific node has issues:
524524
NODE="ip-10-0-45-79"
525525
526526
# 1. Check node status
527-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_nodes.py <mg-path> # Look for the node
527+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_nodes.py <mg-path> # Look for the node
528528
529529
# 2. Check pods on that node
530-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_pods.py <mg-path> # Note which pods are on that node
530+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_pods.py <mg-path> # Note which pods are on that node
531531
532532
# 3. Check node logs
533-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_node_logs.py <mg-path> --node $NODE --show-warnings
533+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_node_logs.py <mg-path> --node $NODE --show-warnings
534534
535535
# 4. Check kubelet errors specifically
536-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_node_logs.py <mg-path> --node $NODE --log-type kubelet --top 15
536+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_node_logs.py <mg-path> --node $NODE --log-type kubelet --top 15
537537
```
538538

539539
### Update/Upgrade Investigation
@@ -542,16 +542,16 @@ When investigating update issues:
542542

543543
```bash
544544
# 1. Check update status
545-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_clusterversion.py <mg-path>
545+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_clusterversion.py <mg-path>
546546
547547
# 2. Check MachineConfigPools (nodes updating?)
548-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_machineconfigpools.py <mg-path>
548+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_machineconfigpools.py <mg-path>
549549
550550
# 3. Check if operators progressing
551-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_clusteroperators.py <mg-path>
551+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_clusteroperators.py <mg-path>
552552
553553
# 4. Check for update-related events
554-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_events.py <mg-path> --type Warning
554+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_events.py <mg-path> --type Warning
555555
```
556556

557557
### OVN Network Investigation (OVN-Kubernetes clusters)
@@ -560,24 +560,24 @@ When investigating OVN networking issues:
560560

561561
```bash
562562
# 1. Check network operator status
563-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_network.py <mg-path>
563+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_network.py <mg-path>
564564
565565
# 2. Analyze OVN databases (all nodes)
566-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_ovn_dbs.py <mg-path>
566+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_ovn_dbs.py <mg-path>
567567
568568
# 3. Analyze specific node's OVN database
569-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_ovn_dbs.py <mg-path> --node <node-name>
569+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_ovn_dbs.py <mg-path> --node <node-name>
570570
571571
# 4. Run custom OVSDB query
572572
# Example: Find all ACLs with priority > 1000
573-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_ovn_dbs.py <mg-path> \
573+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_ovn_dbs.py <mg-path> \
574574
--query '["OVN_Northbound", {"op":"select", "table":"ACL", "where":[["priority", ">", 1000]], "columns":["priority","match","action"]}]'
575575
576576
# 5. Check OVN pods
577-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_pods.py <mg-path> --namespace openshift-ovn-kubernetes
577+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_pods.py <mg-path> --namespace openshift-ovn-kubernetes
578578
579579
# 6. Check OVN logs
580-
python3 .claude-plugin/skills/must-gather-analyzer/scripts/analyze_pod_logs.py <mg-path> --namespace openshift-ovn-kubernetes --show-warnings
580+
python3 plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_pod_logs.py <mg-path> --namespace openshift-ovn-kubernetes --show-warnings
581581
```
582582

583583
**Note**: OVN database analysis requires:

plugins/must-gather/skills/must-gather-analyzer/QUICK-REFERENCE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@ SUMMARY: X/Y resources healthy
208208

209209
All scripts located in:
210210
```
211-
.claude-plugin/skills/must-gather-analyzer/scripts/
211+
plugins/must-gather/skills/must-gather-analyzer/scripts/
212212
```
213213

214214
## Documentation
215215

216-
- Full guide: `.claude-plugin/README.md`
217-
- Skill details: `.claude-plugin/skills/must-gather-analyzer/SKILL.md`
218-
- Comprehensive analysis: `.claude-plugin/commands/comprehensive-analysis.md`
219-
- This reference: `.claude-plugin/skills/must-gather-analyzer/QUICK-REFERENCE.md`
216+
- Full guide: `plugins/must-gather/README.md`
217+
- Skill details: `plugins/must-gather/skills/must-gather-analyzer/SKILL.md`
218+
- Comprehensive analysis: `plugins/must-gather/commands/comprehensive-analysis.md`
219+
- This reference: `plugins/must-gather/skills/must-gather-analyzer/QUICK-REFERENCE.md`

plugins/must-gather/skills/must-gather-analyzer/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Use `/comprehensive-analysis` command or automation script for complete cluster
2626
- Generates detailed report with executive summary
2727
- Cross-references issues across components
2828
- Provides root cause analysis and recommendations
29-
- See `.claude-plugin/commands/comprehensive-analysis.md` for details
29+
- See `plugins/must-gather/commands/comprehensive-analysis.md` for details
3030

3131
## Overview
3232

plugins/must-gather/skills/must-gather-analyzer/scripts/analyze_ingress.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -187,13 +187,6 @@ def print_route_table(route_list: List[Dict[str, str]], namespace_filter: str =
187187
print("No Routes found.")
188188
return
189189

190-
# Filter by namespace if specified
191-
if namespace_filter:
192-
route_list = [r for r in route_list if r['namespace'] == namespace_filter]
193-
if not route_list:
194-
print(f"No Routes found in namespace '{namespace_filter}'.")
195-
return
196-
197190
# Print header
198191
print(f"{'NAMESPACE':<30} {'NAME':<40} {'HOST':<80} {'ADMITTED':<10} AGE")
199192

@@ -323,14 +316,18 @@ def analyze_routes(must_gather_path: str, namespace: str = None, problems_only:
323316
# Format routes
324317
route_info_list = [format_route(route, ns) for ns, route in routes]
325318

319+
# Filter by namespace if specified
320+
if namespace:
321+
route_info_list = [r for r in route_info_list if r['namespace'] == namespace]
322+
326323
# Filter problems only
327324
if problems_only:
328325
route_info_list = [r for r in route_info_list if r['admitted'] != 'True']
329326

330327
# Sort by namespace, then name
331328
route_info_list.sort(key=lambda r: (r['namespace'], r['name']))
332329

333-
# Print table
330+
# Print table (no longer needs to filter by namespace)
334331
print_route_table(route_info_list, namespace)
335332

336333
# Summary

0 commit comments

Comments
 (0)