Skip to content

provision: fix flatcar detection in coreos

René Moser requested to merge (removed):fix/flatcar-detection into master

CoreOS is deprecated and Flatcar is the successor. This simple addition would fix the detecttion.

Flatcar has an ID_LIKE key with value coreos:

core@localhost ~ $ cat /etc/os-release
NAME="Flatcar Container Linux by Kinvolk"
ID=flatcar
ID_LIKE=coreos
VERSION=2345.3.1
VERSION_ID=2345.3.1
BUILD_ID=2020-03-26-2026
PRETTY_NAME="Flatcar Container Linux by Kinvolk 2345.3.1 (Rhyolite)"
ANSI_COLOR="38;5;75"
HOME_URL="https://flatcar-linux.org/"
BUG_REPORT_URL="https://issues.flatcar-linux.org"
FLATCAR_BOARD="amd64-usr"

An after patch output looks as expected:

$ ./bin/docker-machine create --driver cloudscale --cloudscale-flavor flex-2 --cloudscale-image flatcar-2303.3 --cloudscale-zone lpg1 --cloudscale-ssh-user core --cloudscale-token=$CLOUDSCALE_API_TOKEN flatcar
Running pre-create checks...
Creating machine...
(flatcar2) Creating SSH key...
(flatcar2) Starting to create cloudscale.ch server...
(flatcar2) Waiting for IP address to be assigned to the Server...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with coreOS...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Edited by René Moser

Merge request reports