chore: support unsupported flag for mkfs

Support `unsupported` flag for mkfs, so that `STATE` partition with size
less than 300M can be created by `mkfs.xfs`.

This allows to bring in newer `xfsprogs` that can repair corrupted FS
better.

Signed-off-by: Noel Georgi <git@frezbo.dev>
This commit is contained in:
Noel Georgi 2024-08-08 16:12:45 +05:30
parent 9b9159d1e0
commit 2ac8d2274f
No known key found for this signature in database
GPG Key ID: 21A9F444075C9E36
45 changed files with 108 additions and 61 deletions

View File

@ -17,11 +17,11 @@ ZSTD_COMPRESSION_LEVEL ?= 18
CI_RELEASE_TAG := $(shell git log --oneline --format=%B -n 1 -- HEAD^2 | head -n 1 | sed -r "/^release\(.*\)/ s/^release\((.*)\):.*$$/\\1/; t; Q")
ARTIFACTS := _out
TOOLS ?= ghcr.io/siderolabs/tools:v1.8.0-alpha.0-6-g31ad71b
TOOLS ?= ghcr.io/siderolabs/tools:v1.8.0-alpha.0-8-ga764e8d
PKGS_PREFIX ?= ghcr.io/siderolabs
PKGS ?= v1.8.0-alpha.0-43-g99650c8
EXTRAS ?= v1.8.0-alpha.0-3-gcab51d8
PKGS ?= v1.8.0-alpha.0-46-g124d35b
EXTRAS ?= v1.8.0-alpha.0-5-g6f4a373
KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest
CONFORMANCE_IMAGE ?= ghcr.io/siderolabs/conform:latest

View File

@ -17,8 +17,8 @@ preface = """\
[notes.updates]
title = "Component Updates"
description = """\
Kubernetes: 1.31.0-beta0
Linux: 6.6.43
Kubernetes: 1.31.0-rc.1
Linux: 6.6.44
containerd: 2.0.0-rc.3
runc: 1.2.0-rc.2
etcd: 3.5.15
@ -26,7 +26,7 @@ Flannel: 0.25.5
Flannel CNI plugin: 1.5.1
CoreDNS: 1.1.13
Talos is built with Go 1.22.5.
Talos is built with Go 1.22.6.
"""
[notes.apparmor]

View File

@ -194,8 +194,8 @@ function create_cluster {
--cpus="${QEMU_CPUS:-2}" \
--cpus-workers="${QEMU_CPUS_WORKERS:-2}" \
--cidr=172.20.1.0/24 \
--user-disk=/var/lib/extra:100MB \
--user-disk=/var/lib/p1:100MB:/var/lib/p2:100MB \
--user-disk=/var/lib/extra:350MB \
--user-disk=/var/lib/p1:350MB:/var/lib/p2:350MB \
--install-image="${INSTALLER_IMAGE}" \
--with-init-node=false \
--cni-bundle-url="${ARTIFACTS}/talosctl-cni-bundle-\${ARCH}.tar.gz" \

View File

@ -16,9 +16,10 @@ import (
// FormatOptions contains format parameters.
type FormatOptions struct {
Label string
FileSystemType FileSystemType
Force bool
Label string
FileSystemType FileSystemType
Force bool
UnsupportedFSOption bool
}
// NewFormatOptions creates a new format options.
@ -33,6 +34,11 @@ func Format(devname string, t *FormatOptions, printf func(string, ...any)) error
}
opts := []makefs.Option{makefs.WithForce(t.Force), makefs.WithLabel(t.Label)}
if t.UnsupportedFSOption {
opts = append(opts, makefs.WithUnsupportedFSOption(t.UnsupportedFSOption))
}
printf("formatting the partition %q as %q with label %q\n", devname, t.FileSystemType, t.Label)
switch t.FileSystemType {
@ -87,9 +93,10 @@ func systemPartitionsFormatOptions(label string) *FormatOptions {
}
case constants.StatePartitionLabel:
return &FormatOptions{
Label: constants.StatePartitionLabel,
FileSystemType: FilesystemTypeXFS,
Force: true,
Label: constants.StatePartitionLabel,
FileSystemType: FilesystemTypeXFS,
Force: true,
UnsupportedFSOption: true,
}
case constants.EphemeralPartitionLabel:
return &FormatOptions{

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: cluster/cluster.proto
package cluster

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v5.27.2
// - protoc-gen-go-grpc v1.4.0
// - protoc v5.27.3
// source: cluster/cluster.proto
package cluster
@ -26,6 +26,8 @@ const (
// ClusterServiceClient is the client API for ClusterService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// The cluster service definition.
type ClusterServiceClient interface {
HealthCheck(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (ClusterService_HealthCheckClient, error)
}
@ -74,6 +76,8 @@ func (x *clusterServiceHealthCheckClient) Recv() (*HealthCheckProgress, error) {
// ClusterServiceServer is the server API for ClusterService service.
// All implementations must embed UnimplementedClusterServiceServer
// for forward compatibility
//
// The cluster service definition.
type ClusterServiceServer interface {
HealthCheck(*HealthCheckRequest, ClusterService_HealthCheckServer) error
mustEmbedUnimplementedClusterServiceServer()

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: common/common.proto
package common

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: inspect/inspect.proto
package inspect

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v5.27.2
// - protoc-gen-go-grpc v1.4.0
// - protoc v5.27.3
// source: inspect/inspect.proto
package inspect
@ -27,6 +27,10 @@ const (
// InspectServiceClient is the client API for InspectService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// The inspect service definition.
//
// InspectService provides auxiliary API to inspect OS internals.
type InspectServiceClient interface {
ControllerRuntimeDependencies(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ControllerRuntimeDependenciesResponse, error)
}
@ -52,6 +56,10 @@ func (c *inspectServiceClient) ControllerRuntimeDependencies(ctx context.Context
// InspectServiceServer is the server API for InspectService service.
// All implementations must embed UnimplementedInspectServiceServer
// for forward compatibility
//
// The inspect service definition.
//
// InspectService provides auxiliary API to inspect OS internals.
type InspectServiceServer interface {
ControllerRuntimeDependencies(context.Context, *emptypb.Empty) (*ControllerRuntimeDependenciesResponse, error)
mustEmbedUnimplementedInspectServiceServer()

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: machine/machine.proto
package machine

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v5.27.2
// - protoc-gen-go-grpc v1.4.0
// - protoc v5.27.3
// source: machine/machine.proto
package machine
@ -79,6 +79,8 @@ const (
// MachineServiceClient is the client API for MachineService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// The machine service definition.
type MachineServiceClient interface {
ApplyConfiguration(ctx context.Context, in *ApplyConfigurationRequest, opts ...grpc.CallOption) (*ApplyConfigurationResponse, error)
// Bootstrap method makes control plane node enter etcd bootstrap mode.
@ -962,6 +964,8 @@ func (c *machineServiceClient) ImagePull(ctx context.Context, in *ImagePullReque
// MachineServiceServer is the server API for MachineService service.
// All implementations must embed UnimplementedMachineServiceServer
// for forward compatibility
//
// The machine service definition.
type MachineServiceServer interface {
ApplyConfiguration(context.Context, *ApplyConfigurationRequest) (*ApplyConfigurationResponse, error)
// Bootstrap method makes control plane node enter etcd bootstrap mode.

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/config/config.proto
package config

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/block/block.proto
package block

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/cluster/cluster.proto
package cluster

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/cri/cri.proto
package cri

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/enums/enums.proto
package enums

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/etcd/etcd.proto
package etcd

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/extensions/extensions.proto
package extensions

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/files/files.proto
package files

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/hardware/hardware.proto
package hardware

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/k8s/k8s.proto
package k8s

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/kubeaccess/kubeaccess.proto
package kubeaccess

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/kubespan/kubespan.proto
package kubespan

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/network/network.proto
package network

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/perf/perf.proto
package perf

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/proto/proto.proto
package proto

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/runtime/runtime.proto
package runtime

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/secrets/secrets.proto
package secrets

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/siderolink/siderolink.proto
package siderolink

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/time/time.proto
package time

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/definitions/v1alpha1/v1alpha1.proto
package v1alpha1

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: resource/network/device_config.proto
package network

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: security/security.proto
package security

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v5.27.2
// - protoc-gen-go-grpc v1.4.0
// - protoc v5.27.3
// source: security/security.proto
package security
@ -26,6 +26,8 @@ const (
// SecurityServiceClient is the client API for SecurityService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// The security service definition.
type SecurityServiceClient interface {
Certificate(ctx context.Context, in *CertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error)
}
@ -51,6 +53,8 @@ func (c *securityServiceClient) Certificate(ctx context.Context, in *Certificate
// SecurityServiceServer is the server API for SecurityService service.
// All implementations must embed UnimplementedSecurityServiceServer
// for forward compatibility
//
// The security service definition.
type SecurityServiceServer interface {
Certificate(context.Context, *CertificateRequest) (*CertificateResponse, error)
mustEmbedUnimplementedSecurityServiceServer()

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: storage/storage.proto
package storage

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v5.27.2
// - protoc-gen-go-grpc v1.4.0
// - protoc v5.27.3
// source: storage/storage.proto
package storage
@ -27,6 +27,8 @@ const (
// StorageServiceClient is the client API for StorageService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// StorageService represents the storage service.
type StorageServiceClient interface {
Disks(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*DisksResponse, error)
}
@ -52,6 +54,8 @@ func (c *storageServiceClient) Disks(ctx context.Context, in *emptypb.Empty, opt
// StorageServiceServer is the server API for StorageService service.
// All implementations must embed UnimplementedStorageServiceServer
// for forward compatibility
//
// StorageService represents the storage service.
type StorageServiceServer interface {
Disks(context.Context, *emptypb.Empty) (*DisksResponse, error)
mustEmbedUnimplementedStorageServiceServer()

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.2
// protoc v5.27.2
// protoc v5.27.3
// source: time/time.proto
package time

View File

@ -1,7 +1,7 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc v5.27.2
// - protoc-gen-go-grpc v1.4.0
// - protoc v5.27.3
// source: time/time.proto
package time
@ -28,6 +28,8 @@ const (
// TimeServiceClient is the client API for TimeService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
//
// The time service definition.
type TimeServiceClient interface {
Time(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*TimeResponse, error)
TimeCheck(ctx context.Context, in *TimeRequest, opts ...grpc.CallOption) (*TimeResponse, error)
@ -64,6 +66,8 @@ func (c *timeServiceClient) TimeCheck(ctx context.Context, in *TimeRequest, opts
// TimeServiceServer is the server API for TimeService service.
// All implementations must embed UnimplementedTimeServiceServer
// for forward compatibility
//
// The time service definition.
type TimeServiceServer interface {
Time(context.Context, *emptypb.Empty) (*TimeResponse, error)
TimeCheck(context.Context, *TimeRequest) (*TimeResponse, error)

View File

@ -14,7 +14,7 @@ import (
const (
// DefaultKernelVersion is the default Linux kernel version.
DefaultKernelVersion = "6.6.43-talos"
DefaultKernelVersion = "6.6.44-talos"
// KernelModulesPath is the default path to the kernel modules without the kernel version.
KernelModulesPath = "/lib/modules"
@ -902,7 +902,7 @@ const (
DBusClientSocketPath = "/run/dbus/system_bus_socket"
// GoVersion is the version of Go compiler this release was built with.
GoVersion = "go1.22.5"
GoVersion = "go1.22.6"
// KubernetesTalosAPIServiceName is the name of the Kubernetes service to access Talos API.
KubernetesTalosAPIServiceName = "talos"

View File

@ -1 +1 @@
v1.8.0-alpha.0-3-gcab51d8
v1.8.0-alpha.0-5-g6f4a373

View File

@ -1 +1 @@
v1.8.0-alpha.0-43-g99650c8
v1.8.0-alpha.0-46-g124d35b

View File

@ -10,9 +10,10 @@ type Option func(*Options)
// Options for makefs.
type Options struct {
Label string
Force bool
Reproducible bool
Label string
Force bool
Reproducible bool
UnsupportedFSOption bool
}
// WithLabel sets the label for the filesystem to be created.
@ -37,6 +38,13 @@ func WithReproducible(reproducible bool) Option {
}
}
// WithUnsupportedFSOption sets the unsupported filesystem option.
func WithUnsupportedFSOption(unsupported bool) Option {
return func(o *Options) {
o.UnsupportedFSOption = unsupported
}
}
// NewDefaultOptions builds options with specified setters applied.
func NewDefaultOptions(setters ...Option) Options {
var opt Options

View File

@ -55,6 +55,10 @@ func XFS(partname string, setters ...Option) error {
args = append(args, "-L", opts.Label)
}
if opts.UnsupportedFSOption {
args = append(args, "--unsupported")
}
args = append(args, partname)
_, err := cmd.Run("mkfs.xfs", args...)