PEM-9121: recreate virt-v2v pod on rerun so LUKS mount is picked up - #47
PEM-9121: recreate virt-v2v pod on rerun so LUKS mount is picked up#47anujmandal-dev wants to merge 1 commit into
Conversation
EnsureGuestConversionPod queried existing conversion pods with the migration label stripped and skipped pod creation whenever any pod was found. When a migration failed because spec.vms[].luks.name was not set on the plan, the failed virt-v2v pod (created without the /etc/luks mount) was reused on rerun, so the migration kept failing with "could not read key from user" even after the LUKS secret was added. Look up conversion pods scoped to the current migration UID first; if none exists, delete any stale conversion pods for this plan+VM from prior attempts before creating a fresh pod so the current plan spec (including the LUKS secret volume mount) is applied. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
- GO-2026-4958
- Module: github.com/moby/spdystream
- Found in: v0.5.0
- Fixed in: v0.5.1
- Example Traces:
1. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdy.newConnection
2. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdy.NewClientConnectionWithPings
3. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdystream.NewConnection
4. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdystream.ReadFrame
- GO-2026-5026
- Module: golang.org/x/net
- Found in: v0.43.0
- Fixed in: v0.55.0
- Example Traces:
1. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http2.authorityAddr
- GO-2026-4918
- Module: golang.org/x/net
- Found in: v0.43.0
- Fixed in: v0.53.0
- Example Traces:
1. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http.roundTrip
2. pkg/controller/plan/adapter/vsphere/client.go:180:32: vsphere.Close calls soap.CloseIdleConnections, which eventually calls http2.run
3. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http.roundTrip
4. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http.roundTrip
- GO-2024-2955
- Module: github.com/gin-contrib/cors
- Found in: v1.3.1
- Fixed in: v1.6.0
- Example Traces:
1. pkg/lib/inventory/web/web.go:45:21: web.Start calls cors.New, which eventually calls web.Start
Please review these findings and fix the issues before merging.
There was a problem hiding this comment.
- GO-2026-4958
- Module: github.com/moby/spdystream
- Found in: v0.5.0
- Fixed in: v0.5.1
- Example Traces:
1. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdystream.ReadFrame
2. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdy.newConnection
3. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdy.NewClientConnectionWithPings
4. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdystream.NewConnection
- GO-2026-4918
- Module: golang.org/x/net
- Found in: v0.43.0
- Fixed in: v0.53.0
- Example Traces:
1. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http.roundTrip
2. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http.roundTrip
3. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http.roundTrip
4. pkg/controller/plan/adapter/vsphere/client.go:180:32: vsphere.Close calls soap.CloseIdleConnections, which eventually calls http2.run
- GO-2024-2955
- Module: github.com/gin-contrib/cors
- Found in: v1.3.1
- Fixed in: v1.6.0
- Example Traces:
1. pkg/lib/inventory/web/web.go:45:21: web.Start calls cors.New, which eventually calls web.Start
- GO-2026-5026
- Module: golang.org/x/net
- Found in: v0.43.0
- Fixed in: v0.55.0
- Example Traces:
1. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http2.authorityAddr
Please review these findings and fix the issues before merging.
|
Hi @anujmandal-dev Changes look good. Have you tested out these changes? |
|
This pull request is stale because it has been open for 15 days with no activity. |
|
This pull request was closed because it has been inactive for 15 days since being marked as stale. |
There was a problem hiding this comment.
- GO-2026-5970
- Module: golang.org/x/text
- Found in: v0.28.0
- Fixed in: v0.39.0
- Example Traces:
1. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls idna.validateRegistration
2. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls idna.validateAndMap
3. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls idna.validateAndMap
4. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls idna.validateAndMap
- GO-2024-2955
- Module: github.com/gin-contrib/cors
- Found in: v1.3.1
- Fixed in: v1.6.0
- Example Traces:
1. pkg/lib/inventory/web/web.go:45:21: web.Start calls cors.New, which eventually calls web.Start
- GO-2026-4918
- Module: golang.org/x/net
- Found in: v0.43.0
- Fixed in: v0.53.0
- Example Traces:
1. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http.roundTrip
2. pkg/controller/plan/adapter/vsphere/client.go:180:32: vsphere.Close calls soap.CloseIdleConnections, which eventually calls http2.run
3. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http.roundTrip
4. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http.roundTrip
- GO-2026-5026
- Module: golang.org/x/net
- Found in: v0.43.0
- Fixed in: v0.55.0
- Example Traces:
1. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http2.authorityAddr
- GO-2026-4958
- Module: github.com/moby/spdystream
- Found in: v0.5.0
- Fixed in: v0.5.1
- Example Traces:
1. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdystream.NewConnection
2. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdystream.ReadFrame
3. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdy.newConnection
4. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdy.NewClientConnectionWithPings
Please review these findings and fix the issues before merging.
There was a problem hiding this comment.
- GO-2026-5970
- Module: golang.org/x/text
- Found in: v0.28.0
- Fixed in: v0.39.0
- Example Traces:
1. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls idna.validateAndMap
2. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls idna.validateRegistration
3. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls idna.validateAndMap
4. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls idna.validateAndMap
- GO-2026-4918
- Module: golang.org/x/net
- Found in: v0.43.0
- Fixed in: v0.53.0
- Example Traces:
1. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http.roundTrip
2. pkg/controller/plan/adapter/vsphere/client.go:180:32: vsphere.Close calls soap.CloseIdleConnections, which eventually calls http2.run
3. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http.roundTrip
4. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http.roundTrip
- GO-2026-4958
- Module: github.com/moby/spdystream
- Found in: v0.5.0
- Fixed in: v0.5.1
- Example Traces:
1. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdystream.NewConnection
2. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdy.NewClientConnectionWithPings
3. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdy.newConnection
4. tests/suit/framework/exec_util.go:74:16: framework.ExecWithOptions calls framework.execute, which eventually calls spdystream.ReadFrame
- GO-2024-2955
- Module: github.com/gin-contrib/cors
- Found in: v1.3.1
- Fixed in: v1.6.0
- Example Traces:
1. pkg/lib/inventory/web/web.go:45:21: web.Start calls cors.New, which eventually calls web.Start
- GO-2026-5026
- Module: golang.org/x/net
- Found in: v0.43.0
- Fixed in: v0.55.0
- Example Traces:
1. pkg/controller/plan/adapter/ovirt/client.go:180:34: ovirt.PowerOn calls go-ovirt.Send, which eventually calls http2.authorityAddr
Please review these findings and fix the issues before merging.
Summary
spec.vms[].luks.nameis missing, adding the LUKS secret and rerunning did not recover — the failedvirt-v2vpod (created without the/etc/luksmount) was reused and the samecould not read key from usererror kept surfacing.EnsureGuestConversionPodnow looks up conversion pods scoped to the current migration UID first; if none exists, it deletes any stale conversion pods for the same plan+VM from prior attempts before creating a fresh pod, so the current plan spec (including the LUKS secret volume) is applied.reserveConversionPodSlotand covered by three unit tests.Test plan
go build ./pkg/controller/plan/...go test ./pkg/controller/plan/ -run TestPlan -count=1— 88/88 specs pass (3 new)luks.name, start migration, wait for failure, addluks.nameto plan, rerun, confirm a new pod is created with/etc/luksmounted and the migration succeedsNotes
PEM-9121(Sharada's Feb-23 commit, no PR opened). This PR takes a broader approach — scoping the pod lookup by migration UID rather than only deleting Failed/Succeeded pods — and adds tests.🤖 Generated with Claude Code