Skip to content

Commit a2cc4ae

Browse files
committed
Remove Docker configuration warning
With the EOL of Ubuntu 20.04 and GoogleCloudPlatform#4167, we can now use built-in Ansible features to validate Docker configurations and fail explicitly. This removes a generic warning which the UI presents very similarly to an error.
1 parent 0118881 commit a2cc4ae

2 files changed

Lines changed: 1 addition & 17 deletions

File tree

modules/scripts/startup-script/files/install_docker.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,7 @@
4343
dest: /etc/docker/daemon.json
4444
mode: '0644'
4545
content: '{{ docker_daemon_config }}'
46-
# validate flag requires Docker server version 23.0 and above
47-
# can add this back after private A3 DLVM image is deprecated
48-
# this image comes with Docker version 20.10.17
49-
# validate: /usr/bin/dockerd --validate --config-file %s
46+
validate: /usr/bin/dockerd --validate --config-file %s
5047
when: docker_daemon_config
5148
notify:
5249
- Restart Docker

modules/scripts/startup-script/main.tf

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -226,19 +226,6 @@ locals {
226226
}
227227
}
228228

229-
check "health_check" {
230-
assert {
231-
condition = local.docker_config == {}
232-
error_message = <<-EOT
233-
This message is only a warning. The Toolkit performs no validation of the
234-
Docker daemon configuration. VM startup scripts will fail if the file is not
235-
a valid Docker JSON configuration. Please review the Docker documentation:
236-
237-
https://docs.docker.com/engine/daemon/
238-
EOT
239-
}
240-
}
241-
242229
resource "random_id" "resource_name_suffix" {
243230
byte_length = 4
244231
}

0 commit comments

Comments
 (0)