kata-containers / kata-containers

Kata Containers is an open source project and community working to build a standard implementation of lightweight Virtual Machines (VMs) that feel and perform like containers, but provide the workload isolation and security advantages of VMs. https://katacontainers.io/
Apache License 2.0
5.08k stars 1k forks source link

CI: nightly `kata-containers-ci-on-push / run-kata-deploy-tests-on-aks / run-kata-deploy-tests (ubuntu, qemu-runtime-rs)` failing #9850

Open wainersm opened 1 week ago

wainersm commented 1 week ago

Nightly kata-containers-ci-on-push / run-kata-deploy-tests-on-aks / run-kata-deploy-tests (ubuntu, qemu-runtime-rs) has always failed because the cluster name is too big, exceeding the limit of chars of AKS...

{
  "id": "/subscriptions/***/resourceGroups/kataCI-kata-deploy-nightly-f66a5b628725-qemu-runtime-rs-ubuntu-amd64-s-o",
  "location": "eastus",
  "managedBy": null,
  "name": "kataCI-kata-deploy-nightly-f66a5b628725-qemu-runtime-rs-ubuntu-amd64-s-o",
  "properties": {
    "provisioningState": "Succeeded"
  },
  "tags": null,
  "type": "Microsoft.Resources/resourceGroups"
}
WARNING: The behavior of this command has been altered by the following extension: aks-preview
ERROR: --name cannot exceed 63 characters and can only contain letters, numbers, or dashes (-).
wainersm commented 1 week ago

One thing that I didn't understand is why it provisioned a cluster with:

kataCI-kata-deploy-nightly-56423cbbfe66-dragonball-ubuntu-amd64-s-o

and not

kataCI-kata-deploy-nightly-56423cbbfe66-qemu-runtime-rs-ubuntu-amd64-s-o

Because both characters count exceed 63:

$ echo -n kataCI-kata-deploy-nightly-56423cbbfe66-dragonball-ubuntu-amd64-s-o | wc -m
67
$ echo -n kataCI-kata-deploy-nightly-56423cbbfe66-qemu-runtime-rs-ubuntu-amd64-s-o | wc -m
72

Now, if one assume that special characters aren't counted (e.g. dash) then both are below the 63 chars limit:

$ echo -n kataCI-kata-deploy-nightly-56423cbbfe66-dragonball-ubuntu-amd64-s-o | tr -d '-' | wc -m
58
$ echo -n kataCI-kata-deploy-nightly-56423cbbfe66-qemu-runtime-rs-ubuntu-amd64-s-o | tr -d '-' | wc -m
61

Interestingly I can create a cluster with kataCIkatadeploynightly56423cbbfe66qemuruntimersubuntuamd64so (removed the dashes )