Skip to content

Sweep row user_data: is parsed and then discarded on the foreground path #1327

Closed

Description

@scttfrdmn

Found while fixing #1242 (choosing how a converted Slurm script should reach the instance). Verified in code and by calling the real functions, not on AWS.

user_data is a recognised param-file row key (recognizedRowKeys, cmd/sweep_keys.go), and buildLaunchConfigFromParams stores it in config.UserData (cmd/sweep.go, case "user_data"). The foreground sweep path then overwrites that field for every row, unconditionally:

// cmd/launch_sweep.go, "Build user-data for each config"
userDataScript, err := buildUserData(plat, cfg, "", nil)
...
cfg.UserData = encodeUserDataForOS(userDataScript, cfg.TargetOS)

buildUserData takes custom user data only from the --user-data / --user-data-file flags (resolveCustomUserData), never from config.UserData. The detached path ignores the key too: the orchestrator sets no UserData at all (#1323).

Probe (temporary in-package test, main @ 121e3d5): a row {"user_data": "echo ROW-UD-MARKER"} → buildLaunchConfigFromParams gives UserData="echo ROW-UD-MARKER" → buildUserData → the marker is not in the final user data.

So a row's user_data: is accepted, listed as a recognised key, and silently does nothing on either path. Nothing launches that would not otherwise launch, so there is no cost; the workload just never runs. Either pass the row value through as the bootstrap's CustomUserData, or reject the key with a message pointing at command:.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions