From c37234643cb4e647a35d68421b6ecd58d0ffc08b Mon Sep 17 00:00:00 2001 From: Noel Georgi Date: Wed, 11 Sep 2024 16:30:12 +0530 Subject: [PATCH] chore: drop `activateLogicalVolumes` sequencer step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop `activateLogicalVolumes` sequencer step. LVM package already ships proper udev rules to handle this. ```text ❯ tree lvm2/usr/lib/udev/rules.d/ lvm2/usr/lib/udev/rules.d/ ├── 10-dm.rules ├── 11-dm-lvm.rules ├── 13-dm-disk.rules ├── 69-dm-lvm.rules └── 95-dm-notify.rules 1 directory, 5 files ``` Fixes: #9300 Signed-off-by: Noel Georgi (cherry picked from commit e17fafaca2a16990bc424b54120c49ddbaf8cee1) --- .../pkg/runtime/v1alpha1/v1alpha1_sequencer.go | 4 ---- .../pkg/runtime/v1alpha1/v1alpha1_sequencer_tasks.go | 11 ----------- 2 files changed, 15 deletions(-) diff --git a/internal/app/machined/pkg/runtime/v1alpha1/v1alpha1_sequencer.go b/internal/app/machined/pkg/runtime/v1alpha1/v1alpha1_sequencer.go index 954248f79f..13b6ab5cf8 100644 --- a/internal/app/machined/pkg/runtime/v1alpha1/v1alpha1_sequencer.go +++ b/internal/app/machined/pkg/runtime/v1alpha1/v1alpha1_sequencer.go @@ -271,10 +271,6 @@ func (*Sequencer) Boot(r runtime.Runtime) []runtime.Phase { ).Append( "userSetup", pauseOnFailure(WriteUserFiles, constants.FailurePauseTimeout), - ).AppendWhen( - r.State().Platform().Mode() != runtime.ModeContainer, - "lvm", - ActivateLogicalVolumes, ).Append( "extendPCRStartAll", ExtendPCRStartAll, diff --git a/internal/app/machined/pkg/runtime/v1alpha1/v1alpha1_sequencer_tasks.go b/internal/app/machined/pkg/runtime/v1alpha1/v1alpha1_sequencer_tasks.go index 28be10774b..e7986a006f 100644 --- a/internal/app/machined/pkg/runtime/v1alpha1/v1alpha1_sequencer_tasks.go +++ b/internal/app/machined/pkg/runtime/v1alpha1/v1alpha1_sequencer_tasks.go @@ -2011,17 +2011,6 @@ func Install(runtime.Sequence, any) (runtime.TaskExecutionFunc, string) { }, "install" } -// ActivateLogicalVolumes represents the task for activating logical volumes. -func ActivateLogicalVolumes(runtime.Sequence, any) (runtime.TaskExecutionFunc, string) { - return func(ctx context.Context, logger *log.Logger, r runtime.Runtime) (err error) { - if _, err = cmd.Run("/sbin/lvm", "vgchange", "-ay"); err != nil { - return fmt.Errorf("failed to activate logical volumes: %w", err) - } - - return nil - }, "activateLogicalVolumes" -} - // KexecPrepare loads next boot kernel via kexec_file_load. // //nolint:gocyclo