FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

New rules cause dnsmasq to be restarted instead of reloaded · Issue #3613 · apache/cloudstack · GitHub

Repository navigation

New rules cause dnsmasq to be restarted instead of reloaded #3613

Closed

Description

When adding/configuring new dhcp/dns rules, the dnsmasq process is restarted:
https://github.com/apache/cloudstack/blob/master/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py#L71

Explore if it's possible to simply reload the dnsmasq process than restart it.

(If dnsmasq restarts at the same time monitoring service check kicks in, it might show to recover the dnsmasq again)

ISSUE TYPE
  • Improvement Request
COMPONENT NAME
VR

Activity

  1. onitake commented on Oct 1, 2019

    Contributor

    Restarting should not be necessary for reloading DNS and DHCP records, according to the man page: http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html#lbAG
    Quote:

    When it receives a SIGHUP, dnsmasq clears its cache and then re-loads /etc/hosts and /etc/ethers and any file given by --dhcp-hostsfile, --dhcp-hostsdir, --dhcp-optsfile, --dhcp-optsdir, --addn-hosts or --hostsdir. The dhcp lease change script is called for all existing DHCP leases. If --no-poll is set SIGHUP also re-reads /etc/resolv.conf. SIGHUP does NOT re-read the configuration file.

    The systemd unit in Debian buster sends a SIGHUP on reload, so it should suffice:

    ExecReload=/bin/kill -HUP $MAINPID
    
  2. added this to the 4.14.0.0 milestone on Oct 1, 2019
  3. andrijapanicsb commented on Oct 2, 2019

    Contributor

    it WAS necessary some days (years?) ago since there was no way to reload the dnsmasq (or it was buggy) - but today - you are right.

  4. modified the milestones: 4.14.0.0, 4.15.0.0 on Jan 28, 2020
  5. yadvr commented on Jan 28, 2020

    MemberAuthor

    This will require large changes, moved to 4.15

  6. modified the milestones: 4.15.0.0, 4.16.0.0 on Aug 4, 2020
  7. yadvr commented on Aug 9, 2021

    MemberAuthor

    It may be worth discussing and move it out if the scope/changes are huge. cc @nvazquez @weizhouapache

  8. pdion891 commented on Aug 16, 2021

    Contributor

    Reloading dnsmasq when creating a new vm would probably work, but when you introduce a new network tier in a VPC, you will probably have to restart dnsmasq so it introduce the new network interface of the VR in dnsmasq configuration.

  9. weizhouapache commented on Aug 16, 2021

    Member

    @pdion891
    yes, this is why I keep the following lines in CsDhcp.py in #5319

            if self.conf.commit():
                restart_dnsmasq = True
    
  10. weizhouapache commented on Sep 3, 2021

    Member

    fixed by #5319

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL