Skip to content

Conversation

@joshfrench
Copy link
Contributor

@joshfrench joshfrench commented Nov 24, 2025

What type of PR is this?
/kind bug

What this PR does / why we need it:
When EKSConfigTemplate.spec.template.spec.files is empty, the resulting cloud config is invalid:

#cloud-config
write_files:
runcmd:
  - /etc/eks/bootstrap.sh cluster-name
cloud-init status --long
status: error
extended_status: error - done
boot_status_code: enabled-by-generator
last_update: Thu, 01 Jan 1970 00:25:50 +0000
detail: Failed due to systemd unit failure
errors:
        - ('write_files', TypeError("'NoneType' object is not iterable"))

Special notes for your reviewer:

This may only be an issue on newer versions of cloud-init (or maybe the underlying system Python?) We've been using CAPA for years and only saw this problem after updating our AMIs to Ubuntu 24.04:

cloud-init --version
/usr/bin/cloud-init 25.2-0ubuntu1~24.04.1

Checklist:

  • squashed commits
  • includes documentation
  • includes emoji in title
  • adds unit tests
  • adds or updates e2e tests

Release note:

Fixes invalid cloud-config when EKS config has no files.

skip this field entirely if no files are given
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Nov 24, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign nrb for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 24, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @joshfrench. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 24, 2025
@joshfrench joshfrench changed the title write_files: nil is invalid cloud-config 🐛 write_files: nil is invalid cloud-config Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants