Skip to content

Commit

Permalink
OCPBUGS-29732: Always touch resolv-prepender file at end of script
Browse files Browse the repository at this point in the history
PR openshift#4196 made this conditional based on whether changes were
actually made to resolv.conf. Unfortunately, because resolv.conf is
persistent over reboots this means that we never touch it after the
initial deployment and as a result on subsequent boots kubelet will
never start because the file is never created.

Because we don't care whether changes were actually made, only that
resolv.conf is correctly generated, we can move this file creation
out of the if block and always do it to fix the problem.

Note that this probably does not happen with OVNKubernetes because
the creation of br-ex triggers DNS changes (it gets cleared and then
re-populated) so this is only relevant for OpenShiftSDN-based envs.
  • Loading branch information
cybertron committed Feb 20, 2024
1 parent 78a7967 commit f9534f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/common/on-prem/files/resolv-prepender.yaml
Expand Up @@ -116,8 +116,8 @@ contents:
# re-run the lookup of the hostname now that we know we have DNS
# servers configured correctly in resolv.conf.
nmcli general reload dns-rc
touch "${KNICONFDONEPATH}"
fi
touch "${KNICONFDONEPATH}"
fi
fi
}
Expand Down

0 comments on commit f9534f3

Please sign in to comment.