← Back to Pull requests

Enhance govc Relocate Volume command #4122

Closed
unknown closed this pull request without merging on Sep 02, 2026 05:08 UTC
View on GitHub
unknown unknown commented on Aug 28, 2026 12:04 UTC
Author

Description

The govc volume.relocate command has been enhanced to:

1. Accept an optional input CSV file containing a list of volume IDs and optional target datastores.
2. Print the CNS opid, if applicable.
3. Print error information (fault or task info) to the log file.
4. Accept an optional log file path input, defaulting to relocate.log in the current working directory.
5. Provide a tabular summary of the relocation operation results.

Testing Done: Manually tested these changes running volume.relocate command with different options.

Closes: #(issue-number) None

How Has This Been Tested?

Verified by running volume.relocate command with the existing and newly introduced optional parameters.
govc volume.relocate -ds vsanDatastore f75989dc-95b9-4db7-af96-8583f24bc59d
govc volume.relocate -ds vsanDatastore id1 id2 id3
govc volume.relocate -file volumes.csv
govc volume.relocate -ds vsanDatastore -file volumes.csv
govc volume.relocate -ds vsanDatastore -log-file /var/log/relocate.log id1
govc volume.relocate -ds vsanDatastore -file volumes.csv -log-file /var/log/relocate.log

<img width="1089" height="167" alt="Screenshot 2026-09-01 at 1 22 13 PM" src="https://github.com/user-attachments/assets/8962d500-0d85-49a2-ac11-5c084560a92f" />

Unit test results:
[ss028541@lvn-dbc2461 govmomi]$ go test ./cli/volume/... -run TestRelocate -v
=== RUN TestRelocateEntriesFromFile_NoHeader
--- PASS: TestRelocateEntriesFromFile_NoHeader (0.00s)
=== RUN TestRelocateEntriesFromFile_WithDatastore
--- PASS: TestRelocateEntriesFromFile_WithDatastore (0.00s)
=== RUN TestRelocateEntriesFromFile_HeaderRowSkippedAndWarned
--- PASS: TestRelocateEntriesFromFile_HeaderRowSkippedAndWarned (0.00s)
=== RUN TestRelocateEntriesFromFile_NonUUIDFirstRowWarns
--- PASS: TestRelocateEntriesFromFile_NonUUIDFirstRowWarns (0.00s)
=== RUN TestRelocateEntriesFromFile_Empty
--- PASS: TestRelocateEntriesFromFile_Empty (0.00s)
=== RUN TestRelocateEntriesFromFile_MissingFile
--- PASS: TestRelocateEntriesFromFile_MissingFile (0.00s)
=== RUN TestRelocateResultCounts
--- PASS: TestRelocateResultCounts (0.00s)
PASS
ok github.com/vmware/govmomi/cli/volume 0.007s
? github.com/vmware/govmomi/cli/volume/snapshot [no test files]

Guidelines

Please read and follow the CONTRIBUTION [guidelines] of this project.

[guidelines]: https://github.com/vmware/govmomi/blob/main/CONTRIBUTING.md

Diff: 313 lines (+234 / -79) across 3 files Reviewer: chethanv28 Review duration: 6783m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 313 lines diff across 3 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
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.344
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4122"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% 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: 40.3% (MEDIUM) · Higher = larger blast radius
40.3%
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: 60.5% · Lower = rushed or shallow review
60.5%
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: 15.9% · Safe to merge
15.9%
Repository