diff --git a/templates/worker/00-worker/ovirt/files/NetworkManager-non-virtual-ip-prepender.yaml b/templates/worker/00-worker/ovirt/files/NetworkManager-non-virtual-ip-prepender.yaml deleted file mode 100644 index a704c26618..0000000000 --- a/templates/worker/00-worker/ovirt/files/NetworkManager-non-virtual-ip-prepender.yaml +++ /dev/null @@ -1,41 +0,0 @@ -filesystem: "root" -mode: 0755 -path: "/etc/NetworkManager/dispatcher.d/pre-up.d/non-virtual-ip-prepender" -contents: - inline: | - #!/bin/bash - IFACE=$1 - STATUS=$2 - case "$STATUS" in - pre-up) - logger -s "NM non-virtual-ip-prepender triggered by pre-upping ${1}." - NON_VIRTUAL_IP=$(/usr/local/bin/non_virtual_ip \ - "{{.Infra.Status.PlatformStatus.Ovirt.APIServerInternalIP}}" \ - "{{.Infra.Status.PlatformStatus.Ovirt.NodeDNSIP}}" \ - "{{.Infra.Status.PlatformStatus.Ovirt.IngressIP}}") - set +e - if [[ -n $NON_VIRTUAL_IP ]]; then - logger -s "NM non-virtual-ip-prepender: Checking if worker non virtual IP is the first entry in resolv.conf" - if grep nameserver /etc/resolv.conf | head -n 1 | grep -q "$NON_VIRTUAL_IP" ; then - logger -s "NM non-virtual-ip-prepender: worker node non virtual IP already is the first entry in resolv.conf" - exit 0 - else - logger -s "NM non-virtual-ip-prepender: Setting dhclient to prepend non virtual IP in resolv.conf" - sed "s/{{`{{ .NonVirtualIP }}`}}/$NON_VIRTUAL_IP/" /etc/dhcp/dhclient.conf.template > /etc/dhcp/dhclient.conf - logger -s "NM non-virtual-ip-prepender: Looking for 'search' in /etc/resolv.conf to place 'nameserver $NON_VIRTUAL_IP'" - sed -i "/^search .*$/a nameserver $NON_VIRTUAL_IP" /etc/resolv.conf - fi - fi - ;; - down) - logger -s "NM non-virtual-ip-prepender triggered by downing $IFACE" - ;; - up) - logger -s "NM non-virtual-ip-prepender triggered by upping $IFACE" - ;; - post-down) - logger -s "NM non-virtual-ip-prepender triggered by post-downing $IFACE" - ;; - *) - ;; - esac \ No newline at end of file diff --git a/templates/worker/00-worker/ovirt/files/dhcp-dhclient-conf.yaml b/templates/worker/00-worker/ovirt/files/dhcp-dhclient-conf.yaml index ee141be526..8a75bbd1e9 100644 --- a/templates/worker/00-worker/ovirt/files/dhcp-dhclient-conf.yaml +++ b/templates/worker/00-worker/ovirt/files/dhcp-dhclient-conf.yaml @@ -1,7 +1,7 @@ filesystem: "root" mode: 0644 -path: "/etc/dhcp/dhclient.conf.template" +path: "/etc/dhcp/dhclient.conf" contents: inline: | supersede domain-search "{{ .EtcdDiscoveryDomain }}"; - prepend domain-name-servers {{`{{ .NonVirtualIP }}`}}; + prepend domain-name-servers {{ .Infra.Status.PlatformStatus.Ovirt.NodeDNSIP }};