rancher / k3os

Purpose-built OS for Kubernetes, fully managed by Kubernetes.
https://k3os.io
Apache License 2.0
3.5k stars 401 forks source link

Install fails with "argument list too long" #757

Open sameersbn opened 3 years ago

sameersbn commented 3 years ago

Version (k3OS / kernel)

k3os version  v0.20.7-k3s1r0
5.4.0-73-generic #82 SMP Thu Jan 3 02:29:43 UTC 2021

Architecture

x86_64

Describe the bug

Trying to deploy knative serving and eventing manifests using the write_files directives in config.yaml throws the error message ERRO[0000] fork/exec /usr/libexec/k3os/install: argument list too long at boot.

To Reproduce

  1. Prepare the iso base
sudo mount -o loop k3os-amd64.iso /mnt/

mkdir ~/k3os
cd ~/k3os
mkdir -p iso/boot/grub
cp -rf /mnt/k3os iso/
cp /mnt/boot/grub/grub.cfg iso/boot/grub/
  1. create the config.yaml file using
cat > iso/k3os/system/config.yaml <<EOF
k3os:
  k3s_args:
  - "--no-deploy=traefik"

write_files:
- encoding: gz+b64
  content: $(curl -sL https://github.com/knative/serving/releases/download/v0.25.0/serving-crds.yaml | gzip -c  | base64)
  owner: root
  path: /var/lib/rancher/k3s/server/manifests/knative/serving-crds.yaml
  permissions: '0644'
- encoding: gz+b64
  content: $(curl -sL https://github.com/knative/serving/releases/download/v0.25.0/serving-core.yaml | sed '/^[ ]*defaultExternalScheme: .*/a \\n  ingress.class: "kourier.ingress.networking.knative.dev"' | gzip -c  | base64)
  owner: root
  path: /var/lib/rancher/k3s/server/manifests/knative/serving-core.yaml
  permissions: '0644'
- encoding: gz+b64
  content: $(curl -sL https://github.com/knative/net-kourier/releases/download/v0.25.0/kourier.yaml | gzip -c  | base64)
  owner: root
  path: /var/lib/rancher/k3s/server/manifests/knative/kourier.yaml
  permissions: '0644'
- encoding: gz+b64
  content: $(curl -sL https://github.com/knative/serving/releases/download/v0.25.0/serving-default-domain.yaml | gzip -c  | base64)
  owner: root
  path: /var/lib/rancher/k3s/server/manifests/knative/serving-default-domain.yaml
  permissions: '0644'
- encoding: gz+b64
  content: $(curl -sL https://github.com/knative/eventing/releases/download/v0.25.0/eventing-crds.yaml | gzip -c  | base64)
  owner: root
  path: /var/lib/rancher/k3s/server/manifests/knative/eventing-crds.yaml
  permissions: '0644'
- encoding: gz+b64
  content: $(curl -sL https://github.com/knative/eventing/releases/download/v0.25.0/eventing-core.yaml | gzip -c  | base64)
  owner: root
  path: /var/lib/rancher/k3s/server/manifests/knative/eventing-core.yaml
  permissions: '0644'
EOF
  1. Generate the ISO image
grub-mkrescue -o k3os-custom.iso iso/ -- -volid K3OS
  1. Boot a VM (2 vcpus, 4Gb RAM) with the remastered ISO and select Install from the grub menu

Expected behavior

The installation should complete successfully and knative should be deployed when VM is rebooted.

Actual behavior

Boot/Install errors out with the message ERRO[0000] fork/exec /usr/libexec/k3os/install: argument list too long

Additional context