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

Control plane init generates userdata larger than max user data size in AWS #510

Open
ttreptow opened this issue Dec 2, 2024 · 0 comments
Labels
kind/bug Something isn't working needs-priority Indicates an issue or PR needs a priority assigning to it needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.

Comments

@ttreptow
Copy link

ttreptow commented Dec 2, 2024

What happened:

Creating a new cluster with rke2 provider v0.8.0, the AWSMachine fails to come up due to the error

"failed to create AWSMachine instance: failed to run instance: InvalidParameterValue: Encoded User data is limited to 25600 bytes"

It mostly seems to affect the first control plane node since the userdata for that node (control plane init) is larger.

Note that the limit is 25600 base64 encoded or around 16k unencoded. This is easily exceeded due to the certs included in the user data as well as rke2 config and any start up scripts needed.

What did you expect to happen:

First node comes up without error

How to reproduce it:

Create an RKE2 cluster using rke2 provider v0.8.0 and cluster-api AWS (CAPA)

Anything else you would like to add:
cloud-init supports gzipped userdata. If i manually replace the generated data with base64 encoded gzipped data, then the node comes up fine. I think the fix would be to always gzip cloud-init userdata.

Environment:

  • rke provider version: v0.8.0
  • OS (e.g. from /etc/os-release): ubuntu 22.04 LTS
@ttreptow ttreptow added kind/bug Something isn't working needs-priority Indicates an issue or PR needs a priority assigning to it needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Dec 2, 2024
@ttreptow ttreptow changed the title Control plane init generates userdata larger than max suer data size in AWS Control plane init generates userdata larger than max user data size in AWS Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working needs-priority Indicates an issue or PR needs a priority assigning to it needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one.
Projects
None yet
Development

No branches or pull requests

1 participant