mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Fix GCE DNS readiness polling.
If the `hostname` commands used in the polling loop fail, their stdout is going to be empty and so `getent hosts` command will actually succeed. For the loop to work as expected, make sure the subcommands return a string which is an invalid host name.
This commit is contained in:
parent
7b8bf758f3
commit
26439bb225
@ -32,11 +32,11 @@ function ensure-basic-networking() {
|
||||
echo 'Waiting for functional DNS (trying to resolve metadata.google.internal)...'
|
||||
sleep 3
|
||||
done
|
||||
until getent hosts $(hostname -f) &>/dev/null; do
|
||||
until getent hosts $(hostname -f || echo _error_) &>/dev/null; do
|
||||
echo 'Waiting for functional DNS (trying to resolve my own FQDN)...'
|
||||
sleep 3
|
||||
done
|
||||
until getent hosts $(hostname -i) &>/dev/null; do
|
||||
until getent hosts $(hostname -i || echo _error_) &>/dev/null; do
|
||||
echo 'Waiting for functional DNS (trying to resolve my own IP)...'
|
||||
sleep 3
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user