kops: After passing additional user-data instance won't start

  1. What kops version are you running? The command kops version, will display this information.
$ kops version
Version 1.8.1
  1. What Kubernetes version are you running? kubectl version will print the version if a cluster is running or provide the Kubernetes version specified as a kops flag.
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.3", GitCommit:"d2835416544f298c919e2ead3be3d0864b52323b", GitTreeState:"clean", BuildDate:"2018-02-09T21:51:06Z", GoVersion:"go1.9.4", Compiler:"gc", Platform:"darwin/amd64"}

Server Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.6", GitCommit:"6260bb08c46c31eea6cb538b34a9ceb3e406689c", GitTreeState:"clean", BuildDate:"2017-12-21T06:23:29Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
  1. What cloud provider are you using? AWS

  2. What commands did you run? What is the simplest way to reproduce this issue? I tried passing in additional user data to a instance group by following this doc This is how my ig manifest looks like

apiVersion: kops/v1alpha2
kind: InstanceGroup
metadata:
  creationTimestamp: 2018-01-30T19:38:43Z
  labels:
    kops.k8s.io/cluster: test.mycluster.xyz.com
  name: master-us-east-1b
spec:
  additionalUserData:
  - name: myscript.sh
    type: text/x-shellscript
    content: |
      #!/bin/sh
      echo "Hello World.  The time is now $(date -R)!" | tee /root/output.txt
  image: 595879546273/CoreOS-stable-1576.5.0-hvm
  machineType: t2.medium
  maxSize: 1
  minSize: 1
  nodeLabels:
    kops.k8s.io/instancegroup: master-us-east-1b
  role: Master
  subnets:
  - us-east-1b
  1. What happened after the commands executed? When I update the cluster, it does launch the new instance. However, the instance stays in initializing state. I’m not able to ssh into the instance either. In system logs from AWS console getting following:
[    3.245311] systemd[1]: Failed to start Ignition (disks).
         [    3.247631] ignition[393]: no config URL provided
[    3.248334] systemd[1]: Dependency failed for Initrd Default Target.
[    3.248922] systemd[1]: initrd.target: Job initrd.target/start failed with result 'dependency'.
[    3.249895] systemd[1]: initrd.target: Triggering OnFailure= dependencies.
[    3.250967] systemd[1]: Dependency failed for Ignition (files).
[    3.251805] ignition[393]: error at line 1, column 1
    1: C
      ^
invalid character 'C' looking for beginning of value

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 22 (11 by maintainers)

Most upvoted comments

@max-lobur: You can’t reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

/reopen

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/test-infra repository.

Unfortunately, additionalUserData is completely unusable with CoreOS, because ignition and/or coreos-cloudinit do not support the multipart mime user data format, which is the format that Kops ends up using when additionalUserData is specified.

kops hooks are the correct workaround - assuming you can get them to work, given how limited they are. (You’re going to append “.service” to the end of my .swap unit file? Really?)