Repository navigation
Remote protocol: 1. Every change in this release is additive: mm 0.1.2
works with hosts on 0.1.1, and hosts on 0.1.2 keep serving mm 0.1.1. Some
features need the host upgraded too (mm target setup plan --upgrade), and
remote hosts now refuse more Compose settings; see Changed and Fixed.
Added
- A host exception for host paths:
host-pathin anallowentry of
/etc/mm/host.yaml, with the paths inpaths, lets one service bind-mount
exactly those host paths recursively read-only (long syntax with
read_only: trueandbind.recursive: readonly), such as/procand
/sysfor a metrics exporter.mmdplans one only on Docker Engine 25
(API 1.44) or later on Linux 5.12 or later, as its engine reports; a Podman
host refuses host paths for now. Allowing a path hands the repo
what it holds:/procshows every other project's processes, environment
variables and files on the host, and a path with an engine socket or
secrets in it, such as/, is root on the host. A policy that lists/,
/run,/var/run,/var/lib/docker,/var/lib/containers,
/var/lib/containerd,/etc/mm,/var/lib/mm,/root,/home,
/etc/shadowor/etc/ssh, a path above or inside
one, or a path inside/proc, is refused;mmdchecks each path after
resolving symlinks. See "Collect host metrics" in the remote access guide. mm target preference set-address ENVIRONMENT NODE HOST[:PORT]connects
this device to a cluster node at an address of its own, such as a VPN
address, without changing the repo. The node's recorded host key and daemon
identity are checked as before.unset-addressgoes back to the repo's
address,showlists them, andmm target nodes, the terminal UI and
MM_UNREACHABLEsay when one is in effect.mm config validate,mm doctorand the deployment plan warn
(MM_HEALTHCHECK_ARGUMENTS) about a Compose health check in exec form
(CMD) with an argument that contains whitespace or is empty, on Podman:
Podman before 5.8 splits such an argument, so the check never passes. The
warning names the service and file and gives the equivalentCMD-SHELL
check.deploy.failure-log-linessets how many last lines of a failed container's
log a deployment keeps;mm deploy statusshows them after a rollback
removed the container.
Changed
mm build --publishalso builds the modules that environments on remote
targets run with the same build variant, so a receipt from a build-only
environment such ascideploys to an environment whose services it does
not run. A CI publish can therefore build more images and take longer.
Modules with build secrets outsidecredential-only-secretsare still
built only where they run. The plan shows the environments each module is
for, andmm deploy plan --receiptrefuses a receipt that lacks a module
the environment runs before asking any host. Builds without--publish
are unchanged.- A deployment keeps the last 200 lines of a failed container's log, bounded
to 64 KiB with secret values hidden, instead of 20, also on a single host. - A first deployment that fails while a stack starts is no longer removed:
nothing ran before it, so the stacks it started keep running as they are,
the failed one too, and the error names them with the commands to look at
them and deploy again. The next deployment applies over them, so healthy
stacks such as a database are not started again from scratch. A
deployment that replaces one that ran still rolls back as before.
Fixed
- Security: a remote host or cluster node no longer runs a service that
reaches the host or another container without an exception.
container:NAMEinpid,ipcandnetwork_modeis refused
(container-join, which no exception allows; useservice:<service>). A
service:join that reaches a service with a host namespace needs the same
exception as that service, such aspid-host. A guardrail key whose value
comes from a variable, such asprivileged: ${PRIVILEGED:-true}, a
security_optentry,externalor a secret'sfile, is refused as the
feature it could turn on; write the value itself. A quoted
privileged: "true"and theexternal: {name: ...}form are caught too.
mm config validate --for-remotereports the same. - Security: a remote host checks more Compose keys against the values it
runs rather than a list of known-bad ones. A config's or secret'sfile
reached through a symlink or a..out of the project counts as
file-outside-project, andcap_addentries in lower case, such as
cap_chown, are no longer refused by mistake. Breaking for remote
targets; each needs a change or a host exception:security_optaccepts onlyno-new-privilegesandseccomp=builtin
without thesecurity-optexception, so a custom seccomp profile, SELinux
label or AppArmor profile is refused.- A namespace mode other than the service's own, a
service:join or
hostiscontainer-join, which no exception allows; Podman's
userns_mode: keep-idandnomapneeduserns-host, and
network_mode: slirp4netnsandpastaneednetwork-host. - A volume or network
name:must be the stack's Compose project name on
that host or start with it and_; any other needsexternal-volumeor
external-network.mm config validate --for-remotewarns
(MM_REMOTE_GUARDRAIL_NAME). Do not just removename:from a volume
that holds data: Compose would create a new, empty volume. Have the host
admin allowexternal-volumefor<stack>/volume:<key>, or move the data
first.
- A container that resolves its own
tasks.<service>name as soon as it
starts finds itself:mmdreads the engine for a lookup from a container it
has not seen yet before answering it, for up to three seconds when the
engine is slow to list its containers, instead of letting the name fall
through to the host's resolvers. - A build context reaches the engine with directories at 0755 and files at
0644, or 0755 when executable, whatever the umaskmm buildruns under, so
a non-root user in the image can read whatCOPYput there. The context
hash now records these modes, so every module rebuilds once after the
upgrade. A receipt promotes to another environment only when it and the
hosts'mmdare both on this release or later; otherwise build that
environment again. - On Podman hosts,
mm config validateand the plan refuse a config file or
secret file entry of a service whose Compose file picks its own user
namespace, such asuserns_mode: auto:size=1024, when the entry names an
owner other than root or a mode not every user can read
(MM_USER_NAMESPACE). Such a file used to reach the container owned by an
id it does not have, unreadable for a mode such as0400. - On Podman hosts, a service whose Compose file sets a plain
userns_mode: autogets mm's own user ids, as a service without
userns_modedoes, so a secret file or config file withuid: "1000"and
mode: 0o400reaches it owned by its uid 1000. A stack with several Compose
files takes theuserns_modeof the last file that sets one, a service
takes the one of the service itextends, a tag such as!overridestands
for its value, anduserns_mode: ~or""counts as not set. - On Docker Engine with
userns-remap, the plan refuses a secret file or
config file that names an owner other than root or a mode not every user
can read (MM_USER_NAMESPACE), instead of handing over a file the
container's users cannot read. A service in the host's user namespace
(userns_mode: hostorhost-user-namespace) keeps such files.
0644, or 0755 when its owner may execute it (the bit Git records), whatever
the umaskmm buildruns under, so a non-root user in the image can read
whatCOPYput there. The context hash now records these modes, so every
module rebuilds once after the upgrade. A receipt promotes to another
environment only when it and the hosts'mmdare both on this release or
later; otherwise build that environment again. - On Podman hosts, a config file or secret file of a service whose Compose
file sets its ownuserns_mode, such asauto, no longer reaches the
container owned by an unknown id:mm config validateand the plan refuse
an entry whose owner or mode cannot hold there (MM_USER_NAMESPACE) and say
to removeuserns_mode, which gives the service ids of its own. - An
internal: truenetwork that spans cluster nodes no longer takes a
container's default route, which cut a container that is also on an
ordinary network off from the internet and from the other nodes. Podman
creates it withno_default_route=trueand Docker Engine as an internal
network, where mm's firewall rules accept the traffic between its
containers on different nodes, replies included. The first deployment
after upgrading creates an existing one again and restarts the services on
it. - A network whose
internalsetting changes is created again with a reason
in the plan:with a default routeorwithout a default routeafter its
old addresses, instead of the same addresses twice. - A host pulls the images a stack or a job lacks in a step of its own before
anything starts, with the registry logins, underdeploy.pull-timeout
(default20m). A large image on a slow registry no longer fails the
deployment withMM_PROCESS_TIMEOUTafter 120 seconds.mm deploy apply
andmm deploy statusshow which image a host is pulling. compose up,compose down, and stopping replaced containers no longer
stop after a fixed limit (two minutes on Podman, five on Docker). The limit
now comes from the stack'sstop_grace_periodvalues, including ones set
from variables or inherited throughextends, and from the health checks
other services wait for. A cluster rollout waits that long on top of its
own steps.- Processes in a container on a Podman host whose kernel runs AppArmor can
signal each other again.mm target setupinstalls and loads the
mm-containersprofile, Podman's own plus signals andptrace (read)
between the processes a container sees, and points Podman at it. A
service that shares the host's or another container's process namespace
getsmm-containers-shared-pid, Podman's rules unchanged, and a plan
that would run such a service undermm-containersis refused.mm doctor
warns about a host whose containers run under Podman's default profile
(MM_PODMAN_APPARMOR). - A job whose image pull takes longer than 30 seconds keeps its claim on the
run while it pulls, so a second worker no longer launches the same run
again, and the job keeper ofmmdlooks after the other runs' timeouts and
cancels meanwhile. A cancel stops the pull. pull_policy: daily,weeklyandevery_<duration>images are pulled on
every deployment, likealways, instead of only when missing; the time a
host spends finding which images it lacks counts against
deploy.pull-timeout.- A job stopped at its timeout keeps the output it wrote, and
mm deploy logs
andmm job historyshow it. mm job runof a job withretryno longer waits forever after a failed
attempt: reading the runs starts the next attempt once it is due.