Skip to content

nocloud: cannot load user-data from vfat cidata #12647

@sudomateo

Description

@sudomateo

Bug Report

Description

Talos NoCloud v1.12 does not load user-data via a vfat cidata volume. Talos NoCloud v1.11 works just fine. Here's the error but full logs are below.

[    9.186735] [talos] controller failed {"component": "controller-runtime", "controller": "config.AcquireController", "error": "error acquiring via platform nocloud: failed to mount volume: openfs failed: failed to create root filesystem: FSCONFIG_CMD_CREATE failed: permission denied"}

Oxide uses vfat volumes to provide cloud init configuration to instances. It appears that Talos NoCloud v1.12 attempts to mount iso9660 volumes as read-only and vfat volumes as read-write, leading to the error.

// defaultOpts applies default options for filesystems.
func defaultOpts(fstype string, opts ...Option) []Option {
if fstype == "iso9660" {
opts = append(
opts,
WithBoolParameter("ro"),
)
}
return opts
}

# lsblk -f
NAME         FSTYPE FSVER LABEL           UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
vda          vfat   FAT12 cidata          1234-5678

When I create the following diff on top of v1.12.2 and rebuild a Talos Linux image, everything works.

diff --git a/internal/app/machined/pkg/runtime/v1alpha1/platform/internal/blockutils/blockutils.go b/internal/app/machined/pkg/runtime/v1alpha1/platform/internal/blockutils/blockutils.go
index ae80a71620..eef9410e8f 100644
--- a/internal/app/machined/pkg/runtime/v1alpha1/platform/internal/blockutils/blockutils.go
+++ b/internal/app/machined/pkg/runtime/v1alpha1/platform/internal/blockutils/blockutils.go
@@ -154,6 +154,7 @@
                mount.WithFsopen(
                        volumeStatus.TypedSpec().Filesystem.String(),
                        fsopen.WithSource(volumeStatus.TypedSpec().MountLocation),
+                       fsopen.WithBoolParameter("ro"),
                ),
                mount.WithDetached(),
        )

Logs

talos.log

Environment

  • Talos version: v1.12.2
  • Kubernetes version: N/A
  • Platform: NoCloud

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions