You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
resolveImage now routes through the cluster-access seam, so VM
create's storageClass resolution is no longer local-only. Update the
localOnlyErr doc + error message and the remote-client field comment
to say the remaining local-only part is the full VM create
orchestration (the VM CRUD lifecycle isn't routed yet), per review.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RC3BDHCFmJBdxvGVW69FAr
Copy file name to clipboardExpand all lines: dc-api/internal/providers/harvester/client.go
+7-6Lines changed: 7 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -116,26 +116,27 @@ type Client struct {
116
116
// - GetVM's VMI IP enrichment read DEGRADES GRACEFULLY: it is SKIPPED (the
117
117
// `c.dynamic == nil` guard returns the agent-supplied VM status WITHOUT IP
118
118
// enrichment — no error), so a remote VM's status is still reported.
119
-
// - the genuinely local-only ops — the cloud-provider SA bootstrap and VM
120
-
// create's local storageClass resolution — have no direct path and return a
119
+
// - the genuinely local-only ops — the cloud-provider SA bootstrap and the
120
+
// full VM create orchestration — have no direct path and return a
121
121
// clear local-only error (localOnlyErr) naming the zone instead of panicking
122
122
// on a nil dynamic client.
123
123
// Empty for the LOCAL client → today's behaviour.
124
124
remoteRegion, remoteZonestring
125
125
}
126
126
127
127
// localOnlyErr is returned by a REMOTE client's direct-only methods: VM create
128
-
// (which resolves the image storageClass — see CreateVM's note) and the
128
+
// (the full create orchestration is not yet routed — see CreateVM's note) and the
129
129
// cloud-provider SA bootstrap. These touch c.dynamic, which a remote client does
130
130
// not have. Failing here — BEFORE a PENDING row or a provisioner call — is the
131
131
// documented local-only constraint for the remote-zone build. NOTE: image
132
132
// resolution/import (resolveImage, CreateImage) and the collection reads are NO
133
133
// LONGER local-only — they route through the cluster-access seam (c.access), so a
134
-
// remote client serves them via the agent; only VM create's storageClass lookup
135
-
// and the SA bootstrap remain behind this explicit error.
134
+
// remote client serves them via the agent. resolveImage's storageClass lookup
135
+
// routes too; only the full VM create orchestration and the SA bootstrap remain
136
+
// behind this explicit error.
136
137
func (c*Client) localOnlyErr(opstring) error {
137
138
returnfmt.Errorf(
138
-
"%s is not supported for remote zone %s/%s yet: dc-api holds no direct Harvester credentials there (VM create's storageClass resolution and the cloud-provider SA bootstrap are local-only for now)",
139
+
"%s is not supported for remote zone %s/%s yet: dc-api holds no direct Harvester credentials there (the full VM create orchestration and the cloud-provider SA bootstrap are local-only for now)",
0 commit comments