Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
markdryan opened this issue Mar 1, 2018 · 0 comments
Open

Comments

@markdryan
Copy link
Contributor

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.

@markdryan markdryan changed the title UCD should impose an order on the sections of the user-data file UCD should impose an order on the modules of the user-data file Mar 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant