Skip to content

Releases

v0.6.0

Choose a tag to compare

@wushilin wushilin released this 14 Nov 15:10

What's Changed

  • Use /run/processmaster.sock as default for socket by @winterheart in #5
  • Podman container services, map-form environment by @wushilin in #6

Highlights

  • Container services (podman): run an OCI image as a service, with the same cgroup limits, deterministic stop, logging, restart policy and cron as host commands. Images live in processmaster's own store (pmctl podman …), and unused images are cleaned up automatically. See "Container services (podman)" in the README and examples/containers/. Requires rootful podman; Docker is not supported.
  • process.environment accepts a map (NAME: value); the list form still works.
  • Auto services: a folder with neither service.yml nor run.sh is now skipped instead of getting a generated run.sh default.

Upgrading

  • The default control socket is now /run/processmaster.sock. If you relied on the old default, set unix_socket.path or point PMCTL_SOCK at the new path.
  • As always, deploy processmaster and pmctl from the same build.

Full Changelog: v0.5.1...v0.6.0

v0.5.1

Choose a tag to compare

@github-actions github-actions released this 07 Nov 12:12

What's Changed

Full Changelog: v0.5.0...v0.5.1

v0.5.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 14:50

What's Changed

  • Restructure daemon and harden task management by @wushilin in #2

New Contributors

Full Changelog: v0.4.1...v0.5.0

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 07 Oct 13:12

Full Changelog: v0.4.0...v0.4.1

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 27 Sep 13:36

Full Changelog: v0.3.1...v0.4.0

v0.3.1

Choose a tag to compare

@github-actions github-actions released this 27 Sep 11:26

Full Changelog: v0.3.0...v0.3.1

v0.3.0

Choose a tag to compare

@wushilin wushilin released this 27 Sep 10:24

Security hardening and supervisor fixes. Some existing configurations stop loading after the upgrade. Read "Before upgrading" first.

Before upgrading

  • Auto-service directories must be root-controlled. An auto-service directory owned by (or writable by) the service user is now skipped with an auto_service_dir_not_root_controlled warning. Its service stops on the next load. Such a directory can never hold a trusted definition, because the user can rename any root-owned file, even its own log, into service.yml. To migrate, move the definition to config_directory and point process.working_directory at the old directory:
    sudo cp dropins/<app>/service.yml conf.d/<app>.yaml && sudo chown root: conf.d/<app>.yaml
    # then add under process:   working_directory: /path/to/dropins/<app>
    A config_directory definition with the same name takes precedence over the skipped directory, with no conflict error.
  • Definition files must be root-owned and have a single hard link. They may not be writable by others, and may be group-writable only if the group is root.
  • Provisioning refuses setuid/setgid modes and paths containing ...
  • max_cpu must be 10m–1024 cores.
  • Durations are capped at 30 days.
  • User flags may only contain [a-z0-9_.:-].
  • Admin actions whose program or script arguments a non-root user could modify are refused at run time. The daemon logs a warning at startup. command[0] must be absolute and may not be env.
  • Web console bcrypt hashes above cost 16 are rejected.

Security

  • Root no longer follows symlinks below the root-controlled part of a path when it writes, rotates, prunes or views logs, provisions, reads @file:// values or writes admin-action logs. Root-placed symlinks are resolved one hop at a time, and every directory along the way is trust-checked.
  • Provisioning works through pinned file descriptors. That covers the recursive chown and setting the capability via fsetxattr (the setcap binary is no longer needed). It refuses hard-linked targets.
  • Rotated logs are gzipped in-process. gzip -f used to follow symlinks.
  • The provisioning marker can no longer hang or exhaust the daemon (FIFO, sparse file).
  • Web console:
    • bcrypt verification concurrency is capped;
    • a source that fails 10 times is locked out, with backoff up to 15 min;
    • the dummy hash's cost matches the configured users' cost, so response time no longer reveals which usernames exist;
    • anti-framing, nosniff and no-referrer headers are sent;
    • HTTPS now shuts down gracefully;
    • systemctl option injection through unit names is closed.
  • pmctl/processmaster neutralise terminal escape sequences in service logs and events when printing to a TTY.
  • The control socket has a 10 s request timeout and a 256-connection cap. Requests that would start processes are refused during shutdown.
  • Admin actions run in per-id cgroups, one run per id at a time.

Fixes

  • A service that exits immediately after being started (boot, manual start or restart, reload) is now handled by its restart policy (backoff, then FAILED after the tolerance) instead of being marked FAILED on the first attempt.
  • A service that exited a few milliseconds after being observed running could be left RUNNING forever with nothing running and no restart: the exit waiter was not attached. Found by the new scenario tests on GitHub's faster runners.
  • A manual start of a FAILED service gets a fresh restart budget.
  • Stopping during a backoff cancels the pending restart.
  • update no longer double-starts a crashing service.
  • Provisioning is re-applied automatically when a target changes (e.g. a redeployed binary loses cap_net_bind_service). Old markers trigger one re-run.
  • logs -f no longer stops after 64 MiB.
  • Out-of-range numbers no longer cause panics or overflows.
  • A cgroup.name with a leading / works.
  • The embedded build time/host is no longer frozen at whenever build.rs last changed.

Build and test

  • GitHub Actions workflow: tests, root-only supervisor scenarios, static musl builds for x86_64 and aarch64, and release assets on tags.
  • tests/supervisor_scenarios.rs runs real daemons against real cgroups: crash loops, daemonizing, SIGTERM-immune, fan-out and more.

v0.2.1

Choose a tag to compare

@wushilin wushilin released this 05 Sep 04:34

No behavior change to the daemon's supervision logic — this release hardens test
coverage and cross-build tooling on top of v0.2's zombie-reaping fix.

Added

  • Six regression tests pin the reaping invariant from every angle: a service that
    exits before the daemon finishes disowning it, one that ignores SIGTERM and
    needs the cgroup force-kill, a stop_command that times out, a double-forking
    (daemonizing) child, a 15-service mixed restart storm, and the constraint that
    the reaper must never steal an exit status still owned by Child::wait
    (scheduled jobs). 102 tests total, all passing.
  • build_all.sh: cross-builds static musl binaries for both x86_64 and aarch64
    via cargo-zigbuild in one shot, with optional dist packaging
    (./build_all.sh v0.2.1).

Fixed

  • start_child_reaper_thread is now idempotent (a Once guard), so calling it
    more than once — as the new tests do — can't spin up duplicate reaper threads.

Assets

  • processmaster-v0.2.1-x86_64-musl.tar.gz / -aarch64-musl.tar.gz: static,
    stripped processmaster + pmctl binaries, no libc dependency.

v0.2

Choose a tag to compare

@wushilin wushilin released this 29 Aug 14:51

Fixes

  • Zombie (<defunct>) processes under the daemon. Since 09a9b0d the reaper only waits on explicitly registered pids, but every non-scheduled service start path (reload_start, ReloadRestart, ManualStart, ManualRestart, boot_start, failure_auto_restart) dropped its Child handle and relied on the cgroup waiter, which never calls waitpid. Each service exit left one zombie for the daemon's lifetime. Service children are now registered with the reaper via disown_service_child(); scheduled jobs keep their process waiter and exit code.
  • stop_command helpers that time out (and are then cgroup-killed) are registered with the reaper instead of leaking.
  • boot_start / failure_auto_restart now report a real spawn error instead of a misleading "cgroup stayed empty" timeout.
  • spawn_process_waiter registers the child if the waiter thread cannot be created.

Tests

  • New regression test disowned_service_child_is_reaped_not_left_defunct (101 tests total).

Assets

  • processmaster-v0.2-x86_64-musl.tar.gz — statically linked processmaster + pmctl (co-built) for x86_64 Linux.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GoeGSAVFMbEgA7jjBLoRnC

v0.1

Choose a tag to compare

@wushilin wushilin released this 05 Apr 03:44
95d5b31

Release of initial build