Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

UCD should impose an order on the modules of the user-data file #30

@markdryan

Description

@markdryan

The top level of a user-data file is a YAML mapping. YAML mappings are not ordered. Despite this, UCD processes the modules in the user data file in the order they appear in the file. This is problematic for a number of reasons.

  1. It's just luck, or rather a side effect of the YAML parser used, that it works. The YAML document defines no explicit ordering.

  2. Other implementations of cloud-init do not do this. As the YAML document does not contain any ordering information, they rely on a separate configuration file, e.g., /etc/cloud/cloud.cfg, to determine which modules to run and in what order. The implications of this is that you cannot safely use an Ubuntu or a Fedora user data file on Clearlinux as the chances are, the modules will run in an unexpected order on Clear.

  3. It's not possible to use a tool generated cloud-init file with Clearlinux. As a mapping has no ordering, yaml marshalers tend to generate yaml files in which mapping elements are written out in alphabetical order. This means that tools such as ccloudvm, that generate user data files, will run into issues when using UCD in Clearlinux. Users of these tools have no way to control the ordering of modules in the final user data file. This shouldn't be a problem as the ordering should be meaningless. Unfortunately, in UCD the order does have a meaning, so there's an issue.

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