CoreOS doesn't support multi-part mimes and as such doesn't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Magnum |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Trying to use CoreOS as the OS image for a Magnum bay. However, the issue is the minion never finishes (starts) provisioning.
The issue is that CoreOS no longer supports (as of ~ a year ago (whenever they refactored Cloud-init) multi-part-mimes.
This is an issue becuase both the kubecluster-
From a minion trying to run cloudinit as ran on bootup:
k8-fc6ydlyoox6p ~ # /usr/bin/
Checking availability of "cloud-drive"
Checking availability of "ec2-metadata-
Fetching user-data from datasource of type "cloud-drive"
Attempting to read from "/media/
line 1: error: must be "#cloud-config" or begin with "#!"
Fetching meta-data from datasource of type "cloud-drive"
Attempting to read from "/media/
Attempting to read from "/media/
Failed to parse user-data: Unrecognized user-data format
Continuing...
Merging cloud-config from meta-data and user-data
2015/09/25 19:12:08 Set hostname to k8-fc6ydlyoox6p
2015/09/25 19:12:08 Authorized SSH keys for core user
2015/09/25 19:12:08 Ensuring runtime unit file "etcd.service" is unmasked
2015/09/25 19:12:08 Ensuring runtime unit file "etcd2.service" is unmasked
2015/09/25 19:12:08 Ensuring runtime unit file "fleet.service" is unmasked
2015/09/25 19:12:08 Ensuring runtime unit file "locksmithd.
user_data is as follows:
Content-Type: multipart/mixed; boundary=
MIME-Version: 1.0
--=====
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-
#cloud-boothook
#!/bin/sh
setenforce 0
sed -i '
/^SELINUX=/ s/=.*/=permissive/
' /etc/selinux/config
--=====
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-
#cloud-config
merge_how: dict(recurse_
write_files:
- path: /etc/sysconfig/
owner: "root:root"
permissions: "0644"
content: |
KUBE_
KUBE_
WAIT_HANDLE="https:/
3A26Z&Signature
DOCKER_
--=====
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-
#cloud-config
system_info:
default_user:
name: minion
lock_passwd: true
gecos: Kubernetes Interactive User
groups: [wheel, adm, systemd-journal]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/bash
--=====
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-
#cloud-config
merge_how: dict(recurse_
write_files:
- path: /etc/kubernetes
owner: "root:root"
permissions: "0644"
content: |
kind: Pod
apiVersion: v1beta1
labels:
name: web
desiredState:
manifest:
version: v1beta1
id: web
- name: web
- containerPort: 80
- path: /etc/kubernetes
owner: "root:root"
permissions: "0644"
content: |
kind: Service
apiVersion: v1beta1
id: web
port: 8000
selector:
name: web
container
--=====
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-
#!/bin/sh
# Under atomic, we need to make sure the 'dockerroot' group exists in
# /etc/group (because /lib/group cannot be modified by usermod).
echo "making 'dockerroot' group editable"
if ! grep -q dockerroot /etc/group; then
grep dockerroot /lib/group >> /etc/group
fi
# make 'minion' user a member of the dockerroot group
# (so you can run docker commands as the 'minion' user)
echo "adding 'minion' user to 'dockerroot' group"
usermod -G dockerroot minion
--=====
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-
#!/bin/sh
. /etc/sysconfig/
echo "configuring kubernetes (minion)"
myip=$(ip addr show eth0 |
awk '$1 == "inet" {print $2}' | cut -f1 -d/)
myip_last_
sed -i '
/^KUBE_ALLOW_PRIV=/ s/=.*/=
/^KUBE_
' /etc/kubernetes
sed -i '
/^KUBELET_ADDRESS=/ s/=.*/=
/^KUBELET_
/^KUBELET_
' /etc/kubernetes
sed -i '
/^KUBE_MASTER=/ s/=.*/=
' /etc/kubernetes
sed -i '
/^FLANNEL_ETCD=/ s|=.*|="http://
' /etc/sysconfig/
cat >> /etc/environment <<EOF
KUBERNETES_MASTER=http://
EOF
cpu=$(expr $(nproc) \* 1000)
memory_kb=$(cat /proc/meminfo | awk '/MemTotal: /{print $2}')
memory=$(expr $memory_kb \* 1024)
curl -sf -X POST -H 'Content-Type: application/json' \
--data-binary "{\"kind\
http://
--=====
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-
#cloud-config
merge_how: dict(recurse_
bootcmd:
- mkdir -p /etc/systemd/
- mkdir -p /etc/systemd/
write_files:
- path: /usr/local/
owner: "root:root"
permissions: "0755"
content: |
#!/bin/sh
if ! [ "$FLANNEL_SUBNET" ] && [ "$FLANNEL_MTU" ] ; then
echo "ERROR: missing required environment variables." >&2
exit 1
fi
mkdir -p /run/flannel/
cat > /run/flannel/docker <<EOF
DOCKER_
EOF
- path: /etc/systemd/
owner: "root:root"
permissions: "0644"
content: |
[Unit]
After=
Before=
Requires=
[Service]
Type=oneshot
Environme
ExecStart
[Install]
WantedBy=
- path: /etc/systemd/
owner: "root:root"
permissions: "0644"
content: |
[Unit]
Requires=
After=
[Service]
Environme
- path: /etc/systemd/
owner: "root:root"
permissions: "0644"
content: |
[Unit]
Requires=
Before=
[Install]
Also=
--=====
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-
#!/bin/sh
# docker is already enabled and possibly running on centos atomic host
# so we need to stop it first and delete the docker0 bridge (which will
# be re-created using the flannel-provided subnet).
echo "stopping docker"
systemctl stop docker
ip link del docker0
# make sure we pick up any modified unit files
systemctl daemon-reload
for service in flanneld docker.socket docker kubelet kube-proxy; do
echo "activating service $service"
systemctl enable $service
systemctl --no-block start $service
done
--=====
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-
#!/bin/sh
. /etc/sysconfig/
echo "notifying heat"
curl -sf -X PUT -H 'Content-Type: application/json' \
--data-binary '{"Status": "SUCCESS",
"Reason": "Setup complete",
"Data": "OK", "UniqueId": "00000"}' \
"$WAIT_HANDLE"
--=====
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-
#cloud-config
coreos:
etcd:
# generate a new 9b158e8c835442f
discovery: https:/
# multi-region and multi-cloud deployments need to use $public_ipv4
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
- name: fleet.service
command: start
ssh-rsa XXXXXXX
- $ssh-rsa XXXXX
--=====
Changed in magnum: | |
milestone: | none → mitaka-1 |
Changed in magnum: | |
status: | New → Confirmed |
Changed in magnum: | |
importance: | Undecided → Medium |
To clarify, are you using this image: stable. release. core-os. net/amd64- usr/current/ coreos_ production_ openstack_ image.img. bz2
http://
?