Skip to content

bootstrap: switch internet-connectivity probe to actual HTTPS endpoints #34

@coderabbitai

Description

@coderabbitai

Summary

The internet-readiness loop in modules/bootstrap/templates/cloud-init.yaml.tpl currently probes http://1.1.1.1 (plain HTTP), but the bootstrap flow immediately depends on HTTPS access to https://get.rke2.io and https://dl.k8s.io.

Using a plain HTTP probe makes the gate too narrow for the real dependency and can either hang unnecessarily (e.g. if plain HTTP is blocked but HTTPS is fine) or pass too early (e.g. if only plain HTTP is reachable but HTTPS endpoints are not).

Proposed change

Replace the current until loop with one that probes the actual HTTPS endpoints the bootstrap script needs:

until curl -fsSL --connect-timeout 5 https://get.rke2.io > /dev/null && \
      curl -fsSL --connect-timeout 5 https://dl.k8s.io > /dev/null; do
  echo "Still waiting for internet (https://get.rke2.io / https://dl.k8s.io)..." > /dev/console
  sleep 5
done

This ensures the loop exits only when the endpoints the script actually depends on are reachable.

References

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions