ansible-collections / ansible-collections/google.cloud

gcp_dns_resource_record_set always updates SOA, causing 412 conflicts at scale — request toggle to skip SOA updates

Closed
#717 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale
Dominant language
Python
Stars
105
Forks
144
Avg merge
5d 10h
Merged PRs (30d)
4

Description

SUMMARY

Add a feature flag/parameter to the google.cloud.gcp_dns_resource_record_set module to skip explicit SOA record updates. Currently, the module always deletes and re-adds the SOA (incrementing its serial) with every DNS change, even though Google Cloud DNS already manages SOA serials automatically. This behavior causes race conditions and 412 Precondition Failed errors when multiple nodes update records in parallel.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

google.cloud.gcp_dns_resource_record_set

ADDITIONAL INFORMATION

This feature would allow users to bypass unnecessary SOA updates and let Google Cloud DNS handle serial increments internally. It is especially critical in high-scale environments (e.g., 100s of nodes provisioning simultaneously), where forced SOA updates result in frequent conflicts and failed record creations.

We propose a new parameter:

- name: Create A record without SOA update
  google.cloud.gcp_dns_resource_record_set:
    name: "{{ inventory_hostname }}.int.example.com."
    type: A
    ttl: 60
    target:
      - "{{ ansible_default_ipv4.address }}"
    managed_zone:
      name: abcd
      dnsName: int.example.com.
    project: gcp-abcd
    auth_kind: serviceaccount
    service_account_file: /path/key.json
    state: present
    skip_soa_update: true   # <--- new parameter

Why it’s needed:

Removes contention on SOA serial numbers during parallel updates.

Prevents 412 errors, improving reliability of large-scale automated deployments.

Maintains backward compatibility (default behavior still updates SOA).

What it would solve:

Eliminates DNS update failures in parallel provisioning scenarios.

Allows teams to rely on native Cloud DNS behavior rather than redundant SOA handling in the module.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the google.cloud.gcp_dns_resource_record_set module and trace where SOA records are deleted and re-added during record changes. Add the optional skip_soa_update behavior while preserving the current default, then verify that parallel record creation can avoid explicit SOA updates and that existing behavior remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
google-cloud, python
Domain
cloud, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
66/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.