1. 12 Mar, 2019 14 commits
  2. 02 Jul, 2018 3 commits
  3. 16 Feb, 2018 11 commits
    • Tomas Krizek's avatar
      systemd: update README · eebce52b
      Tomas Krizek authored
      Discourage use of kresd.service in distros using systemd-sysv-generator.
    • Tomas Krizek's avatar
      systemd: compatibility drop-in for kresd@.service · aa3acf73
      Tomas Krizek authored
      Unify the drop-in files for manual activation and systemd compatibility,
      since it is not recommended to use manual activation if socket
      activation is supported.
      Also add --forks=1 to the command, otherwise the service attempts to
      start in interactive mode.
    • Tomas Krizek's avatar
    • Tomas Krizek's avatar
      systemd: provide kresd arguments in ExecStart= · 24711da7
      Tomas Krizek authored
      To avoid using /etc/default/kresd, provide the needed arguments directly
      in the ExecStart= in the kresd@.service.
    • Tomas Krizek's avatar
      systemd: remove kresd.service meta-service · 1f9aa9a6
      Tomas Krizek authored
      The kresd.service meta-service could be confusing for users and provides
      no extra functionality. The system-kresd.slice can be used to restart or
      stop all running instances.
      Distributions shipping with /etc/init.d/kresd should symlink the
      kresd.service to /dev/null to prevent systemd-sysv-generator from
      creating this service.
    • Daniel Kahn Gillmor's avatar
      systemd: drop ReusePort=true, no longer needed · cd23b590
      Daniel Kahn Gillmor authored
      ReusePort=true isn't needed because there is a single listening
      socket, which is shared across all instances.  Nothing needs to reuse
      the port.
    • Daniel Kahn Gillmor's avatar
      systemd: clarify dropping Sockets= for non-socket-activated services · 26918db9
      Daniel Kahn Gillmor authored
      If the adminstrator of a non-socket-activated kresd installation
      doesn't clear Sockets=, then they will also inherit sockets from the
      process manager, which doesn't make sense.  Help them avoid that
    • Daniel Kahn Gillmor's avatar
      systemd: no need to include defaults · 6e3c7abc
      Daniel Kahn Gillmor authored
      We want these files to be as simple as possible; there's no reason to
      include arguments that are already the default.
      --forks=1 is the default.
      and the unit files indicate WorkingDirectory already.
    • Daniel Kahn Gillmor's avatar
      systemd: drop the preset · de25e937
      Daniel Kahn Gillmor authored
      If we only install the files in this directory, there is no need for
      the preset, because kresd@1.service is not enabled by default anyway.
      Simplify, simplify :)
    • Daniel Kahn Gillmor's avatar
      systemd: remove symlinks · 8fbc5ee3
      Daniel Kahn Gillmor authored
      Administrators using bash tab completion with the full completion
      utilities enabled will be able to tab-complete instantiated services.
      shipping symlinks gets confused during tarball generation, and during
      package installation, so it's safer and cleaner to just ship the
      regular unit files.
    • Daniel Kahn Gillmor's avatar
      More systemd service management cleanup · 0398a985
      Daniel Kahn Gillmor authored
      Please see discussion at:
      The new approach is:
       * non-templated kresd.socket and kresd-tls.socket, for the
         public-facing listening ports.  They know to invoke kresd@1.service
         if they're socket-activated.
       * kresd@.service *is* templated, to allow the admin to add more
         concurrent runners with:
            systemctl enable kresd@2.service
       * kresd-control@.socket is still templated, since each daemon has a
         separately-addressable different control port.
       * non-templated kresd.service is a dummy meta-service.  it is in the
         same slice as kresd@.service, and all the kresd@.service instances
         are PartOf= it, so you should be able to stop and restart all
         services together.  On systems like debian that ship
         /etc/init.d/kres, this also avoids having systemd-sysv-generator
         create a kresd.service based on the initscript.
       * no templated instances are explicitly instantiated during initial
         ship, but kresd@1.service should be socket-activated cleanly
      Gbp-Pq: Name 0010-More-systemd-service-management-cleanup.patch
  4. 05 Feb, 2018 2 commits
    • Daniel Kahn Gillmor's avatar
      doc: kresd.systemd belongs in section 7 of the manual · 23c8ffbf
      Daniel Kahn Gillmor authored
      "man man" says that the sections are:
             1   Executable programs or shell commands
             2   System calls (functions provided by the kernel)
             3   Library calls (functions within program libraries)
             4   Special files (usually found in /dev)
             5   File formats and conventions eg /etc/passwd
             6   Games
             7   Miscellaneous  (including  macro  packages  and  conventions), e.g.
                 man(7), groff(7)
             8   System administration commands (usually only for root)
             9   Kernel routines [Non standard]
      Since there is no command named kresd.system it does not belong in
      section 8.
      Section 7 includes conventions and useful patterns like gitcli(7),
      which seems more similar to the documentation that is supplied in
    • Tomas Krizek's avatar
      systemd defaults: turn off verbose logging · d31c2353
      Tomas Krizek authored
      Verbose logging should be used for debugging purposes, as it generates a
      lot of output. It shouldn't be turned on by default for normal mode of
  5. 01 Feb, 2018 4 commits
  6. 30 Jan, 2018 1 commit
    • Tomas Krizek's avatar
      systemd: enable multiple processes with socket activation · 4905226d
      Tomas Krizek authored
      In order to be able to spawn multiple processes with socket activation,
      systemd template (see systemd.unit(5)) is used. This allows the user to
      create any amount of instances by simply providing a unique name for
      each of them. The most sensible instance identifiers are natural
      numbers, but any convention could be used.
      The default recommended service name becomes kresd@1.service, replacing
      the older kresd.service. Sockets are renamed in a similar way. Users are
      able to take advantage of bash expansion to spawn/control multiple
      processes, e.g. "systemctl start kresd@{1..16}.service"
      The socket-activated service can now be launched directly with
      "systemctl start kresd@1.service", which will request the associated
      sockets without the need for any extra priviledges or capabilities.
      Stopping the kresd service now also stops the associated sockets.
      Stopping any individual socket is an isolated opration now (stopping
      kresd@1.socket no longer stop kresd-tls@1.socket and
      Users and packagers are also encouraged to use drop-in files for extra
      configuration or modifications to ensure compatibility with their
  7. 18 Jan, 2018 1 commit
  8. 11 Jan, 2018 2 commits
    • Tomas Krizek's avatar
      systemd: add knot-resolver alias · 921feae2
      Tomas Krizek authored
      The `knot-resolver` name is used for paths and user name. Creating a
      systemd alias with the same name is user-friendly to end users who won't
      have to remember another name (`kresd`).
      Note: Systemd Alias is only created after service is enabled. Packagers
      are thus advised to create symlinks for unit files during package installation
      so users can use `knot-resolver` name right from the start.
    • Tomas Krizek's avatar
      systemd: use persistent cache by default · 8ffb00f8
      Tomas Krizek authored
      The /run directory is non-persistent. Use /var/cache/knot-resolver
      as a persistent cache.
  9. 10 Jan, 2018 2 commits