Files
uncloud/website/docs/10-release-notes/v0.19.0.md
T

171 lines
7.9 KiB
Markdown
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
sidebar_position: -19.0
sidebar_label: v0.19.0
---
# v0.19.0
This page mirrors the [GitHub release](https://github.com/psviderski/uncloud/releases/tag/v0.19.0), which also includes
the full list of commits.
This release brings **easier debugging** of failed deploys, new **troubleshooting commands** (`uc machine logs` and `uc machine rtt`), and a **nightly release** channel.
Read on for the full list of changes and upgrade instructions.
## Show logs from a failed deploy
Changes: [8afe523](https://github.com/psviderski/uncloud/commit/8afe523), [303c8e4](https://github.com/psviderski/uncloud/commit/303c8e4), [56a54ab](https://github.com/psviderski/uncloud/commit/56a54ab)
When `uc deploy` fails because a pre-deploy hook failed or a new container couldn't become healthy, it now prints the last 10 (configurable) log lines from the failed container.
This is a quality-of-life improvement that saves you from running a follow-up `uc logs` to figure out what went wrong.
<img width="1253" height="871" alt="Screenshot 2026-04-24 at 2 01 22 pm" src="https://github.com/user-attachments/assets/69adcf19-ebe8-465e-8834-414c99c15260" />
See [Failed container logs](/docs/guides/deployments/rolling-deployments/#failed-container-logs) for more details.
## Filter service logs by container
Change: [2045819](https://github.com/psviderski/uncloud/commit/2045819)
`uc logs` now accepts a `SERVICE/CONTAINER` form where `CONTAINER` is a container name, full ID, or unique ID prefix. This is handy when one replica of a service is misbehaving and you want to look at it without the noise from the others:
```shell
uc logs web/2f60
# Mix and match
uc logs api/61d57fd3428f web/2f60 db
```
## Stream machine logs
⚠️ This requires both `uc` and the daemon to be [upgraded to v0.19.0](#upgrade-to-0190)
PRs: [#282](https://github.com/psviderski/uncloud/pull/282), [#283](https://github.com/psviderski/uncloud/pull/283). Thanks to [@miekg](https://github.com/miekg) for the contribution ❤️
You can now stream logs from the systemd services that run Uncloud itself on remote machines using the new `uc machine logs` command. It covers three main services:
- `uncloud` - the Uncloud daemon
- `uncloud-corrosion` - the Corrosion service providing the distributed cluster store
- `docker` - the Docker daemon
For example, stream the Uncloud daemon logs from all machines with:
```shell
uc machine logs -f uncloud
```
This is useful for troubleshooting Uncloud operations without having to SSH into every machine and run `journalctl` yourself.
See [`uc machine logs`](/docs/cli-reference/uc_machine_logs) for more details and examples.
## Round-trip time between machines
⚠️ This requires both `uc` and the daemon to be [upgraded to v0.19.0](#upgrade-to-0190)
PR: [#226](https://github.com/psviderski/uncloud/pull/226). Thanks to [@jabr](https://github.com/jabr) for the contribution ❤️
The new `uc machine rtt` command shows the round-trip time between every pair of machines in the cluster. This gives you a real-time view of how the mesh network is performing without needing to run manual `ping` tests.
The data is collected from Corrosion's gossip protocol, which samples latency between peers as part of its normal operation.
```shell
$ uc machine rtt
MACHINE PEER MEDIAN STDDEV
machine-1 machine-2 140ms ±19.4ms
machine-1 machine-3 39ms ±1.1ms
machine-2 machine-1 168ms ±18.5ms
machine-2 machine-3 203ms ±42.3ms
machine-3 machine-1 40ms ±2.0ms
machine-3 machine-2 158ms ±15.2ms
```
A new `RTT` column has also been added to `uc wg show` to show the median round-trip time to each WireGuard peer.
## Local machine upstreams first in Caddyfile
Change: [45cf87a](https://github.com/psviderski/uncloud/commit/45cf87a)
The generated Caddyfile now lists upstreams from the local machine first for each service.
On its own this doesn't change routing behaviour (Caddy's default `random` load balancing policy ignores order). But if you pair it with the `first` policy in a custom Caddy config, you can always prefer the same-host replica and only fall back to remote machines when the local one is unhealthy.
```yaml
services:
app:
...
x-caddy: |
example.com {
reverse_proxy {{upstreams 8000}} {
import common_proxy
lb_policy first
}
log
}
```
This saves a cross-machine WireGuard hop for every request that hits Caddy on the machine which already has a replica of the target service. This is especially useful if you have a multi-region setup.
## Nightly builds
PR: [#308](https://github.com/psviderski/uncloud/pull/308). Thanks to [@tonyo](https://github.com/tonyo) for the contribution ❤️
Every push to `main` now produces a set of nightly binaries tagged as the [`nightly` release](https://github.com/psviderski/uncloud/releases/tag/nightly) on GitHub.
They're great for testing upcoming unreleased changes and reporting regressions early. They might be unstable, so please don't run them in production.
Install the nightly `uc` CLI locally:
```shell
curl -fsS https://get.uncloud.run/install.sh | VERSION=nightly sh
```
Initialise a cluster or add a machine with a nightly daemon:
```shell
uc machine init --version nightly user@host
uc machine add --version nightly user@host
```
## Improvements
- `uc machine init/add` now embed the install script into the `uc` binary and send it to the remote machine over the existing SSH connection instead of `curl | bash` ([fe829ef](https://github.com/psviderski/uncloud/commit/fe829ef)).
- New `uc ctx show` command prints the name of the currently active cluster context, great for shell prompts and scripts ([#317](https://github.com/psviderski/uncloud/pull/317)).
- SSH connections now use `-o StrictHostKeyChecking=accept-new`, which silently accepts host keys on first connection but still protects against key changes later ([#303](https://github.com/psviderski/uncloud/pull/303)).
- The `STORE` column in `uc images` is hidden when all machines use the containerd image store, which is the default for new clusters ([c38d916](https://github.com/psviderski/uncloud/commit/c38d916))
- Image push errors now include the underlying error from the unregistry proxy, which makes it much easier to tell apart a broken image push from a broken SSH tunnel ([d340659](https://github.com/psviderski/uncloud/commit/d340659))
- `ucind` now accepts a `UNCLOUD_CONFIG` environment variable to override the config file path for development clusters ([#315](https://github.com/psviderski/uncloud/pull/315)).
- New `ucind cluster ls` command lists the local development clusters managed by `ucind` with their machines ([#316](https://github.com/psviderski/uncloud/pull/316)).
## Bug fixes
- Fixed containerd socket auto-detection for unregistry after a machine reboot ([47199c3](https://github.com/psviderski/uncloud/commit/47199c3)).
- Fixed Caddy config being regenerated on every service change because container records were serialised non-deterministically ([#111](https://github.com/psviderski/uncloud/issues/111)).
- Fixed SSH control socket path on WSL2 when the runtime directory doesn't exist ([#319](https://github.com/psviderski/uncloud/issues/319)).
- Fixed a stale SSH `ControlMaster` connection sometimes causing `uc machine init`/`add` to hang ([fdbffbf](https://github.com/psviderski/uncloud/commit/fdbffbf)).
## Upgrade to 0.19.0
### Uncloud CLI locally
To upgrade the Uncloud CLI (`uc`) locally:
```bash
# Homebrew (macOS, Linux)
brew upgrade uncloud
# Install script (macOS, Linux)
curl -fsS https://get.uncloud.run/install.sh | sh
```
### Machine daemon
To upgrade the Uncloud daemon on your machines, run the following commands on each machine:
```bash
ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
curl -fsSL -o uncloudd.tar.gz https://github.com/psviderski/uncloud/releases/download/v0.19.0/uncloudd_linux_${ARCH}.tar.gz
tar -xf uncloudd.tar.gz
sudo install uncloudd /usr/local/bin/uncloudd
rm uncloudd uncloudd.tar.gz
sudo systemctl restart uncloud
```