Problem Description and Overview:
If you are installing DKP in Ubuntu using the Docker provisioner, you may encounter errors that resemble the following:
Failure talking to yum: Cannot find a valid baseurl for repo: base/7/x86_64
fatal: [1XX.1X.0X.1X]: FAILED! => {
"attempts": 3,
"changed": false
}
This may appear confusing since Ubuntu does not use Yum! However, the error being reported is coming from inside the container which uses a different OS environment.
A common cause for this problem is the way Ubuntu handles its name resolution. Rather than using /etc/resolv.conf file to list name servers, Ubuntu runs a proxy DNS server at 127.0.0.53 which then forwards the request to upstream name servers.
If you look at your /etc/resolv.conf file you should see that there is a value that resembles:
nameserver 127.0.0.53
When Konvoy starts using the Docker provisioner, it mounts the /etc/resolv.conf file to the containers. Because these containers do not have anything at 127.0.0.53, lookups fail. To fix this, you can edit this line in resolv.conf on your host machine to refer to your actual upstream resolvers (Or public DNS servers if you wish to use those).
Resolution Steps:
If any Konvoy containers are running, use "./konvoy down" to remove them.
The first step is to stop and disable systemd-resolved to stop Ubuntu from managing name resolution:
systemctl stop systemd-resolved
systemctl disable systemd-resolved
This will prevent any changes from being reverted by systemd-resolved.
Next, edit /etc/NetworkManager/NetworkManager.conf
Add a line under the [main] section:
dns=none
This will prevent NetworkManager from reverting any changes.
Next, you will need to delete the symlink located at /etc/resolv.conf and manually create an actual file there which contains your upstream DNS resolvers instead of 127.0.0.53. If you are unsure of the address(es) of your upstream resolver(s), please refer to your organization's network administrator. Here is a resource that you can use to manually create an /etc/resolv.conf file:
Once that's complete, you can restart NetworkManager:
systemctl restart NetworkManager
Once that is done, you should be able to retry the installation and your Docker containers will be able to successfully perform name resolution.