455 Commits

Author SHA1 Message Date
Noel Georgi
136b129121
chore: drop semicolon for supporting vfat filesystems
Drop semicolon in generated cache to support copying image cache to vfat
filesystems.

Fixes: #9935

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-12-12 23:40:06 +05:30
Dmitriy Matrenichev
81805103de
chore: enable proper parallel usage of TestDepth
Rework the inners of `RunCLI` to support this.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-12-12 02:26:59 +03:00
Andrey Smirnov
707a77bf64
test: fix user namespace test, TPM2 fixes
Make sure the test runs on a specific node, wait for swtpm to be up.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-12-09 20:16:04 +04:00
Dmitriy Matrenichev
c4724fc975
chore: add integration tests for image-cache
Provide separate `integration/image-cache` tag.

Closes #9860

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-12-06 20:28:34 +03:00
Andrey Smirnov
e33d2f581f
feat: support overriding base OCI spec for CRI
Fixes #9827

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-29 16:22:25 +04:00
Andrey Smirnov
fc3b31575c
fix: multiple issues with opening encrypted volumes
Fixes #9820

This only affects volumes with multiple key slots configured.

Make sync issues non-fatal, so that if some keys fail to sync, proceed
with normal boot, but record an error in the `VolumeStatus` resource.

When opening, correctly try all key slots.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-28 21:34:41 +04:00
Andrey Smirnov
ef69c9d39b
feat: update Linux to 6.12.1
No other changes, just update default bundled module list.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-27 23:08:14 +04:00
Dmitry Sharshakov
a13f82c594
feat: udev: label device nodes
Use udev rules to assign basic device file labels based on their subsystem

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-11-22 12:42:22 +01:00
Dmitry Sharshakov
e899fb37fd
feat: label created files in /etc
Implement SELinux labeling support in EtcFileController, label both squashfs and runtime-created files in /etc and /system/etc.

Add corresponding test cases.

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-11-22 09:16:13 +01:00
Noel Georgi
77cf84fb57
feat: support generating iso with imagecache
Support generating iso with imagecache.

Part-of: #9616

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-21 20:40:05 +05:30
Dmitry Sharshakov
1a8cc5f8b2
feat: add SELinux labels to volumes
Label mounted filesystems like ephemeral, overlay mounts, as well as data directories (going to become volumes later).

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-11-21 14:23:43 +01:00
Andrey Smirnov
cc768037f8
feat: implement block device wipe
Fixes #9731

The wipe doesn't require a reboot, but it requires the blockdevice not
to be used as a volume.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-20 15:46:37 +04:00
Dmitriy Matrenichev
4dc58cfdf3
chore: small fixes
QoL PR

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-11-19 22:21:55 +03:00
Andrey Smirnov
f400ae911b
fix: small fixes for image cache generation
* print some progress
* properly save manifests for image refs which are both tagged and
  digested
* skip pulling duplicate blobs

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-20 00:02:38 +05:30
Noel Georgi
95b2fc946e
feat: image cache gen
Fixes: #9611

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-19 19:08:38 +05:30
Dmitriy Matrenichev
e26d0043e0
chore: code cleanup
More usage of slices package, less usage of package sort.

Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
2024-11-14 12:25:56 +03:00
Andrey Smirnov
43fe3807a8
feat: implement tracking of blockdevice secondaries
This is going to be used to detect disks that are safe to wipe.

For blockdevices, track secondaries as direct references, e.g. encrypted
`STATE` partition might have secondary `vda5`.

For disks, re-map secondaries to be whole devices names, e.g. `vda`.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-13 22:43:27 +04:00
Andrey Smirnov
9916e2cd8a
chore: update pkgs/tools/extras for Go 1.23.3
Bump some dependencies as well.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-12 16:38:32 +04:00
Andrey Smirnov
9a02ecc49f
feat: rewrite install disk selector to use CEL expressions
Rewrite matcher to take out old go-blockdevice library out of the way,
implementing translation from go-blockdevice format to CEL.

Implement facilities to build CEL expressions programmatically.

Now we can add a machine config disk match expression (CEL) easily.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-11 17:23:15 +04:00
Noel Georgi
2001167058
chore(ci): save support zip always after tests
Save `support.zip` always, also use a different folder for saving logs,
so we can save artifacts of multi cluster tests.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-08 19:18:06 +05:30
Noel Georgi
fb72e4b7b7
fix(ci): skip test if UserNamespacesSupport feature gate is not set
We should not just rely on the sysctl, also confirm that `UserNamespacesSupport=true`
feature gate is set for apiserver, so that the tests gets skipped if only sysctl is set.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-08 16:16:11 +05:30
Nico Berlee
11380f933d
feat: display current CPU frequency on dashboard
Dashboard now shows the active frequency of each CPU core when cpufreq
is available on non-virtualized systems, enhancing real-time accuracy.

Solves the issue of displaying 0MHz on certain SBCs due to
/proc/cpuinfo limitations.

Signed-off-by: Nico Berlee <nico.berlee@on2it.net>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-08 12:05:48 +04:00
Noel Georgi
942962bf00
docs: add docs on usernamespace support in k8s
Add docs and test for usernamespaces support in Kubernetes.

Fixes: #8554

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-07 22:09:02 +05:30
Noel Georgi
1800f81044
fix: selinux handling and apparmor tests
Conditionally mount selinuxfs only if it's present.

Fix AppArmor tests, `apparmor` and other minor LSM's and set
`apparmor=1`.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-07 07:50:00 +05:30
Noel Georgi
5112547d6b
chore: generate support zip for crashdump
Generate support zip on crashdump.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-06 15:54:21 +05:30
Dmitry Sharshakov
a867f85e4c
feat: label system socket and runtime files
Set SELinux labels so that services could gain access permissions.

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-11-06 07:29:35 +01:00
Andrey Smirnov
398f714cff
feat: update Linux 6.6.59, runc 1.2.1
Update Go dependencies, other releases.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-11-05 20:10:27 +04:00
Dmitry Sharshakov
960a040491
feat: start enabling SELinux
Part of: #9127

Label executables and processes, build, load and manage SELinux policy, enable audit support.

Labeling filesystems, devices and runtime files will be done in further changes, see the full PR.

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-11-04 16:56:53 +01:00
Noel Georgi
9abf16108e
feat: add auditd service
Adds a auditd service that gathers all audit logs from kernel.

Signed-off-by: Noel Georgi <git@frezbo.dev>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-11-02 22:25:04 +05:30
Andrey Smirnov
c755b6d7e4
fix: update the CRI sandbox image reference
Fix the test, and update the reference.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-10-28 14:52:19 +04:00
Andrey Smirnov
534b0ce183
feat: update runc to 1.2.0 final
Via pks.

See https://github.com/opencontainers/runc/releases/tag/v1.2.0

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-10-22 16:47:24 +04:00
Dmitry Sharshakov
29780d35a0
test: add an integration test for verifying process parameters
Validate capabilities are dropped and cgroup, UID, environment and OOM adjustments are set

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-10-18 16:59:41 +02:00
Andrey Smirnov
e0434d77d7
feat: update dependencies
Bring in new tools, pkgs, update Go dependencies and others.

In preparation for Talos 1.9.0-alpha.0.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-10-17 22:12:50 +04:00
Andrey Smirnov
9f0de9f43d
test: update provision upgrade tests for Talos 1.9
Use Talos 1.7 & Talos 1.8.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-10-16 15:08:19 +04:00
Andrey Smirnov
182325cb07
test: skip lvm test if not enough user disks available
E.g. in trusted-boot pipeline, we don't have extra disks.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-10-08 20:42:24 +04:00
Andrey Smirnov
0a2b4556c5
fix: volume encryption with failing keyslots
Fix the flow when a failing key slot leads to repeated attempts to open
the volume, while it's already open, but the failure was to sync other
keys.

Refactor the code to get rid of variable assignment in the outer block
from closures.

Fixes #9415

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-10-07 21:59:42 +04:00
Dmitry Sharshakov
b67bc73fd3
fix: fix mdadm system extension
Update pkgs to include a fixed version of systemd-udevd which searches for udev rules under /usr/etc/udev/rules.d as used by our system extensions.

Re-enable the affected test

Fixes #9423

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-10-04 19:51:25 +02:00
Andrey Smirnov
74861573a7
fix: multiple fixes for LVM activation
Two fixes were in pkgs/lvm2:

* https://github.com/siderolabs/pkgs/pull/1041
* https://github.com/siderolabs/pkgs/pull/1042

Other fixes in this PR:

* adjust the controller a bit for some interactions
* make Rook test use more complicated, encrypted setup which uses LVM
* adjust LVM test to handle a case when there's more than one worker

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-10-03 11:33:22 +04:00
Dmitry Sharshakov
74c12c20e0
feat: replace eudev with systemd-udevd
Eudev has seen less development effort recently with Gentoo and others moving towards using systemd-udevd which can now be built independently

Update pkgs, include more libraries, change udevd executable name

Signed-off-by: Dmitry Sharshakov <dmitry.sharshakov@siderolabs.com>
2024-10-02 19:08:40 +02:00
Noel Georgi
dec653bfe1
chore: better lvm2 tests
Use LVM2 tests that relies on module loading by lvm.

Fixes: #9300

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-10-01 16:08:44 +04:00
Andrey Smirnov
908fd8789c
feat: support cgroup deep analysis in talosctl
The new command `talosctl cgroups` fetches cgroups snapshot from the
machine, parses it fully, enhances with additional information (e.g.
resolves pod names), and presents a customizable view of cgroups
configuration (e.g. limits) and current consumption.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-09-30 18:57:12 +04:00
Noel Georgi
9fa08e8437
chore: refactor tests
Refactor tests to avoid code duplication.

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-09-20 16:22:01 +05:30
Noel Georgi
d8ab4981b6
feat: support lvm auto activation
Support lvm auto-activation as per
https://man7.org/linux/man-pages/man7/lvmautoactivation.7.html.

This changes from how Talos previously used to unconditionally tried to
activate all volume groups to based on udev events.

Fixes: #9300

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-09-20 14:42:56 +05:30
Andrey Smirnov
dd4185b144
feat: add KubeSpan extra endpoint configuration
Fixes #9174

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-09-06 14:50:12 +04:00
Andrey Smirnov
3038ccfa88
feat: add configuration for EPHEMERAL volume
Fixes #9261

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-09-06 14:11:35 +04:00
Andrey Smirnov
b453385bd9
feat: support volume configuration, provisioning, etc
This implements the first round of changes, replacing the volume backend
with the new implementation, while keeping most of the external
interfaces intact.

See #8367

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-08-30 18:32:34 +04:00
Andrey Smirnov
be2ebf6b4d
chore: bump dependencies
Update tools, pkgs, extras, Go dependencies, Go tools, etc.

Linux 6.6.47 and containerd 2.0.0-rc.4.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-08-29 20:44:37 +04:00
Andrey Smirnov
a9551b7caa
fix: host DNS access with firewall enabled
Explicitly enable access to host DNS from pod/service IPs.

Also fix the Kubernetes health checks to assert number of ready pods to
match expectation, otherwise the check might skip a pod (e.g.
`kube-proxy` one) which is not ready, allowing the test to proceed too
early.

Update DNS test to print more logs on error.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-08-27 15:44:14 +04:00
Noel Georgi
8fe39eacba
chore: move csi tests as go test
Move rook-ceph CSI tests as go tests.
This allows us to add more CSI tests in the future.

Fixes: #9135

Signed-off-by: Noel Georgi <git@frezbo.dev>
2024-08-26 18:18:09 +05:30
Andrey Smirnov
5ff6cf82ca
fix: drop /opt mount for containers/tink
The `/opt/cni/bin` in the rootfs contains CNI binaries, which get
overwritten by the volume mount.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2024-08-22 20:39:52 +04:00