Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Fix dns forwarders in bastion node #57

Merged
merged 1 commit into from
Oct 19, 2020
Merged

Fix dns forwarders in bastion node #57

merged 1 commit into from
Oct 19, 2020

Conversation

lukebrowning
Copy link

The dns interface to the ocp4-helpernode project is forwarder1 and
forwarder2. Presently, only forwarder1 is specified and the
ocp4-helpernode project adds the second forwarder which has a
default value of 8.8.4.4.

The dns interface to the ocp4-upi-kvm project is a string composed
of multiple dns servers, so it needs to be translated into forwarder1
and forwarder2. This is not presently happening. This results in
3 dns servers being defined in the bastion node, including the
extra dns server 8.8.4.4 which was not requested.

Redhat OCS utilizes NTP servers that are behind the firewall which are
frequently not resolved correctly due to the use of dns server 8.8.4.4.
The following line appears thousands of times in /var/log/messages.

Oct 16 10:31:27 nx144-ahv dnsmasq[36993]: Maximum number of concurrent DNS queries reached (max: 150)

The OCS configuration requires that all dns requests be forwarded to
the host server which is accomplished by specifying 192.168.88.1 and
127.0.0.1, both of which resolve to the host server.

The too many concurrent dns request error message no longer occur
with this change.

Signed-off-by: Luke Browning lukebrowning@us.ibm.com

gateway_ip = var.gateway_ip
netmask = cidrnetmask(var.cidr)
broadcast = cidrhost(var.cidr,-1)
ipid = cidrhost(var.cidr, 0)
pool = var.allocation_pools[0]
forwarder1 = trimspace(element(local.forwarders, 0))
forwarder2 = length(local.forwarders) > 1 ? trimspace(element(local.forwarders, 1)) : ""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we take care of case when user want to use 3 name servers? I don't mind making the variable var.dns_forwarders as a list.
Secondly, It will be good to use local.forwarders[0] syntax instead of element function.
Thanks.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comments. I implemented both of your comments.

The dns interface to the ocp4-helpernode project is forwarder1 and
forwarder2.  Presently, only forwarder1 is specified and the
ocp4-helpernode project adds the second forwarder which has a
default value of 8.8.4.4.

The dns interface to the ocp4-upi-kvm project is a string composed
of multiple dns servers, so it needs to be translated into forwarder1
and forwarder2.  This is not presently happening.  This results in
3 dns servers being defined in the bastion node, including the
extra dns server 8.8.4.4 which was not requested.

Redhat OCS utilizes NTP servers that are behind the firewall which are
frequently not resolved correctly due to the use of dns server 8.8.4.4.
The following line appears thousands of times in /var/log/messages.

Oct 16 10:31:27 nx144-ahv dnsmasq[36993]: Maximum number of concurrent DNS queries reached (max: 150)

The OCS configuration requires that all dns requests be forwarded to
the host server which is accomplished by specifying 192.168.88.1 and
127.0.0.1, both of which resolve to the host server.

The too many concurrent dns request error message no longer occur
with this change.

Signed-off-by: Luke Browning <lukebrowning@us.ibm.com>
@yussufsh yussufsh requested review from bpradipt and yussufsh October 19, 2020 05:48
Copy link
Collaborator

@yussufsh yussufsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Contributor

@bpradipt bpradipt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@lukebrowning
Copy link
Author

@bpradipt @yussufsh When will this be merged? I don't have that option.

@yussufsh yussufsh merged commit 5eb3b7e into ocp-power-automation:master Oct 19, 2020
zmc pushed a commit to zmc/ocp4-upi-kvm that referenced this pull request Oct 22, 2020
The dns interface to the ocp4-helpernode project is forwarder1 and
forwarder2.  Presently, only forwarder1 is specified and the
ocp4-helpernode project adds the second forwarder which has a
default value of 8.8.4.4.

The dns interface to the ocp4-upi-kvm project is a string composed
of multiple dns servers, so it needs to be translated into forwarder1
and forwarder2.  This is not presently happening.  This results in
3 dns servers being defined in the bastion node, including the
extra dns server 8.8.4.4 which was not requested.

Redhat OCS utilizes NTP servers that are behind the firewall which are
frequently not resolved correctly due to the use of dns server 8.8.4.4.
The following line appears thousands of times in /var/log/messages.

Oct 16 10:31:27 nx144-ahv dnsmasq[36993]: Maximum number of concurrent DNS queries reached (max: 150)

The OCS configuration requires that all dns requests be forwarded to
the host server which is accomplished by specifying 192.168.88.1 and
127.0.0.1, both of which resolve to the host server.

The too many concurrent dns request error message no longer occur
with this change.

Signed-off-by: Luke Browning <lukebrowning@us.ibm.com>
(cherry picked from commit 5eb3b7e)
satwinder0867 pushed a commit to satwinder0867/ocp4-upi-kvm that referenced this pull request Oct 30, 2020
The dns interface to the ocp4-helpernode project is forwarder1 and
forwarder2.  Presently, only forwarder1 is specified and the
ocp4-helpernode project adds the second forwarder which has a
default value of 8.8.4.4.

The dns interface to the ocp4-upi-kvm project is a string composed
of multiple dns servers, so it needs to be translated into forwarder1
and forwarder2.  This is not presently happening.  This results in
3 dns servers being defined in the bastion node, including the
extra dns server 8.8.4.4 which was not requested.

Redhat OCS utilizes NTP servers that are behind the firewall which are
frequently not resolved correctly due to the use of dns server 8.8.4.4.
The following line appears thousands of times in /var/log/messages.

Oct 16 10:31:27 nx144-ahv dnsmasq[36993]: Maximum number of concurrent DNS queries reached (max: 150)

The OCS configuration requires that all dns requests be forwarded to
the host server which is accomplished by specifying 192.168.88.1 and
127.0.0.1, both of which resolve to the host server.

The too many concurrent dns request error message no longer occur
with this change.

Signed-off-by: Luke Browning <lukebrowning@us.ibm.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants