1225 config collector elemental (#32)

Co-authored-by: Mauro Morales <mauro.morales@spectrocloud.com>
Co-authored-by: Itxaka <itxaka.garcia@spectrocloud.com>
Co-authored-by: Dimitris Karakasilis <dimitris@spectrocloud.com>
This commit is contained in:
Dimitris Karakasilis
2023-06-07 12:28:37 +03:00
committed by GitHub
parent 1e1638f258
commit a113147f8a
13 changed files with 663 additions and 50 deletions

View File

@@ -78,15 +78,6 @@ func layoutPlugin(l logger.Interface, s schema.Stage, fs vfs.FS, console plugins
return errors.New("Target disk not found")
}
if s.Layout.Expand != nil {
l.Infof("Extending last partition up to %d MiB", s.Layout.Expand.Size)
out, err := dev.ExpandLastPartition(s.Layout.Expand.Size)
if err != nil {
l.Error(out)
return err
}
}
for _, part := range s.Layout.Parts {
_, err := utils.GetFullDeviceByLabel(runner, part.FSLabel, 1)
if err == nil {
@@ -111,7 +102,16 @@ func layoutPlugin(l logger.Interface, s schema.Stage, fs vfs.FS, console plugins
return fmt.Errorf("Formatting partition failed: %s\nError: %w", out, err)
}
}
return nil
}
if s.Layout.Expand != nil {
l.Infof("Extending last partition up to %d MiB", s.Layout.Expand.Size)
out, err := dev.ExpandLastPartition(s.Layout.Expand.Size)
if err != nil {
l.Error(out)
return err
}
}
return nil
}