Managed services
dbl service installs a dispatcher or executor as a system service. By default
it creates a host-local managed profile. An executor enrolled through My nodes
can instead preserve its TLS identity with --enrolled-state; follow the
persistent executor setup.
Other networked production deployments use the Ansible deployment guide.
Basic workflow
Section titled “Basic workflow”Install the package under a system prefix, create an unprivileged service account, then install and inspect each role:
sudo dbl service install --role dispatchersudo dbl service install --role executor --dispatcher 127.0.0.1:9001sudo dbl service status --role dispatchersudo dbl service status --role executorUse dbl drain --role executor before planned maintenance and dbl drain --role executor --resume when it is ready again. Service commands need administrator privileges.
The service owns its role-specific SQLite state and retains it across restart. A database is not automatically migrated or safe to reuse across arbitrary package versions.
Reinstalling a managed role requires the same package version and source revision
as its retained installation record, including after normal uninstall.
Enrolled executors also retain their original installed package directory and
service account/group. Repeat any non-default account options when reinstalling.
An already enrolled executor can use the explicit
package replacement procedure below.
Changing the package of a local generated executor or dispatcher remains
unsupported by dbl service install. The
Ansible database-upgrade procedure
for host-administered daemons does not upgrade this managed installation record.
Keep its package and private
state for recovery; do not purge retained state to bypass a version refusal.
For an enrolled executor, supply --enrolled-state on every install or reinstall.
Its configuration supplies the dispatcher addresses, so endpoint override flags
are refused. The state must already be at the selected instance’s canonical
managed path. An existing foreground daemon must be stopped before adoption;
do not launch one concurrently with installation. Use the managed unit to start
and stop it afterward. The daemon runs under the same unprivileged service
account with NoNewPrivileges=yes. An enrolled configuration explicitly selecting
packet_counter = "auto" receives only CAP_BPF, CAP_PERFMON,
CAP_NET_ADMIN and CAP_NET_RAW in its bounding and ambient sets. An enrolled
fallback configuration, a local executor and a dispatcher receive no capabilities.
Separate isolated worker processes drop the daemon’s capabilities before running
guest code. The default trusted in-process execution shares the daemon process.
The generated managed units do not delegate writable cgroups. They support the
trusted execution profile; selecting isolation.profile = "shared" also requires
a separately configured delegated service with the
shared-profile host setup.
The installed record retains the unit’s capability choice so older services remain stoppable and removable. Reinstalling preserves the enrollment files; changing the saved counter mode and reinstalling the same package updates the unit. A running daemon needs a clean stop and start to apply the new unit. Restricted hosts that cannot launch a service with ambient capabilities must use the capability-free fallback configuration; see executor setup.
Reference unit files live in deploy/systemd.
Restart or renew an enrolled executor
Section titled “Restart or renew an enrolled executor”For a planned restart, run sudo dbl --output json drain --role executor --name worker, confirm joined: true and enabled: false, then run sudo dbl drain --role executor --name worker --resume. Inspect sudo dbl service status --role executor --name worker and the node’s Ready state in the console. Reuse its
existing configuration and credentials; restart and package replacement do not
need a new setup token.
Certificate renewal is a separate, manual operation using a fresh Set up again
token and dbl executor join --renew. It preserves the key and all stored work
while replacing the certificate of a stopped, disabled managed executor. Follow
the renewal procedure
before the current certificate expires.
Replace an enrolled executor’s package
Section titled “Replace an enrolled executor’s package”This procedure changes only the package used by an existing enrolled managed executor. It preserves its service account, canonical state path, TLS identity, configuration, database, retained output and recorded capability profile. It does not enroll another executor, change the counter mode, migrate a database, start the service or enable it at boot. Keep other administrators, automation and foreground executors from starting or changing this instance throughout maintenance; the command does not serialize concurrent administrator actions.
Retain the previous full package and choose the staging method matching your
installation. Run the remaining steps in the same shell, using the selected
replacement_cli and candidate rather than whichever dbl appears on PATH.
For apt, configure the signed repository first, then install the operator-approved exact Debian version. This changes the command links but leaves the service on its recorded package:
set -euDEBUGLET_DEBIAN_VERSION=VERSION_PROVIDED_BY_OPERATORsudo apt-get updatesudo apt-get install "debuglet=$DEBUGLET_DEBIAN_VERSION"test "$(dpkg-query -W -f='${Version}' debuglet)" = "$DEBUGLET_DEBIAN_VERSION"candidate=$(dirname "$(dirname "$(readlink -f /usr/bin/dbl)")")replacement_cli="$candidate/bin/dbl"Before replacing the service, mark its previous debuglet-payload-* package
manual with sudo apt-mark manual PAYLOAD_PACKAGE_NAME so it remains available
for rollback after the service record changes. See payload retention.
For a tar installation, obtain and verify the operator-approved full bundle as described in signed releases. Stage it without changing command links:
set -euDEBUGLET_VERSION=VERSION_PROVIDED_BY_OPERATORsudo sh ./install.sh --archive "./debuglet-${DEBUGLET_VERSION}-linux-amd64.tar.gz" \ --checksums ./SHA256SUMS --version "$DEBUGLET_VERSION" --prefix /usr/local --stage-onlycandidate="/usr/local/lib/debuglet/$DEBUGLET_VERSION"replacement_cli="$candidate/bin/dbl"For either installation method, drain the existing service:
sudo "$replacement_cli" --output json drain --role executor --name workerContinue only after the drain reports joined: true and enabled: false.
An incomplete or failed shutdown is not permission to replace the package.
While stopped, make a private offline backup of the entire
/var/lib/debuglet/executors/worker directory, the installation record at
/etc/debuglet/services/executor-worker.json, and the unit at
/etc/systemd/system/debuglet-executor-worker.service. Keep the old package’s
exact path and version with that backup. These files include private credentials.
sudo "$replacement_cli" service install --role executor --name worker \ --enrolled-state /var/lib/debuglet/executors/worker \ --replace-package "$candidate" --start=false --enable=false--replace-package takes an absolute installed full-package directory, not an
archive or executable. The existing package verifier checks its manifest and
files. Omit --user and --group to retain the recorded identity; supplied
values must match it. The target executor must accept the current database
through its offline -check-database check. An incompatible database or an older
target without that check is refused. Plan any required schema migration
separately using the offline database procedure;
do not purge state or edit the installation record to bypass a refusal.
A successful replacement leaves the unit stopped and disabled; default command
links such as /usr/local/bin/dbl are unchanged. Keep using the selected CLI
path below. Explicitly resume it, inspect readiness and the connected node’s
version, then run one permitted TEST measurement and inspect its complete output:
sudo "$replacement_cli" drain --role executor --name worker --resumesudo "$replacement_cli" service status --role executor --name workerAfter an interrupted replacement, keep the service stopped and repeat the exact replacement command with the same verified target. Only the matching interrupted operation can be completed; an unexplained unit/record mismatch is refused. Do not manually repair the record or start a mismatched unit.
For a deliberate rollback, drain and back up again, then use this new CLI
with --replace-package /absolute/path/to/the/retained/previous/full-package
and the same explicit false flags. The old package’s CLI need not support this
option. Rollback selects older executable bytes; it keeps the current identity
and state, requires the old target’s schema check to pass, and does not replay
work. Do not restore an old database or cryptographic state over work accepted
since that backup. An incompatible schema needs a separate recovery plan, not
an automatic downgrade. Verify readiness and a fresh permitted TEST result
before returning the node to use.
Tested managed profile
Section titled “Tested managed profile”The installed TEST flow was exercised with this one Linux amd64 combination. It is an observed profile, not a minimum-kernel or general distribution-support claim.
| Property | Tested value |
|---|---|
| Package | v0.0.0-dev.902d027f1d61, source 902d027f1d61f7c06f1b2a5a906de2caa8c529f4 |
| Full archive SHA-256 | ce16b2326e9f9d732e6328d1e58fec1b9b0f13eb6218f3a2a99dcd6e417f5b62 |
| Container userland | Ubuntu 24.04.4 LTS, amd64 |
| Host kernel | 7.0.0-30-generic |
| Service manager / cgroups | systemd 255 (255.4-1ubuntu8.17), cgroup v2 |
| Debuglet services | debuglet UID/GID 997, zero effective capabilities, NoNewPrivileges=1 |
| Network / counter | Private loopback-only fixture; userspace fallback |
Both roles reached readiness and a TEST measurement completed. Restarting the
executor preserved its identity and left completed output readable. It drained
and preserved state through executor-only uninstall/reinstall. doctor ran
with the service’s identity and sandbox: a read-only database caused both a permission failure and startup
failure. With BTF hidden and no capabilities, auto reached readiness through
the fallback counter while doctor left privileged enforcement unverified.
Follow the disposable systemd fixture procedure to repeat these checks against an exact full package. Docker’s systemd-hosting privileges are separate from the unprivileged Debuglet services. This does not verify a clean VM boot, reboot behavior, privileged eBPF enforcement, or another host platform.
Remove a role or inactive package
Section titled “Remove a role or inactive package”sudo dbl service uninstall --role executor --name workerThis stops and removes only the selected managed unit. Its database, identity
and configuration remain in the reported state directory; its administrative
installation record is also kept. Reinstalling the same package version can
reuse that state. --purge explicitly deletes the retained state and record,
and requires confirmed daemon shutdown.
A replaced unit, unit override or aliased state directory is refused.
Package removal is separate:
sudo dbl service prune --prefix /usr/local --version v0.1.0 --dry-runsudo dbl service prune --prefix /usr/local --version v0.1.0# Select a component package instead of the default full bundle:sudo dbl service prune --prefix /usr/local --version v0.1.0 --component executor --dry-runPruning supports administrator-owned system prefixes. --component selects
full (the default), cli, dispatcher or executor. Only that package’s
version directory is removed; other components, links and state remain.
It refuses unverified or aliased packages and anything referenced by a command
link, retained managed-role record or running executable. Default uninstall
therefore also keeps the package available for recovery. Stop foreground roles
and do not launch the version being pruned. User-owned prefixes remain
unsupported; an unreadable process or concurrent installer prevents pruning.
Foreground daemon logs
Section titled “Foreground daemon logs”dbl up, dbl dispatcher up and dbl executor up retain daemon diagnostics in
their state directory. Each role defaults to three files, including the active
file, of at most 10 MiB each, with a seven-day file-age limit:
dbl up --log-max-bytes 10485760 --log-files 3 --log-max-age 168hThe limits can be configured up to 100 MiB per file, 16 files and 720 hours.
The default total is at most 30 MiB per role (60 MiB for dbl up’s two roles).
Age checks run when opening or writing logs, using file timestamps on restart;
there is no background deletion while a role is idle or stopped. Age applies to
files, not individual entries. Lowering a byte limit keeps the newest bytes of
an unexpired active log and discards archives outside the new limits. An expired
active log is removed on restart even when the byte limit is also lowered.
New files are private (mode 0600). A write failure is reported and stops the
local operation through its normal child shutdown; output continues to drain
until children have joined, but bytes after the failure are not retained.
These limits cover daemon diagnostics, not stored measurement output. Managed system services send diagnostics to the journal; configure its retention through the host’s journal settings. See data retention for access, export and deletion behavior and the remaining deployment policy decisions.