Skip to main content

Operations reference

Every action of the console (install, start, upgrade, backup, decommission and the others) is an operation made of ordered stages; a stage runs its tasks in parallel, one per host, and the next stage starts when every task of the stage has finished (CONTRACT.md section 11). This page lists the operation types, the stage names and the task types. It is generated by navin-manager/docs/tools/generate_reference.py from navin_manager/engine/core.py, navin_manager/services/planner.py, navin_manager/services/tasks.py, the locales and the agent handlers: do not edit it by hand.

Operation types​

The type is shown in the Operations page and stored in nm.operations.type. The stages column lists the stages the planner can add, in their order; a stage without tasks is not created.

Operation typeDescriptionStages
service.installInstall one or more services (install wizard), dependencies first; also used by Reinstall.provision the bindings; dependencies; preflight checks; node prerequisites (podman, Python, tar); users and directories; artifacts and images; configuration files and certificates; systemd units; start <components>; health checks; service check
blueprint.applyInstall the services of a blueprint (a whole topology described in one document); same stages as service.install.provision the bindings; dependencies; preflight checks; node prerequisites (podman, Python, tar); users and directories; artifacts and images; configuration files and certificates; systemd units; start <components>; health checks; service check
service.actionStart, stop, restart or rolling restart of components; also the failover of a service and the reconcile of a drift finding.start <components>; stop <components>; restart <components>; restart batch <batch> of <batches>; health checks of batch <batch> of <batches>; health checks
service.config_applyRender and write every configuration file, then restart the stale instances (rolling, all or none) and run the health checks.configuration files and certificates; configuration of the peers; restart <components>; restart batch <batch> of <batches>; health checks of batch <batch> of <batches>; health checks
service.commandRun a custom command of the catalog (its steps: command.run, health.check, service.control, file.write, logs.tail).command <command>
service.componentsAdd a component on hosts, or remove one instance.preflight checks; node prerequisites (podman, Python, tar); users and directories; artifacts and images; configuration files and certificates; systemd units; start <components>; health checks; stop <components>; remove the units; remove the records
service.uninstallStop the service, remove its units, optionally purge its data, then remove its records.stop <components>; remove the units; purge the data; remove the records
service.logsRead the last lines of the log of an instance (logs.tail).read the logs
service.modeChange the operating mode of a service (maintenance and the other modes of navin-manager/server/src/navin_manager/services/modes.py).see the description
service.upgradeUpgrade a service to a new release: canary host first, then host by host, migrations, new version recorded.canary <host>, new release; canary <host>, stop; canary <host>, files and units; canary <host>, start; canary <host>, health checks; canary <host>, smoke test; canary <host> upgraded; <host>, new release; <host>, stop; <host>, files and units; <host>, start; <host>, health checks; <host> upgraded; migration <migration>; new version recorded
service.rollbackBring an upgraded service back to its previous release.stop every instance; <host>, previous release; <host>, previous files and units; <host>, start; <host>, health checks; <host> back on the previous release; previous version recorded
service.restoreBring an upgraded service back to its previous release and restore the backup taken before the upgrade.see the description
backup.createBack up the data of services: directory, backup command, digests of the files, record.backup directory; backup; digests of the backup files; backup recorded
backup.restoreRestore a backup: integrity check, stop, restore, start, verification of the data.digests of the backup files; integrity of the backup; stop before the restore; restore; start after the restore; verification of the restored data; restore recorded
drift.scanCompare the digests of the managed files with the expected ones (drift detection).Digests of the managed files
network.firewall_membersSend the members of the cluster and the restricted ports to the host firewall of every host (job network.firewall_members, when a host joins, leaves or moves).Firewall of the nodes: ports between nodes open to the cluster only
support.bundleCollect the log tails of the instances and build a sanitized support archive.Log tails of the instances; Sanitized archive
acceptance.runInstallation acceptance: preflight, liveness, readiness, functional smoke tests, signed report.Acceptance: preflight; Acceptance: liveness of the instances; Acceptance: readiness of the services; Acceptance: functional smoke tests; Acceptance: signed report
host.preflightCollect the facts of a host again (facts.collect) and evaluate the preflight.see the description
host.factsRefresh the facts of a host (facts.collect).see the description
host.parametersApply the system parameters of a host (kernel parameters, limits).see the description
host.decommissionDecommission a host without components: the agent stops and forgets its identity, then the server records the host as decommissioned.see the description
host.ssh_bootstrapInstall and register the agent on hosts over SSH (fingerprint of each host key checked, key kept in memory only).see the description
host.node_bootstrapPrepare a node over SSH (node security: service account, sudoers, agent) before its registration.see the description
pki.rotateIssue new certificates for the instances of a service and restart them.see the description
mcp.hosting.applyApply the hosting of the MCP servers on the mcp-host service.see the description

Stage names​

Every stage name of the locales, as the console shows it. <service>, <host> and the other values in angle brackets are filled at planning time.

KeyName
hosts.stage.agentStop the agent
hosts.stage.cert_installInstall the certificates
hosts.stage.restartRestart the components
hosts.stage.revokeRevoke the certificates
hosts.stage.ssh_bootstrap_summaryVerdict of the connection
lifecycle.stage.acceptance_livenessAcceptance: liveness of the instances
lifecycle.stage.acceptance_preflightAcceptance: preflight
lifecycle.stage.acceptance_readinessAcceptance: readiness of the services
lifecycle.stage.acceptance_reportAcceptance: signed report
lifecycle.stage.acceptance_smokeAcceptance: functional smoke tests
lifecycle.stage.bundle_buildSanitized archive
lifecycle.stage.bundle_logsLog tails of the instances
lifecycle.stage.drift_scanDigests of the managed files
network.stage.firewall_membersFirewall of the nodes: ports between nodes open to the cluster only
services.stage.backup_digest<service>: digests of the backup files
services.stage.backup_done<service>: backup recorded
services.stage.backup_prepare<service>: backup directory
services.stage.backup_run<service>: backup
services.stage.command<service>: command <command>
services.stage.configure<service>: configuration files and certificates
services.stage.dependencies<service>: dependencies
services.stage.fetch<service>: artifacts and images
services.stage.forget<service>: remove the records
services.stage.health<service>: health checks
services.stage.logs<service>: read the logs
services.stage.nothing<service>: record
services.stage.peers<service>: configuration of the peers
services.stage.preflight<service>: preflight checks
services.stage.prepare<service>: users and directories
services.stage.prerequisites<service>: node prerequisites (podman, Python, tar)
services.stage.provision<service>: provision the bindings
services.stage.purge<service>: purge the data
services.stage.remove_units<service>: remove the units
services.stage.restart<service>: restart <components>
services.stage.restore_check<service>: integrity of the backup
services.stage.restore_digest<service>: digests of the backup files
services.stage.restore_done<service>: restore recorded
services.stage.restore_run<service>: restore
services.stage.restore_start<service>: start after the restore
services.stage.restore_stop<service>: stop before the restore
services.stage.restore_verify<service>: verification of the restored data
services.stage.rollback_configure<service>: <host>, previous files and units
services.stage.rollback_done<service>: previous version recorded
services.stage.rollback_fetch<service>: <host>, previous release
services.stage.rollback_health<service>: <host>, health checks
services.stage.rollback_host_done<service>: <host> back on the previous release
services.stage.rollback_start<service>: <host>, start
services.stage.rollback_stop<service>: stop every instance
services.stage.rolling_batch<service>: restart batch <batch> of <batches>
services.stage.rolling_health<service>: health checks of batch <batch> of <batches>
services.stage.service_check<service>: service check
services.stage.smoke<service>: functional smoke test
services.stage.start<service>: start <components>
services.stage.stop<service>: stop <components>
services.stage.units<service>: systemd units
services.stage.upgrade_canary_configure<service>: canary <host>, files and units
services.stage.upgrade_canary_done<service>: canary <host> upgraded
services.stage.upgrade_canary_fetch<service>: canary <host>, new release
services.stage.upgrade_canary_health<service>: canary <host>, health checks
services.stage.upgrade_canary_smoke<service>: canary <host>, smoke test
services.stage.upgrade_canary_start<service>: canary <host>, start
services.stage.upgrade_canary_stop<service>: canary <host>, stop
services.stage.upgrade_done<service>: new version recorded
services.stage.upgrade_host_configure<service>: <host>, files and units
services.stage.upgrade_host_done<service>: <host> upgraded
services.stage.upgrade_host_fetch<service>: <host>, new release
services.stage.upgrade_host_health<service>: <host>, health checks
services.stage.upgrade_host_start<service>: <host>, start
services.stage.upgrade_host_stop<service>: <host>, stop
services.stage.upgrade_migration<service>: migration <migration>

Task types run by the agent​

These tasks run on a host, one at a time, by the Navin agent (Python nm_agent/handlers.py and Go agent-go/internal/agent/handlers.go). Their payload is sealed in the database; the console shows only the summary.

Task typeDescription
agent.configUpdate agent.json from the Manager.
agent.decommissionStop the agent and forget the identity of the host.
archive.extractExtract an archive; absolute names, .., devices, FIFOs and escaping links are refused (archive_unsafe).
artifact.fetchDownload an artifact from the mirror and check its sha256 before it reaches its destination (checksum_mismatch otherwise).
cert.installWrite the certificate, key and CA of an instance.
command.runRun an allowed absolute program from its argument list, never through a shell.
dir.ensureCreate a directory with its owner, group and mode.
facts.collectCollect the facts of the host.
file.removeRemove a managed file.
file.writeWrite a file with its owner, group and mode; a sensitive content is masked in the logs.
files.digestCompute the sha256 of managed files (drift and backups).
firewall.openOpen the client ports of a component to every source and the ports only the cluster uses to the hosts of the cluster and the Manager (firewalld ipset and rich rules, or ufw rules per member).
health.checkRun the health checks (http, tcp, command) with their retries.
image.loadLoad a container image from the mirror and check its digest; with store, into the read-only image store <store>/storage that a rootless service user lists.
image.pullPull a container image from the registry and check its digest; with store, into the read-only image store <store>/storage that a rootless service user lists.
limits.applyWrite a limits file in /etc/security/limits.d.
link.ensurePoint a symbolic link (current, venv) to a release directory; with displace_dir a real directory in the way is kept as <link>.nm-legacy.
logs.tailRead the last lines of a journal or of a log file.
packages.installInstall system packages with dnf, apt or pacman, at the version pinned by the catalog, repository signatures always checked.
preflight.runRun the preflight checks of a service on the host.
python.venvCreate the virtual environment of one release from the wheelhouse of the mirror, with pip --require-hashes --no-index.
quadlet.unitWrite the Quadlet files of a Podman component (navin-*.container, navin-*.network in /etc/containers/systemd), disable and remove the systemd unit they replace, then reload systemd.
service.controlStart, stop, restart, enable or disable a component (systemd or process driver).
smoke.runRun the functional smoke test of a service.
sysctl.applyWrite and apply a file in /etc/sysctl.d.
systemd.maskStop, disable and mask the systemd units a distribution package starts on its own (distribution_units of the catalog, for example asterisk.service), only when each unit file belongs to a package of the install list; unmask only at uninstall, never start.
systemd.unitWrite a systemd unit and reload systemd.
user.ensureCreate the system account of a service; with subordinate_ids, give it subordinate uid and gid ranges of 65536 ids (usermod) for rootless Podman.

Task types run by the server​

These tasks have no host: the engine runs them inside the Manager (decorator @server_task).

Task typeDescription
server.host_decommissionedRecord the host as decommissioned once its agent stopped.
server.lifecycle.acceptance_preflightPreflight stage of the installation acceptance.
server.lifecycle.acceptance_reportBuild and sign the acceptance report.
server.lifecycle.backup_checkCheck the digests of a backup before a restore.
server.lifecycle.backup_doneRecord a finished backup.
server.lifecycle.instances_versionRecord the version now running on the upgraded instances.
server.lifecycle.restore_doneRecord a finished restore.
server.lifecycle.rollback_doneRecord the previous version after a rollback.
server.lifecycle.support_bundleBuild the sanitized support archive.
server.lifecycle.upgrade_doneRecord the new version after an upgrade.
server.node_bootstrapPrepare a node over SSH (runs in the background).
server.services.dependenciesCheck the dependencies of the services of the operation.
server.services.forgetRemove the records of an uninstalled service.
server.services.preflightEvaluate the preflight checks of the planned instances.
server.services.registerRecord an operation that needs no host task.
server.services.remove_instanceRemove the record of one instance.
server.ssh_bootstrapInstall and register the agent over SSH (runs in the background).
server.ssh_bootstrap_summaryVerdict of a multi-machine SSH bootstrap: fails the operation with ssh_bootstrap_partial when a machine was not connected, lists the machines connected otherwise.

Task statuses​

Statuses of a task (nm.tasks.status). An operation is pending, running, succeeded, failed or aborted; a stage is pending, running, succeeded, failed, aborted or skipped.

StatusDescription
waitingWaiting for the previous stages.
queuedReady, waiting for its agent to claim it.
runningClaimed and running.
succeededFinished without error.
failedFinished with an error.
timed_outNot finished within its timeout.
abortedStopped by an abort of the operation.
skippedNot run (operation stopped before it).