Skip to content

Legion 0.1.5

Choose a tag to compare

@grepjava grepjava released this 31 Oct 14:55
· 1043 commits to main since this release

Fixes since 0.1.0, and the jail runtime and image store shared with jailer, the image builder made for Legion.

Fixes:

  • Node roles: managers were recorded and listed as workers (legion list nodes), so node.role == manager placement constraints matched no node. A node's role now comes from its certificate, and nodes already registered get it back when they next register.
  • Removing containers: removing a container right after it served a TCP connection could fail with "dataset is busy", its jail still dying while the connection timed out. Its root is now unmounted by force first.
  • Failed starts: a container start that failed partway left mounts behind; a Linux container's /dev/shm could then be missing on the next start. A failed start now unmounts all it mounted.
  • IPv6 in pods: a pod's first connection to a site with an IPv6 address waited about 30 seconds: a new VNET has no address selection policies, so it tried IPv6 first, which pods cannot reach outside the cluster. Pods now get the host's IPv4-preferring table.
  • Mount targets with .. are refused before anything is made for them.
  • Image store: copying a root without ZFS no longer goes through a temporary file in /tmp; pushes and exports hold the image's files against a removal or prune meanwhile, and write the blobs they pack again by renaming them into place.

For tools built on Legion's crates (jailer):

  • legion-runtime holds the runtime trait; legion-jail runs standalone containers on the host's addresses, attached runs and build steps (cleaned up when cancelled), and confines a container to CPUs with the org.freebsd.jail.cpuset annotation; legion-image keeps layers as directories without ZFS, keeps blobs, registers built images (with manifest annotations), pins, exports and pushes; legion-net's pod network can use another bridge, interface prefix, IPv6 range (or none) and MTU.

Docs: IMAGES.md builds images with jailer; COMPARISON.md compares Legion with CBSD and BastilleBSD too.

Install

On FreeBSD 15 for amd64, as root:

tar -xf legion-0.1.5-freebsd15-amd64.tar.xz --strip-components 1 -C /usr/local

then follow Install in the README. To upgrade from 0.1.0: service legion stop, unpack as above, service legion start; running containers are adopted.

Check the download with sha256 -c $(cat legion-0.1.5-freebsd15-amd64.tar.xz.sha256 | cut -d ' ' -f 1) legion-0.1.5-freebsd15-amd64.tar.xz.