Skip to content

nsupdate 'DNS operation timed out' despite high timeout values #9906

Open
@jean-christophe-manciot

Description

Summary

Creating an address record over a mobile hotspot times out after a few seconds despite high timeout values set in /etc/ansible/ansible.cfg:

  • CACHE_PLUGIN_TIMEOUT(/etc/ansible/ansible.cfg) = 259200
  • DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 240
  • PERSISTENT_COMMAND_TIMEOUT(/etc/ansible/ansible.cfg) = 3599
  • PERSISTENT_CONNECT_RETRY_TIMEOUT(/etc/ansible/ansible.cfg) = 300
  • PERSISTENT_CONNECT_TIMEOUT(/etc/ansible/ansible.cfg) = 3600

No such issue over a local gigabit Ethernet link.

Issue Type

Bug Report

Component Name

nsupdate

Ansible Version

$ ansible --version
ansible [core 2.18.3]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/ansible/venv/lib/python3.12/site-packages/ansible
  ansible collection location = /opt
  executable location = /opt/ansible/venv/bin/ansible
  python version = 3.12.8 (main, Dec  4 2024, 12:15:27) [GCC 14.2.0] (/opt/ansible/venv/bin/python3.12)
  jinja version = 3.1.6
  libyaml = True

Community.general Version

$ ansible-galaxy collection list community.general
# /opt/ansible/venv/lib/python3.12/site-packages/ansible_collections
Collection        Version
----------------- -------
community.general 10.4.0 

# /opt/ansible_collections
Collection        Version
----------------- -------
community.general 10.4.0 

Configuration

$ ansible-config dump --only-changed
CACHE_PLUGIN(/etc/ansible/ansible.cfg) = redis
CACHE_PLUGIN_CONNECTION(/etc/ansible/ansible.cfg) = tls://localhost:<port>:0:<password>
CACHE_PLUGIN_TIMEOUT(/etc/ansible/ansible.cfg) = 259200
COLLECTIONS_PATHS(/etc/ansible/ansible.cfg) = ['/opt']
CONFIG_FILE() = /etc/ansible/ansible.cfg
DEFAULT_EXECUTABLE(/etc/ansible/ansible.cfg) = /bin/bash
DEFAULT_FORKS(/etc/ansible/ansible.cfg) = 1000
DEFAULT_GATHERING(/etc/ansible/ansible.cfg) = explicit
DEFAULT_HASH_BEHAVIOUR(/etc/ansible/ansible.cfg) = replace
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/etc/ansible/hosts']
DEFAULT_LOAD_CALLBACK_PLUGINS(/etc/ansible/ansible.cfg) = True
DEFAULT_LOG_PATH(/etc/ansible/ansible.cfg) = /var/log/ansible.log
DEFAULT_PRIVATE_ROLE_VARS(/etc/ansible/ansible.cfg) = False
DEFAULT_ROLES_PATH(/etc/ansible/ansible.cfg) = ['/etc/ansible/roles'>
DEFAULT_TIMEOUT(/etc/ansible/ansible.cfg) = 240
DEFAULT_TRANSPORT(/etc/ansible/ansible.cfg) = ssh
EDITOR(env: EDITOR) = /usr/bin/gedit -s
ENABLE_TASK_DEBUGGER(/etc/ansible/ansible.cfg) = True
GALAXY_SERVER_LIST(/etc/ansible/ansible.cfg) = ['release_galaxy', 'test_galaxy', 'local_https', 'local_ssh', 'local_file', 'automation_hub']
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = True
INJECT_FACTS_AS_VARS(/etc/ansible/ansible.cfg) = True
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = /usr/bin/python3
INVENTORY_ENABLED(/etc/ansible/ansible.cfg) = ['ini', 'script', 'auto', 'yaml']
PERSISTENT_COMMAND_TIMEOUT(/etc/ansible/ansible.cfg) = 3599
PERSISTENT_CONNECT_RETRY_TIMEOUT(/etc/ansible/ansible.cfg) = 300
PERSISTENT_CONNECT_TIMEOUT(/etc/ansible/ansible.cfg) = 3600
RETRY_FILES_ENABLED(/etc/ansible/ansible.cfg) = False
SHOW_CUSTOM_STATS(/etc/ansible/ansible.cfg) = True

OS / Environment

Ubuntu 24.10 oracular

Steps to Reproduce

Connecting over a mobile hotspot

- name: Creating/updating a DNS record with a single value
  nsupdate:
        key_algorithm: "hmac-sha512"
        key_name: "key"
        key_secret: "secret"
        port: "53"
        protocol: tcp
        record: "hostname_short"
        server: "{{ ip_address }}"
        state: present
        ttl: "3600"
        type: "A"
        value: "{{ ipv4_address }}"
        zone: "{{ ansible_domain }}."

Expected Results

Address record created on the DNS primary server

Actual Results

/ TASK [Creating/updating a DNS record with a single \
\ value]                                /
 -----------------------------------------------------------
2025-03-19 13:27:38,007 p=150088 u=root n=ansible INFO| fatal: [dns1.<ansible_domain>]: FAILED! => {"changed": false, "msg": "DNS server error: (Timeout): The DNS operation timed out."}

Code of Conduct

  • I agree to follow the Ansible Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue/PR relates to a bugmodulemodulepluginsplugin (any type)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions