Skip to content

Commit eb6eb66

Browse files
mcanevetsmira
authored andcommitted
fix(machined): support USERDATA legacy fallback in OpenNebula driver
The reference does USER_DATA="${USER_DATA:-${USERDATA}}". Talos only read USER_DATA, silently returning ErrNoConfigSource when a VM used the legacy USERDATA variable name. Signed-off-by: Mickaël Canévet <mickael.canevet@proton.ch> Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com> (cherry picked from commit cff0f57)
1 parent ba20c7c commit eb6eb66

File tree

1 file changed

+5
-0
lines changed
  • internal/app/machined/pkg/runtime/v1alpha1/platform/opennebula

1 file changed

+5
-0
lines changed

internal/app/machined/pkg/runtime/v1alpha1/platform/opennebula/opennebula.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,11 @@ func (o *OpenNebula) Configuration(ctx context.Context, r state.State) (machineC
865865
}
866866

867867
userData, ok := oneContext["USER_DATA"]
868+
if !ok {
869+
// Legacy fallback: reference does USER_DATA="${USER_DATA:-${USERDATA}}".
870+
userData, ok = oneContext["USERDATA"]
871+
}
872+
868873
if !ok {
869874
return nil, errors.ErrNoConfigSource
870875
}

0 commit comments

Comments
 (0)