Skip to content

cloud-init warning: "Kubernetes is trying to restart cloud-init" #1957

@AndiDog

Description

@AndiDog

Environment

  • Make target: make build-ami-ubuntu-2404
  • Run using container image? (Y/N): N
  • Vars file:
{
    "kubernetes_deb_version": "1.35.2-1.1",

    "kubernetes_semver": "v1.35.2",
    "kubernetes_series": "v1.35",


    "ami_regions": "eu-north-1",
    "aws_region": "eu-north-1",


    "ami_groups": "",
    "snapshot_groups": "",


    "build_name": "ubuntu-24.04-andreas-capi-testing"
}

What steps did you take and what happened?

While testing the image built for Ubuntu 24.04 with this change, I noticed this deprecation warning:

[...]
[2026-03-17 21:40:40] 2026-03-17 21:40:40,590 - user_data.py[WARNING]: [Errno 2] No such file or directory: '/etc/secret-userdata.txt' for url: file:///etc/secret-userdata.txt
[2026-03-17 21:40:40] 2026-03-17 21:40:40,597 - DataSourceEc2Kubernetes.py[WARNING]: Kubernetes is trying to restart cloud-init. This is no longer necessary and is temporarily circumvented by cloud-init. This will be a hard error in the future.
[2026-03-17 21:40:40] +++ [2026-03-17T21:40:40+00:00] aws.cluster.x-k8s.io encrypted cloud-init script /var/lib/cloud/instances/i-07f48c11381a26593/boothooks/part-001 started
[...]

This was already mentioned as a problem here. Let's check if this is a regression and how to avoid it.

What did you expect to happen?

No cloud-init warnings

Anything else you would like to add?


/kind bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions