Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blueprint: clarify filesystem type customization name #1097

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/blueprint/disk_customizations.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ func (p *PartitionCustomization) validatePlain(mountpoints map[string]bool) erro
}
// TODO: allow empty fstype with default from distro
if !slices.Contains(validPlainFSTypes, p.FSType) {
return fmt.Errorf("unknown or invalid filesystem type for mountpoint %q: %s", p.Mountpoint, p.FSType)
return fmt.Errorf("unknown or invalid filesystem type (fs_type) for mountpoint %q: %s", p.Mountpoint, p.FSType)
}
if err := validateFilesystemType(p.Mountpoint, p.FSType); err != nil {
return err
Expand Down Expand Up @@ -523,7 +523,7 @@ func (p *PartitionCustomization) validateLVM(mountpoints, vgnames map[string]boo

// TODO: allow empty fstype with default from distro
if !slices.Contains(validPlainFSTypes, lv.FSType) {
return fmt.Errorf("unknown or invalid filesystem type for logical volume with mountpoint %q: %s", lv.Mountpoint, lv.FSType)
return fmt.Errorf("unknown or invalid filesystem type (fs_type) for logical volume with mountpoint %q: %s", lv.Mountpoint, lv.FSType)
}
}
return nil
Expand Down
8 changes: 4 additions & 4 deletions pkg/blueprint/disk_customizations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func TestPartitioningValidation(t *testing.T) {
},
},
},
expectedMsg: "invalid partitioning customizations:\nunknown or invalid filesystem type for mountpoint \"/home\": ntfs",
expectedMsg: "invalid partitioning customizations:\nunknown or invalid filesystem type (fs_type) for mountpoint \"/home\": ntfs",
},
"unhappy-plain-badfstype-boot": {
partitioning: &blueprint.DiskCustomization{
Expand Down Expand Up @@ -243,7 +243,7 @@ func TestPartitioningValidation(t *testing.T) {
},
},
},
expectedMsg: "invalid partitioning customizations:\nunknown or invalid filesystem type for mountpoint \"/boot\": zfs",
expectedMsg: "invalid partitioning customizations:\nunknown or invalid filesystem type (fs_type) for mountpoint \"/boot\": zfs",
},
"unhappy-plain-badfstype-efi": {
partitioning: &blueprint.DiskCustomization{
Expand Down Expand Up @@ -823,7 +823,7 @@ func TestPartitioningValidation(t *testing.T) {
},
},
},
expectedMsg: "invalid partitioning customizations:\nunknown or invalid filesystem type for logical volume with mountpoint \"/var/log\": btrfs",
expectedMsg: "invalid partitioning customizations:\nunknown or invalid filesystem type (fs_type) for logical volume with mountpoint \"/var/log\": btrfs",
},
"unhappy-lv-notype": {
partitioning: &blueprint.DiskCustomization{
Expand All @@ -842,7 +842,7 @@ func TestPartitioningValidation(t *testing.T) {
},
},
},
expectedMsg: "invalid partitioning customizations:\nunknown or invalid filesystem type for logical volume with mountpoint \"/var/log\": ",
expectedMsg: "invalid partitioning customizations:\nunknown or invalid filesystem type (fs_type) for logical volume with mountpoint \"/var/log\": ",
},
"unhappy-bad-part-type": {
partitioning: &blueprint.DiskCustomization{
Expand Down
4 changes: 2 additions & 2 deletions pkg/disk/partition_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2235,7 +2235,7 @@ func TestNewCustomPartitionTableErrors(t *testing.T) {
options: nil,
// NOTE: this error message will change when we allow empty fs_type
// in customizations but with a requirement to define a default
errmsg: "error generating partition table: invalid partitioning customizations:\nunknown or invalid filesystem type for mountpoint \"/\": ",
errmsg: "error generating partition table: invalid partitioning customizations:\nunknown or invalid filesystem type (fs_type) for mountpoint \"/\": ",
},
"lvm-notype-nodefault": {
customizations: &blueprint.DiskCustomization{
Expand All @@ -2259,7 +2259,7 @@ func TestNewCustomPartitionTableErrors(t *testing.T) {
options: nil,
// NOTE: this error message will change when we allow empty fs_type
// in customizations but with a requirement to define a default
errmsg: "error generating partition table: invalid partitioning customizations:\nunknown or invalid filesystem type for logical volume with mountpoint \"/\": ",
errmsg: "error generating partition table: invalid partitioning customizations:\nunknown or invalid filesystem type (fs_type) for logical volume with mountpoint \"/\": ",
},
"bad-pt-type": {
options: &disk.CustomPartitionTableOptions{
Expand Down
Loading