[Midnightbsd-cvs] [MidnightBSD/src] a91f20: prowld: Implement mDNS service discovery integration

Lucas Holt noreply at github.com
Sun Apr 19 22:55:36 EDT 2026


  Branch: refs/heads/master
  Home:   https://github.com/MidnightBSD/src
  Commit: a91f2081c38c710907a5d67b9bb5603e5daeb7d0
      https://github.com/MidnightBSD/src/commit/a91f2081c38c710907a5d67b9bb5603e5daeb7d0
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M sbin/prowld/prowld.c
    M sbin/prowld/prowld.h
    M sbin/prowld/supervisor.c
    M sbin/prowld/unit.c

  Log Message:
  -----------
  prowld: Implement mDNS service discovery integration

Add support for automatic service registration with mDNSResponder via
dns-sd(1) as specified in Phase 3.

- Parse 'mdns' block in unit files (register, name, type, port, txt_record).
- Support '%h' (hostname) and '%l' (job label) substitution in mDNS names.
- Automatically spawn 'dns-sd -R' child processes when a service reaches
  the RUNNING state.
- Supervise and automatically restart mDNS registration if it unexpectedly
  exits while the main service is still running.
- Cleanly terminate mDNS registration when the service is stopped or fails.
- Log a single warning per boot if dns-sd(1) is missing from standard paths.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


  Commit: 8336f937991e25d102a259f75e3d41bc1bc393b1
      https://github.com/MidnightBSD/src/commit/8336f937991e25d102a259f75e3d41bc1bc393b1
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M sbin/prowld/prowld.c
    M sbin/prowld/prowld.h
    M sbin/prowld/supervisor.c
    M sbin/prowld/unit.c

  Log Message:
  -----------
  prowld: Implement drop-in overrides and timer persistence

Fulfill more Phase 3 requirements by adding configuration flexibility and
persistent timer state.

- Drop-in Overrides: Check for <label>.d/ directories and merge any .unit
  files found there into the primary job configuration using libucl.
- Timer Persistence: Record 'last_run' timestamps for all timer jobs in
  /var/db/prowld/timers.state. State is saved atomically on every run.
- Catch-up: Load timer state at startup to identify missed persistent
  events (basic implementation).
- Added PROWLD_TIMER_STATE_PATH and exported state management functions.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


  Commit: 0ab2d06402949fb0810982e856efd1b3cc4e3442
      https://github.com/MidnightBSD/src/commit/0ab2d06402949fb0810982e856efd1b3cc4e3442
  Author: Lucas Holt <luke at foolishgames.com>
  Date:   2026-04-19 (Sun, 19 Apr 2026)

  Changed paths:
    M sbin/prowld/ipc.c
    M sbin/prowld/job.c
    M sbin/prowld/prowld.h

  Log Message:
  -----------
  prowld: Implement IPC subscription API for real-time monitoring

Add support for the 'subscribe' verb in the IPC protocol as specified in
Phase 3.

- Track subscriber state and label filters in ipc_client_t.
- Implement ipc_broadcast_event() to push state changes to subscribers.
- Trigger events automatically in job_set_state() upon any transition.
- Events are delivered as length-prefixed JSON with 'verb':'event'.
- Allows clients like prowlctl to monitor daemon activity without polling.

AI-Assisted-by: Gemini
Signed-off-by: Lucas Holt <luke at foolishgames.com>


Compare: https://github.com/MidnightBSD/src/compare/357bb7caf7f9...0ab2d0640294

To unsubscribe from these emails, change your notification settings at https://github.com/MidnightBSD/src/settings/notifications


More information about the Midnightbsd-cvs mailing list