Skip to content

Allow cloud-config to Work on Distros with Read-Only /usr Partitions - #253

Open
justdan96 wants to merge 2 commits into
rancher:masterfrom
justdan96:master
Open

Allow cloud-config to Work on Distros with Read-Only /usr Partitions#253
justdan96 wants to merge 2 commits into
rancher:masterfrom
justdan96:master

Conversation

@justdan96

Copy link
Copy Markdown

This PR is to allow cloud-config to work on distros with read-only /usr partitions, such as Flatcar. It simply changes the hard-coded path from under the /usr tree to under the /var/run tree, which is more portable.

Please note that without this change bootstrapping Flatcar RKE2 nodes in Rancher is not possible.

@rvdh

rvdh commented Sep 23, 2024

Copy link
Copy Markdown

@jiaqiluo @kinarashah Could this get some attention? :) Running into this issue as well.

@jiaqiluo
jiaqiluo requested a review from a team September 24, 2024 17:30
Comment thread commands/create.go
command := "sh"
path := "/usr/local/custom_script/install.sh"
// allow the script to work on distros with read-only /usr partitions
path := "/var/run/install.sh"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path := "/var/run/install.sh"
path := "/opt/rancher-system-agent/install.sh"

I believe we install the system agent within that directory anyway if /usr is not writable, so I'd rather reuse that if possible.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That path wouldn't exist on the machine initially. /var/run is the most portable path that could be used, since it will definitely exist and will always be writable.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jakefhyde are you happy with the PR as-is?

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

Successfully merging this pull request may close these issues.

3 participants