Workaround to fix amphora-agent on centos
dnspython now requires to have at least one nameserver in /etc/resolv.conf. The amphora image doesn't need and doesn't use any dns servers, add a dummy dns server as a workaround on centos (on ubuntu, resolv.conf contains the systemd resolver). We will revert this patch when we find a more convenient fix for this issue Story: 2009281 Task: 43552 Change-Id: I81af508e7df5ffef343f1614335ffe1a98540912
This commit is contained in:
parent
8ac5aa7cbe
commit
2043788473
@ -0,0 +1,4 @@
|
|||||||
|
[main]
|
||||||
|
# Set dns to none, it prevents NetworkManager to update the /etc/resolv.conf
|
||||||
|
# file.
|
||||||
|
dns=none
|
@ -1,6 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
echo "" > /etc/resolv.conf
|
|
||||||
echo "" > /etc/resolv.conf.ORIG
|
# Override resolv.conf file from DIB with a custom one.
|
||||||
|
# Having at least one nameserver is now required by dnfpython (>=)
|
||||||
|
echo "nameserver 127.0.0.1" > /etc/resolv.conf
|
||||||
|
echo "nameserver 127.0.0.1" > /etc/resolv.conf.ORIG
|
||||||
if [ -d /etc/dhcp/dhclient-enter-hooks.d ]
|
if [ -d /etc/dhcp/dhclient-enter-hooks.d ]
|
||||||
then
|
then
|
||||||
# Debian/Ubuntu
|
# Debian/Ubuntu
|
||||||
|
Loading…
Reference in New Issue
Block a user