Skip to content

Default AWS AMIs that are Ubuntu 16 no longer work as runners

https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/blob/main/drivers/amazonec2/region.go#L30

This AMI points to an Ubuntu 16... Early this morning, runners stopped functioning, with the following logged in the manager:

Apr 26 12:03:09 ip-172-31-82-129 gitlab-runner[21915]: #33[31;1mERROR: error installing docker: #33[0;m #33[31;1mname#033[0;m=runner-lj8pzezy-runner-1650974513-1fcf4254 #33[31;1moperation#033[0;m=provision

the get.docker.com script seems to have deprecated support for Ubuntu 16:

image

If I understand the code correctly, this is what is run in the background to install docker... Which explains the failure noted above in the manger.

The quick-fix for users impacted (in us-east-1) is to add the amazonec2-ami reference in MachineOptions of the setup command, or in the config.toml file.... For example, the below snippet from config.toml points to Ubuntu 18 for us-east-1:

   MachineOptions = [
        "amazonec2-ami=ami-0e472ba40eb589f49",

The better fix for everyone would be to update https://gitlab.com/gitlab-org/ci-cd/docker-machine/-/blob/main/drivers/amazonec2/region.go to point to Ubuntu 18 in the proper regions, I believe?

Edited by Lee Doughty