Meanwhile I’ve created a new zone for testing with a name quite similar to my existing one, and cloned all of my records to this zone. Say, “foo.example.com” becomes “foo.example.dynv6.net”. So the respective records of both zones appear alphabetically close to each other.
Result: Each time “foo.example.com” disappears, its companion “foo.example.dynv6.net” gets lost, too. All other entries remain stable in both zones. Right now this appears to happen three times a day, around 10 am and 9pm, plus 1am (all times in UTC+1).
Draw your own conclusion, but my personal guess is still a broken index in the database.
FYI, here is the script I am using for monitoring my records (you would need to replace the typographic double and single quotes with “simple” ones). It needs the jq package to be installed.
#!/bin/bash
#Poll all records of a zone at dynv6, restore missing ones
#Settings
TOKEN= # insert your token here
ZONEID= # insert your zoneid here
if [ X != X$1 ]
then
ZONEID=$1
fi
TEMPFILE=/tmp/dynv6_$ZONEID.tmp
RECORDS_A=(‘foo’ ‘bar’ ‘huey’ ‘dewey’ ‘louie’) # replace with your actual entries
RECORDS_AAAA=(‘foo’ ‘bar’ ‘huey’ ‘dewey’ ‘louie’ ‘’)
V6_SUFFIX1=’::1’ # local part of your host’s v6 address here
#Get current status
curl -sS --fail \
-H “Authorization: Bearer $TOKEN” \
-H “Accept: application/json” \
https://dynv6.com/api/v2/zones/$ZONEID/records \
| jq ‘.’ \
> $TEMPFILE
LINES_READ=`cat $TEMPFILE | wc -l`
if [ “$LINES_READ” -eq “0” ] # if the result is empty, then curl has failed and if we continue we potentially create duplicates
then
echo “Abort”
exit
fi
#Identify missing records and restore them
for HOST in “${RECORDS_A[@]}”
do
OK=`jq ‘.[] | select (.type == “A”) | select (.name == "’$HOST’") | .name ’ $TEMPFILE | wc -l` # must be >= 1
if [ “$OK” -eq “0” ]
then
echo “Restore missing entry ‘$HOST’:”
curl -sS --fail \
-H “Authorization: Bearer $TOKEN” \
-H “Content-Type: application/json” \
-H “Accept: application/json” \
–data ‘{“type”: “A”, “name”: "’$HOST’", “data”: “”}’ \
https://dynv6.com/api/v2/zones/$ZONEID/records
fi
done
for HOST in “${RECORDS_AAAA[@]}”
do
OK=`jq ‘.[] | select (.type == “AAAA”) | select (.name == "’$HOST’") | .name ’ $TEMPFILE | wc -l` # must be >= 1
if [ “$OK” -eq “0” ]
then
echo “Restore missing entry ‘$HOST’:”
curl -sS --fail \
-H “Authorization: Bearer $TOKEN” \
-H “Content-Type: application/json” \
-H “Accept: application/json” \
–data ‘{“type”: “AAAA”, “name”: "’$HOST’", “data”: “’$V6_SUFFIX1’”}’ \
https://dynv6.com/api/v2/zones/$ZONEID/records
fi10
done