canonical / canonical/cloud-init

[mostly docs]: Vendor data scripts not explained well

Open
#5,765 0 comments 1 reaction 0 assignees View on GitHub
documentation
Dominant language
Python
Stars
3.8k
Forks
1.1k
Avg merge
2d 23h
Merged PRs (30d)
18

Description

Looking at [https://docs.cloud-init.io/en/latest/reference/modules.html#scripts-vendor](https://docs.cloud-init.io/en/latest/reference/modules.html#scripts-vendor),

> Any scripts in the scripts/vendor directory in the datasource will be run when a new instance is first booted. Scripts will be run in alphabetical order.

What does "in the datasource" mean? How would a user know if this refers to `/var/lib/cloud/scripts/vendor` or `/var/lib/cloud/instance/scripts/vendor`? It is in fact `/var/lib/cloud/instance/scripts/vendor`, so why are we even providing this detail as it's an implementation detail of vendor data? Vendors can't put their own scripts there unless they were to know the uuid of the instance before the instance launched.

> This module allows control over the execution of vendor data.

This might be overly pedantic, but it allows control over the **processing** of vendor data. If a script sits in that directory, it'll get run regardless, but `{vendor_data: {enabled: False}}` means we're never write out the script in the first place, not that the directory won't get executed.

Also, I don't see why `/var/lib/cloud/scripts/vendor` exists. I don't see it being used anywhere and if I drop a script in there it does not get run on boot.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.