Skip to content

Conversation

@bneradt
Copy link
Contributor

@bneradt bneradt commented May 12, 2022

This patch ensures that a previously down DNS will be used again by ATS
after connectivity to it is restored. Before this patch, we would try to
reconnect to it after one attempt at DNS_PRIMARY_RETRY_PERIOD, but not
again after.


For review

Calling DNSHandler::mainEvent will attempt to reconnect to the name server if it had been previously marked as down. Before this patch, calling this was done via a set of schedule_in calls which didn't result in it being called regularly. It was called once, but then not again after that. This simplifies the logic by periodically calling mainEvent every 5 seconds over the lifetime of ATS which will, if needed, retry any down name servers. This is the purpose of the new schedule_every being added in startEvent which replaces the various schedule_in calls in other code paths. This guarantees that we will re-inspect any down name servers every 5 seconds.

This patch ensures that a previously down DNS will be used again by ATS
after connectivity to it is restored. Before this patch, we would try to
reconnect to it after one attempt at DNS_PRIMARY_RETRY_PERIOD, but not
again after.
@bneradt bneradt added the DNS label May 12, 2022
@bneradt bneradt added this to the 10.0.0 milestone May 12, 2022
@bneradt bneradt requested a review from SolidWallOfCode May 12, 2022 21:40
@bneradt bneradt self-assigned this May 12, 2022
@bryancall bryancall added the Bug label May 16, 2022
@bneradt bneradt merged commit 417e157 into apache:master May 17, 2022
@bneradt bneradt deleted the fix_down_dns_nameserver_restoration branch May 17, 2022 00:39
@bneradt
Copy link
Contributor Author

bneradt commented May 18, 2022

Note that this PR fixes an issue that was introduced by:
#7843

Since that latter PR only went into 9.2.x and beyond, this PR should only go into (and should only help issues with) 9.2.x and beyond as well.

zwoop pushed a commit that referenced this pull request May 25, 2022
This patch ensures that a previously down DNS will be used again by ATS
after connectivity to it is restored. Before this patch, we would try to
reconnect to it after one attempt at DNS_PRIMARY_RETRY_PERIOD, but not
again after.

(cherry picked from commit 417e157)
@zwoop
Copy link
Contributor

zwoop commented May 25, 2022

Cherry-picked to v9.2.x

@zwoop zwoop modified the milestones: 10.0.0, 9.2.0 May 25, 2022
masaori335 pushed a commit to masaori335/trafficserver that referenced this pull request Feb 21, 2023
* asf/9.2.x:
  Updated ChangeLog
  Restore down nameservers after they come back online (apache#8847)
  Fix Rocky Linux 8 arm64 GCC Compiler Warnings (apache#8850)
  Fix `COMPRESSION_ERROR` on valid HPACK input (apache#8817)
  remap_stats: convert to using TSHttpTxnPristineUrlGet and TSHttpTxnClientReqGet for hostname, remove pre remap continuation (apache#8362)
  Re-introduce import to get man_pages list available for sphinx. Closes apache#8858 (apache#8859)
  Add missing configuration files man pages (apache#8861)
JosiahWI pushed a commit to JosiahWI/trafficserver that referenced this pull request Jul 19, 2023
This patch ensures that a previously down DNS will be used again by ATS
after connectivity to it is restored. Before this patch, we would try to
reconnect to it after one attempt at DNS_PRIMARY_RETRY_PERIOD, but not
again after.

(cherry picked from commit 417e157)
JosiahWI pushed a commit to JosiahWI/trafficserver that referenced this pull request Jul 19, 2023
YTSATS-3965: Restore down nameservers after they come back online (apache#8847)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants