News for hackers. Stuff that matters.
Re:Ask HN: Intermittent EC2 DNS failures at 1 minute past th... by jik on Wednesday October 01, 2014 @02:36PM (#8396707)
Here's the script I'm running from cron both inside AWS and outside it at one minute past the hour (with our internal DNS domain replaced with example.com):

  #!/bin/bash

  tf=/tmp/out.$$

  for turn in $(yes | head -60); do
      start=$(date)
      if ! host $(uuidgen).example.com 2>&1 | tee $tf | grep -q -s -w NXDOMAIN
      then
          end=$(date)
          echo "$cmd failed from $start to $end:"
          cat $tf
      fi
      sleep 1
  done

  rm -f $tf

There are no comments on this comment yet.