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

Fixed setting unlimited maximum partition size #1142

Merged
merged 3 commits into from
Apr 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
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def convert
builder = Agama::Storage::VolumeTemplatesBuilder.new_from_config(config)
builder.for(dbus_volume["MountPath"] || "").tap do |target|
valid_dbus_properties.each { |p| conversion(target, p) }
target.max_size = Y2Storage::DiskSize.unlimited unless dbus_volume.key?("MaxSize")
end
end

Expand Down
6 changes: 6 additions & 0 deletions service/package/rubygem-agama-yast.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Apr 10 11:35:53 UTC 2024 - Ladislav Slezák <[email protected]>

- Fixed setting unlimited maximum partition size
(gh#openSUSE/agama#1065)

-------------------------------------------------------------------
Wed Apr 3 15:12:05 UTC 2024 - José Iván López González <[email protected]>

Expand Down
3 changes: 2 additions & 1 deletion service/test/agama/dbus/storage/manager_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,8 @@
expect(volume.mount_path).to eq("/")
expect(volume.auto_size).to eq(false)
expect(volume.min_size.to_i).to eq(5 * (1024**3))
expect(volume.max_size.to_i).to eq(20 * (1024**3))
# missing maximum value means unlimited size
expect(volume.max_size.to_i).to eq(-1)
expect(volume.btrfs.snapshots).to eq(false)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@
expect(volume.fs_type).to eq(Y2Storage::Filesystems::Type::BTRFS)
expect(volume.auto_size?).to eq(false)
expect(volume.min_size.to_i).to eq(5 * (1024**3))
expect(volume.max_size.to_i).to eq(10 * (1024**3))
# missing maximum value means unlimited size
expect(volume.max_size.to_i).to eq(-1)
expect(volume.btrfs.snapshots?).to eq(false)
end
end
Expand Down
Loading