Skip to content

Lampyr v0.1.0

Choose a tag to compare

@github-actions github-actions released this 07 Nov 17:07
· 37 commits to main since this release
bdadca5

Lampyr 0.1.0 built from bdadca5.

Install with scripts/install-ly.sh v0.1.0.

Images:

  • ghcr.io/hyperlight-dev/lampyr/fiberd:0.1.0@sha256:6d611a590a0b6a0e0279bdf9c2eb2f141788b4c5c37507c35fb27b7d51c3f2e2
  • ghcr.io/hyperlight-dev/lampyr/fiber-router:0.1.0@sha256:46e6f1c7f4c3209f23914055d50616af43f988308e8fe53bb15af8af71288605
  • ghcr.io/hyperlight-dev/lampyr/hluk-helper:0.1.0@sha256:7aa3d7c8fc244008e921daf5f29a5c0092b74e8757b8993676493e365313e935
  • ghcr.io/hyperlight-dev/lampyr/azure-node-setup:0.1.0@sha256:faf195746f5dea6790dcadb03684ed20b51bc3ab126f18cea9c5a710c686e9d9
  • ghcr.io/hyperlight-dev/lampyr/eventgrid-controller:0.1.0@sha256:d1139e5488a51e7d6f016dc15d0820491130d3b3eda403452d9fa6a6b14c972d
  • ghcr.io/hyperlight-dev/lampyr/eventgrid-adapter:0.1.0@sha256:4ef1b3f3db79fa13019f4f0bc08ebfa06d5d032e16fd7b11a0276eb907e0e8e9
  • ghcr.io/hyperlight-dev/lampyr/upstream-fiberd:0.1.0@sha256:4eb2d7fe1fd151ee35116e932d1b76831ed7fa447a81da255115175fffb4fdfb
  • ghcr.io/hyperlight-dev/lampyr/fiberd-k8s-controller:0.1.0@sha256:bd60d3ff348dc1f83119330c9feab2b0ce47e5b704f3ded5cd6a9a375bdcc111

Added

  • fiber-router takes -acquire-timeout (default 3s): how long a request waits for its grant's home, and then, separately, for that home's clone, so a request can wait about twice the flag before a 503. A grant already at fibers.max is answered with 503 and Retry-After rather than sent to another home. A home's clone rate limit (stock fiberd's, up to 200 clones a second after a burst of 200, covering starts and attaches) is backpressure, not a shed: the request waits about its Retry-After, jittered, and tries again within the same deadline, and gets 503 with Retry-After only if the deadline would pass first. So is a grant Pod's helper refusing a Clone while it restores too many Fibers to start one more in time (see Fixed): the request waits 250ms to 1s and tries again, and the home is not passed over. A Clone that reached no home, as when a rollout has replaced the grant's Pod, asks for the grant's homes again and tries again within that deadline, and a home's IP that doesn't accept a connection within a second fails such a Clone rather than holding it; a home that accepts has 3 seconds to finish its TLS handshake. Large bursts of cold requests on a small node may need more.
  • fiber-router serves Prometheus metrics on port 9090 (lampyr_router_fibers_busy, lampyr_router_fiber_acquire_seconds, lampyr_router_request_duration_seconds, lampyr_router_shed_total, lampyr_router_clone_retries_total). The platform NetworkPolicy does not admit scrapers by default.
  • Versioned vX.Y.Z releases published from tags through the preview release gates, with committed version checks.
  • Releases publish the stock fiberd image grant Pods run (ghcr.io/hyperlight-dev/lampyr/upstream-fiberd) and fiberd-k8s-controller's image (ghcr.io/hyperlight-dev/lampyr/fiberd-k8s-controller), built from the commits pinned in upstream/pins.env until those projects publish their own: Azure/fiberd's and Azure/fiberd-k8s-controller's. The platform package carries the controller's install manifest, running that image by digest, and ly cluster install takes controllerManifest, grantImage and helperImage from it, pinned to the published upstream-fiberd and hluk-helper digests, for an install not given them. An install records only the inputs it was given, so a reinstall from an upgraded platform takes the upgraded defaults.
  • Standalone Applications: ly scaffold service NAME --standalone creates a customer-owned server (Express, FastAPI, Gin, Axum or ASP.NET Core) that Lampyr builds, snapshots and runs as Fibers like a Handler Application.
  • macOS ARM64 provider support: releases publish a lampyr-platform-darwin-arm64 setup bundle plus digest-pinned KVM/HVF provider snapshot indexes for Kind, k3d and Azure, with local ARM cold-boot fallback. Release archives carry each provider's pinned index digest and repository but not the snapshots, which ly pulls for the host on a provider's first start.
  • ly build records the helper's facts when the platform has the helper (build/hluk-helper), so ly deploy can seal a fiberd template: it runs the platform's lampyr-hluk-helper --version where the snapshot is made (the KVM builder Pod or the local KVM host), checks the facts against the snapshot and records them in the artifact. Without the helper it builds as before and notes that the artifact can't be deployed to a cluster; a helper that fails --version is an error. The Linux and macOS platform packages carry what it and ly deploy need: the Linux/amd64 helper, and zygotectl and grant-issuer, which seal and push templates and make the fleet key, built from the pinned fiberd for the package's own platform. On macOS, build with --context so the helper runs in the cluster's builder Pod.
  • ly deploy of an artifact built with the helper seals its template to the cluster's fleet key, pushes it to the installation's one template repository, lampyr/fiberd-templates in its registry, tagged with the Revision's name, and records it on the new Revision by digest as lampyr.dev/fiberd-template. An existing Revision keeps the template it was created with.
  • Deployed services get the service bindings their projects declare: a grant Pod's lampyr-hluk-helper gives each Fiber LAMPYR_BINDING_NAME URLs for the bound Services in cluster DNS, LAMPYR_FIBER_ID, and the Pod's nameservers with ndots:1, leaving out link-local ones, which Hyperlight-Unikraft drops (a Pod with only those, as with AKS LocalDNS or NodeLocal DNSCache, fails the warm). A Fiber with bindings may connect to the addresses their names resolve to, on any port, and send DNS questions for those names over UDP to the Pod's nameservers and the well-known public resolvers (8.8.8.8, 8.8.4.4, 1.1.1.1 and 1.0.0.1); Lampyr Services share the cluster's internal ingress, so any binding reaches every Knative Service through it. A Fiber without bindings still has no egress. A resumed park keeps the variables it was cloned with, so its LAMPYR_FIBER_ID names its first incarnation; /run/fiberd/incarnation has the current fence.

Changed

  • Workspaces declare ingress.services instead of ingress.service. Native dev generates <service>.default.localhost routes and exposes only listed services. Missing lists expose nothing and warn locally. Deployment uses the same list for Knative visibility; unlisted services and services deployed outside a workspace default to cluster-local. Redeploy affected services after changing exposure.
  • ly dev always uses snapshot-based Fiber execution for services and workspaces. The cold-run path and --experimental flag are removed. Runtime templates honor LAMPYR_LISTEN_HOST; upgrade existing Handler adapters before local development.
  • Breaking: manifests (Node.js, Python, Go, Rust, .NET) must declare application: {type: handler} or application: {type: standalone, command: ...}; top-level command and protocols are rejected, so native gRPC is unavailable for now. Wasm support is removed until a handler contract is defined.
  • Hyperlight-Unikraft is now v0.21.0 from crates.io and its release assets (previously a fork of v0.19.1 for providers and v0.19.0 for services), with hyperlight-host 0.19.0. v0.21.0 refuses snapshots saved by earlier releases, v0.20.1's included. A cluster from before this release ran snapshots in its fiberdImage home; the reinstall this release requires replaces that home with grant Pods running the helper image (helperImage), whose lampyr-hluk-helper links v0.21.0, so every service must be rebuilt and redeployed. To upgrade, install the new ly and reinstall the platform (or rebuild custom provider artifacts) first, because ly cluster install refuses provider artifacts built for an older runtime. Then run ly cluster install again with a helperImage in --provider-config, or with none to take the updated platform's, and, for an installation created with --provider, --provider-artifact set to the new provider artifact (for example ~/.lampyr/platforms/VERSION/providers/PROVIDER/artifact), because such an installation keeps using the provider artifact it first approved. Finally run ly build and ly deploy for every service.
  • Breaking: a Service's home is now a grant Pod of fiberd-k8s-controller, which makes the Pod's memory limit its request too, so the scheduler places a home only where its whole memory limit is free. Its 10 GiB ephemeral-storage limit becomes its request the same way, where the old home requested 1 GiB, so each home reserves 10 GiB of its node's allocatable ephemeral storage and a node fits at most that storage divided by 10 GiB homes, about nine on a node with 100 GB allocatable; one that fits no node stays Pending with Insufficient ephemeral-storage. Its CPU stays a request with no limit, as before: 10m up to 100 Fibers, then a millicore per allowed Fiber, at most two CPUs, so a home is never throttled while it restores Fibers. Operator args on the home, such as -max-restores, are no longer kept; the helper bounds restores in their place (see Fixed).
  • Breaking: ly deploy refuses to create a new Revision from an artifact without a fiberd template, since grant Pods run only fiberd templates; rebuild with ly build where the platform has the helper.
  • Breaking: ly cluster install installs cert-manager and its csi-driver unless the cluster has them, and fiberd-k8s-controller in place of Lampyr's grant issuer. It now requires the installation inputs controllerManifest (the controller's manifest, which has no release yet), grantImage (the fiberd image grant Pods run), helperImage (the lampyr-hluk-helper image) and zygoteRegistries (the repositories grant Pods pull templates from); a reinstall keeps the ones the last install was given. A release's platform package supplies the first three (see Added). ly deploy pushes every template to one repository. If a given zygoteRegistries admits a local registry mirror's in-cluster target, it is lampyr/fiberd-templates in that mirror, pushed through the mirror's host key and pulled from its target, as on Kind and k3d. Otherwise it is the first given entry, pushed through a mirror's host key at the given path if its registry is a local mirror's in-cluster target, so the host can reach it, and to the entry directly if not. Without zygoteRegistries, a mirror can be the template registry only if it is a local registry, keyed localhost, 127.0.0.1 or ::1, or reached over plain HTTP and keyed by no public registry such as docker.io, as the Kind and k3d providers and an install on an existing cluster can name in registryMirrors; zygoteRegistries then defaults to its repository spelled as grant Pods reach it. Without exactly one such mirror, as on AKS, the install is refused until it gives zygoteRegistries. A given list must admit the repository spelled as grant Pods reach it, and several admitted mirrors are refused. Each entry must name a registry and a path, such as myacr.azurecr.io/templates, in the form the GrantPolicy takes (a registry that is localhost or has a dot or a port, a lowercase path, no tag or digest), which ly cluster install checks for every entry before the provider creates anything. Grant Pods pull templates without credentials, so that repository must allow anonymous pulls; each template is sealed to the cluster's fleet key. The Eventing ACR allows none, so an AKS install without zygoteRegistries is refused before the provider creates anything. Reinstall once so the installation records its template repository for ly deploy.
  • Breaking: ly status prints a capacity line per active Revision, with its CapacityGrant's state as fiberd-k8s-controller reports it and its Fiber limit, in place of active fibers and epoch: a grant Pod serves only mutual TLS to fiber-router, so ly can't read them. ly scale waits up to 4 minutes for the controller to report the resized grant Ready with its Pod replaced, and fails at once if the controller refuses it. ly logs and ly audit read every running grant Pod of the Service. ly logs reads the helper's log, /var/lib/fiberd/run/<Pod UID>/zygote.log, since stock fiberd sends the helper's output there rather than to the container log, and ly audit reads stock fiberd's spool under /var/lib/fiberd/private and keeps the records stamped with the Pod's UID, which is fiberd's grant UID in that Pod.
  • The fiberd image (fiberdImage) now carries only the serving controller: Lampyr's own fiberd home, its hluk backend and the grant controller are removed, since grant Pods run stock fiberd and the helper.
  • On AKS, a Service's home no longer runs under Lampyr's AppArmor profile: grant Pods run with fiberd-k8s-controller's security context, as on every other provider, because the controller refuses a grant whose Pod carries an AppArmor annotation. Its hyperlight runtime runs privileged, so AppArmor leaves grant Pods unconfined. The node-setup DaemonSet no longer loads the profile and only loads the KVM modules, so AKS installs have no cleanup DaemonSet. A node that loaded the profile keeps it loaded, unused, until it reboots. Confining grant Pods again needs fiberd-k8s-controller to admit an AppArmor profile its GrantPolicy lists.
  • Breaking: lampyr-hluk-helper 0.3.0 prints its template-dir capability on a second --version line, which fiberd needs before it passes --template-dir, and ly build refuses a helper without it. Templates built by an earlier helper never warm and must be rebuilt; a Revision that already has one keeps it. The helper's facts are part of the artifact's Revision ID, so rebuilding unchanged sources for another helper, or with the helper where an earlier build had none, deploys a new Revision with a new template rather than the existing one.
  • lampyr-hluk-helper fails a Fiber's birth when its port has more listeners than one sock_diag reply holds (about 260), as the kernel may have missed or repeated a listener between replies. Where sock_diag can't be asked or answers an error, the helper reads /proc/net/tcp for that search and says so once for each kind of error: helper: sock_diag: {err}; reading /proc/net/tcp for listeners this time. If it can't install its SIGRTMAX handler, it says helper: SIGRTMAX {why}; a KILL waits out its fiber's step once, and a KILL then waits for the Fiber's current step to return, up to 250 ms.

Fixed

  • A grant Pod's lampyr-hluk-helper restores at most two Fibers per CPU it may use at once (at most 16, or the helper's --max-restores), in arrival order, and, once it has an estimate of restore time, refuses at once with an ERROR a CLONE or RESUME whose deadline can't cover the restores ahead of it, starting the refusal with restores-busy: so fiber-router can tell it from a failing helper; a helper with nothing restoring always restores, and fiberd's probe clone never waits. A KILL of a queued Fiber takes it out of the queue. Without the bound, 1000 cold requests arriving together starve the grant Pod, as they starved the old home until its liveness probe failed. fiber-router now also counts a grant at fibers.max as a shed, with Retry-After. This replaces the home's -max-restores, which grant Pods, running stock fiberd, no longer take (see Changed).
  • A grant Pod's lampyr-hluk-helper serves a burst of cold requests sooner: the demos/lampyr-tour burst of 1,000 requests ramps up in about 60 s on the test host, down from about 98 s. A birth finds the guest's listeners once rather than twice, asking the kernel through sock_diag for the listeners on that one port rather than reading every socket in /proc/net/tcp, which in a grant Pod walks the host's whole table. A freed restore slot wakes only the head of the queue rather than every waiter. An idle Fiber's thread wakes every 250 ms rather than every 10 ms, and a KILL still ends it at once. A guest listening on ::ffff:0.0.0.0 now counts as taking the endpoint's connections to 127.0.0.1, rather than failing its birth.
  • fiber-router's 502, 503 and 504 responses no longer carry the internal error behind them, which named Fibers' addresses on their homes and could name fiberd-k8s-controller's URL and grant Pods' addresses: each now has a fixed message, keeps any Retry-After it had, and the router logs the error instead.
  • ly deploy no longer sets timeoutSeconds: 30 on the Knative Service, so new Revisions get Knative's default of 300 seconds instead of a 502 after 30 seconds for long requests, streams and WebSockets. Existing Revisions keep the timeout they were created with; the new default applies from the next ly deploy of changed code.
  • A Service's home now sizes its memory ceiling from autoscaling.knative.dev/max-scale above 100 Fibers: 16 MiB per allowed Fiber, at most 64 GiB, instead of a fixed 1.5 GiB, and requests a millicore of CPU per Fiber, at most two CPUs, with no CPU limit (see Changed). Upgrading replaces every home, since each is now fiberd-k8s-controller's grant Pod. A ly scale that changes the Fiber limit replaces the home Pod, and fails with the scheduler's message if no node fits it for 30 seconds. ly scale accepts at most 4096 Fibers.
  • Building and installing from a checkout no longer fails under umask 002, the default on Ubuntu and Debian: provider artifact and platform permission checks now accept group write access from the user's own private group (named after the user, with no other members or accounts) on local-filesystem entries without a POSIX ACL, when nsswitch.conf reads accounts and groups from local sources, and still refuse anything other users can write to. The errors name the absolute path, the reason and the chmod go-w fix.
  • Fibers restored from one service snapshot no longer share userspace random state: with the v0.19.0 runtime images, Node's crypto.randomBytes, crypto.randomUUID and Math.random returned the same values in every fiber. The images from v0.20.1 on reseed each runtime's generators on restore, and the Kind integration test now checks that three fresh fibers of a Node and a Python service draw different values.