feat(swarm): jq and labelled 50m x 5 container logs #44
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/swarm-jq-docker-logs"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
Swarm nodes need
jqas a system tool, for scripts and for inspecting whatdocker ... --format jsonprints. Their containers also need bigger logsthat carry every container label on each line, so log shippers can tell
services, stacks and tasks apart.
What changed
swarm_enabledset (theclusteredgroup) getsswarm_packages,[jq]by default. This is the first task of theswarmrole.
docker-engine's10mx3log default withjson-file,labels-regex: "^.+",max-size: "50m"andmax-file: "5".The options reach a node only when its host_vars run
docker-engineininstallmode. Other hosts keep the role default.docker-engineREADME now says how to adopt an engine installed byhand from download.docker.com: remove the hand-added apt source before
the first
installrun.The engine is never restarted. The options apply from the next engine
restart, and only to containers created after it.
How to verify
./tests/molecule/run.sh roles/swarmexits 0 with no^ERRORline:jqis installed, and the second run reports no change.
./tests/gates/check_docker_engine.sh: case 8 finds theclusteredlogoptions in
daemon.json, and case 2 still finds10mx3.Checks already run on the tip:
make checkpassed, on each commit.check_docker_engine.shpassed; its case 8 fails onmainat theassertion.
.agents/hooks/shellcheck.sh repopassed.make test(every molecule scenario, including the newswarmone, and the
tag_propagationgate), because podman was not available.Considerations
the repository is configured twice. If that source names a different key
file, apt stops reading its sources instead. The README states the
removal step but not this second case: a low review finding, set aside.
finding, set aside.