Skip to main content

attr: dnswait.__doc__

Project description

DNSWait

dnswait is a small script to wait for the "propagation" of a namserver configuration.

There's no such thing as DNS propagation

What make your browser don't hit your server right after you've configured the zone, this long frustrating delay from hours to days, is the effect of caches, not "propagation".

Try it yourself next time you set up a new entry: just don't hit it before configuring it, so its absence is not stored in any caches. Only when configured try it and boom, cache miss all the way up, no delay, it just works.

There may be some time though between the moment you ask your registrar to set an entry (via their web user interface or their API) and the moment it's really visible on their nameservers, that time I agree to call "propagation", and that's what's being monitored by this script.

Usage

Say you've added a TXT record containing itsme to proove you're the owner of example.com, via the interface of a low-cost hosting company, and they display a nice message:

Please wait a few minutes for our scripts to propagate the change to our DNS servers.

Then you can run:

dnswait example.com TXT itsme

the script will wait for all the authoritative servers of example.com to serve itsme for your text entry, so you know exactly what those few minutes were, you don't have to guess.

Another example

Say you're the owner of mdk.fr (it's me) and your provider only allows you to change DNS records using issues on their bug tracker, then submit the issue asking them to set 51.15.187.166 as the IP for mdk.fr and run:

dnswait mdk.fr A 51.15.187.166

so you'll know when they do it.

If they reply "it's done" while dnswait don't see it, they probably messed up something...

Using in shell scripts

If you have a shell script updating DNS configuration via an API, you can use dnswait in them to wait for the configuration to be done.

Verbose

If you want to see what's happening, run with -v or -vv:

$ dnswait mdk.fr A 51.15.187.166 -v
INFO:dnswait:3 authoritative name servers to check.
INFO:dnswait:All authoritative servers have the expected value.

or:

$ dnswait mdk.fr A 51.15.187.166 -vv
INFO:dnswait:3 authoritative name servers to check.
DEBUG:dnswait:Checking ns-69-a.gandi.net.
DEBUG:dnswait:ns-69-a.gandi.net. have the expected value!
DEBUG:dnswait:Checking ns-173-b.gandi.net.
DEBUG:dnswait:ns-173-b.gandi.net. have the expected value!
DEBUG:dnswait:Checking ns-127-c.gandi.net.
DEBUG:dnswait:ns-127-c.gandi.net. have the expected value!
INFO:dnswait:All authoritative servers have the expected value.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dnswait-0.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

dnswait-0.0.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file dnswait-0.0.1.tar.gz.

File metadata

  • Download URL: dnswait-0.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for dnswait-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1aae6e305812f08622513b566648cdb486c336b92982d77c01833e81d57efee8
MD5 f6159df8fbceee574eaa404ee9849f49
BLAKE2b-256 b436d3d379f5ed5b7e3cdee417408f8322084150d802747259ea188ee27f5771

See more details on using hashes here.

File details

Details for the file dnswait-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: dnswait-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for dnswait-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8e2e22d8bb4c3b9bebc642c2198947a9f321d262c42521006dd07317e625dc0
MD5 27b84cf3fc0a5780d134b85e87ca23c0
BLAKE2b-256 1f4254842c467424a7995be0857b95943bb0e698b35a00eab48b188764564ff6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page