Skip to content

DNSMasq is not restarted after a node FQDN change #8359

Closed

Description

@DavidePrincipi

Steps to reproduce

  • Install DNSMasq on a node.
  • In the Nodes page, change the FQDN of that node, e.g. from node1.example.org to node2.example.org.
  • Look at the node logs for the fqdn-changed event handler.

Expected behavior

The DNSMasq service on the node whose FQDN changed restarts, so it serves the new host name.

Actual behavior

The event handler of every DNSMasq instance fails with KeyError: 'node_id' and DNSMasq is not restarted. The fqdn-changed handler is a link to the hosts-changed one, which reads the node_id attribute, but the core fqdn-changed event carries the node ID in the node attribute.

Components

DNSMasq 1.3.4

See also

Activity

  1. DavidePrincipi commented on Nov 23, 2026

    @DavidePrincipi
    MemberAuthor
  2. moved this from ToDo to In Progress in NethServeron Nov 23, 2026
  3. DavidePrincipi commented on Nov 23, 2026

    @DavidePrincipi
    MemberAuthor

    Test case

    Use DNSMasq 1.3.5-dev.1, which includes NethServer/ns8-dnsmasq#164. The cluster should have at least two nodes, with DNSMasq installed on the node you rename.

    To update an existing instance (replace dnsmasq1 with the real module ID):

    api-cli run update-module --data '{"module_url":"ghcr.io/nethserver/dnsmasq:1.3.5-dev.1","instances":["dnsmasq1"],"force":true}'
    
    1. On the node with DNSMasq, note when the service last started: systemctl show -p ActiveEnterTimestamp dnsmasq1.
    2. In the Nodes page, change the FQDN of that node, e.g. from node1.example.org to node2.example.org.
    3. Run the command from step 1 again: the start time must be newer.
    4. Check the logs: journalctl -t agent@dnsmasq1 --since -10min must show Handler of node/<ID>/event/fqdn-changed exited with status "completed", with no KeyError.
    5. If another node runs DNSMasq too, its service must not restart.
  4. added
    testing
    on Nov 23, 2026
  5. moved this from In Progress to Testing in NethServeron Nov 23, 2026
  6. DavidePrincipi commented on Nov 23, 2026

    @DavidePrincipi
    MemberAuthor

    VERIFIED

    Tested DNSMasq 1.3.5-dev.1 on a two-node cluster with core 3.25.1: a Rocky Linux 9 leader and a Debian 13 worker, each running one DNSMasq instance. The instance on the worker was configured with DNS only; the instance on the leader was left unconfigured.

    • Changed the FQDN of the worker node, e.g. from node1.example.org to node2.example.org.
    • The DNSMasq service on the worker restarted, and its fqdn-changed handler exited with status "completed" without any KeyError.
    • On the leader, the handler completed too and its DNSMasq service was not started.

    Result: OK.

  7. added
    verified
    on Nov 23, 2026
  8. removed
    testing
    on Nov 23, 2026
  9. moved this from Testing to Verified in NethServeron Nov 23, 2026
  10. DavidePrincipi commented on Nov 23, 2026

    @DavidePrincipi
    MemberAuthor
  11. removed
    verified
    on Nov 23, 2026
  12. moved this from Verified to Done in NethServeron Nov 23, 2026
  13. moved this from Done to In Progress in NethServeron Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    • Status
      In Progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions