Skip to content

Commit

Permalink
chore: support unsupported flag for mkfs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
frezbo committed Aug 8, 2024
1 parent 9b9159d commit 2ac8d22
Show file tree
Hide file tree
Showing 45 changed files with 108 additions and 61 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions hack/release.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ 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
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]
Expand Down
4 changes: 2 additions & 2 deletions hack/test/e2e-qemu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down
19 changes: 13 additions & 6 deletions internal/pkg/partition/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 {
Expand Down Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion pkg/machinery/api/cluster/cluster.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions pkg/machinery/api/cluster/cluster_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/machinery/api/common/common.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/machinery/api/inspect/inspect.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions pkg/machinery/api/inspect/inspect_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/machinery/api/machine/machine.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions pkg/machinery/api/machine/machine_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/machinery/api/resource/config/config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/machinery/api/resource/definitions/block/block.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/machinery/api/resource/definitions/cri/cri.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/machinery/api/resource/definitions/enums/enums.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/machinery/api/resource/definitions/etcd/etcd.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/machinery/api/resource/definitions/files/files.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/machinery/api/resource/definitions/k8s/k8s.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/machinery/api/resource/definitions/perf/perf.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/machinery/api/resource/definitions/proto/proto.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/machinery/api/resource/definitions/time/time.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/machinery/api/resource/network/device_config.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2ac8d22

Please sign in to comment.