Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
d227909
Adapt model schema for reused VGs
joseivanlopez Mar 19, 2026
272469f
Adapt conversion to model for reused VGs
joseivanlopez Mar 19, 2026
405caa6
Reorganize tests
joseivanlopez Mar 23, 2026
ca0a2db
Adapt conversion from model for reused VGs
joseivanlopez Mar 23, 2026
6ca4cab
Adapt storage model to reuse VGs (#3303)
joseivanlopez Mar 24, 2026
72c1c9e
Add missing attributes to config schema
joseivanlopez Mar 25, 2026
41e3708
Add available volume groups to system schema
joseivanlopez Mar 24, 2026
b346362
Add available volume groups to the system info
joseivanlopez Mar 24, 2026
dfb4cee
Avoid planning for skipped or deleted devices
joseivanlopez Mar 25, 2026
92b06b5
Fix conversion to model
joseivanlopez Mar 25, 2026
6105a1b
Fix model support checker
joseivanlopez Mar 25, 2026
b99aaae
Add config checks for reused volume groups
joseivanlopez Mar 25, 2026
8cee759
Fix typos
joseivanlopez Mar 31, 2026
a5f9e05
Separate issues for MD members and PVs
joseivanlopez Apr 7, 2026
ecb2ac5
Fixes for reusing LVM (#3333)
joseivanlopez Apr 9, 2026
5fc7c3a
Update openapi types
joseivanlopez Mar 27, 2026
1639ace
Rename conversion methods
joseivanlopez Mar 30, 2026
69e36ef
wip: allow reusing volume groups
joseivanlopez Mar 31, 2026
43e51ed
Allow configuring space policy for VGs
joseivanlopez Apr 7, 2026
5988bcc
Do not offer VGs as target for new Vgs
joseivanlopez Apr 8, 2026
5803c8e
Allow reusing LVs
joseivanlopez Apr 8, 2026
d527004
refactor(web): rewrite DeviceSelectorModal with tabbed device selection
dgdavid Apr 9, 2026
5e09372
fix(web): do not render Annotation when children is empty
dgdavid Apr 9, 2026
60adac4
refactor: web: adapt device menu callers to tabbed DeviceSelectorModal
dgdavid Apr 9, 2026
3877fc9
Recover menu option for creating new VG
joseivanlopez Apr 9, 2026
7d2a6bd
Do not offer already configured devices
joseivanlopez Apr 9, 2026
cffacb2
Fix sid of the physical volumes
joseivanlopez Apr 9, 2026
5f6ccf0
Show names of the MD members and PVs
joseivanlopez Apr 9, 2026
6ad31f0
refactor(web): derive initial tab from the effective initial device
dgdavid Apr 9, 2026
d3f70b8
feat(web): add current content column to MdRaidsTable
dgdavid Apr 9, 2026
5fa930b
fix(web): please linters
dgdavid Apr 9, 2026
362df04
Fix selector for reusing a VG
joseivanlopez Apr 10, 2026
b9e994d
Some small text changes
joseivanlopez Apr 10, 2026
c13ae33
fix(web): adapt tests to the volume group reuse changes
dgdavid Apr 10, 2026
43ab145
Fix current content of MD RAIDs
joseivanlopez Apr 10, 2026
a7e1e44
Simplify text
joseivanlopez Apr 10, 2026
3bd1dd2
Adapt text for adding LVs
joseivanlopez Apr 10, 2026
1c67184
Fix validation of LV name
joseivanlopez Apr 10, 2026
91c7303
Remove props
joseivanlopez Apr 10, 2026
b16391b
web: Adjust size of DeviceSelectorModal
ancorgs Apr 11, 2026
f8a3bd1
web: Adjust texts when changing the device of a storage definition
ancorgs Apr 13, 2026
6f61600
web: Adjust texts for adding new storage definitions
ancorgs Apr 13, 2026
0a29263
Remove test
joseivanlopez Apr 13, 2026
118d021
UI for reusing LVM volume groups (#3330)
joseivanlopez Apr 13, 2026
ce810a8
Merge branch 'master' into feature-reuse-vg-ui
joseivanlopez Apr 13, 2026
51ae010
refactor(web): unify DeviceSelectorModal API with tab-keyed props
dgdavid Apr 13, 2026
e5e1fe0
test(web): increase coverage of DeviceSelectorModal tests
dgdavid Apr 13, 2026
16294b5
Changelogs
joseivanlopez Apr 13, 2026
8221110
Merge branch 'master' into feature-reuse-vg-ui
joseivanlopez Apr 13, 2026
0356bb9
Small changes for DeviceSelectorModa props API (#3381)
ancorgs Apr 13, 2026
1c0a9ee
Merge branch 'master' into feature-reuse-vg-ui
ancorgs Apr 14, 2026
91ce461
web: Add guard clause to mitigate sporious error
ancorgs Apr 14, 2026
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
11 changes: 9 additions & 2 deletions rust/agama-lib/share/storage.model.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,14 @@
"additionalProperties": false,
"required": ["vgName"],
"properties": {
"name": { "type": "string" },
"vgName": { "type": "string" },
"extentSize": { "type": "integer" },
"targetDevices": {
"type": "array",
"items": { "type": "string" }
},
"spacePolicy": { "$ref": "#/$defs/spacePolicy" },
"logicalVolumes": {
"type": "array",
"items": { "$ref": "#/$defs/logicalVolume" }
Expand All @@ -110,12 +112,17 @@
"type": "object",
"additionalProperties": false,
"properties": {
"name": { "type": "string" },
"lvName": { "type": "string" },
"mountPath": { "type": "string" },
"filesystem": { "$ref": "#/$defs/filesystem" },
"size": { "$ref": "#/$defs/size" },
"stripes": { "type": "integer" },
"stripeSize": { "type": "integer" }
"stripeSize": { "type": "integer" },
"size": { "$ref": "#/$defs/size" },
"delete": { "type": "boolean" },
"deleteIfNeeded": { "type": "boolean" },
"resize": { "type": "boolean" },
"resizeIfNeeded": { "type": "boolean" }
}
},
"spacePolicy": {
Expand Down
46 changes: 45 additions & 1 deletion rust/agama-lib/share/storage.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@
{ "$ref": "#/$defs/advancedLogicalVolumesGenerator" },
{ "$ref": "#/$defs/logicalVolume" },
{ "$ref": "#/$defs/thinPoolLogicalVolume" },
{ "$ref": "#/$defs/thinLogicalVolume" }
{ "$ref": "#/$defs/thinLogicalVolume" },
{ "$ref": "#/$defs/logicalVolumeToDelete" },
{ "$ref": "#/$defs/logicalVolumeToDeleteIfNeeded" }
]
},
"advancedLogicalVolumesGenerator": {
Expand Down Expand Up @@ -366,6 +368,31 @@
"filesystem": { "$ref": "#/$defs/filesystem" }
}
},
"logicalVolumeToDelete": {
"type": "object",
"additionalProperties": false,
"required": ["delete", "search"],
"properties": {
"search": { "$ref": "#/$defs/deleteLogicalVolumeSearch" },
"delete": {
"description": "Delete the logical volume.",
"const": true
}
}
},
"logicalVolumeToDeleteIfNeeded": {
"type": "object",
"additionalProperties": false,
"required": ["deleteIfNeeded", "search"],
"properties": {
"search": { "$ref": "#/$defs/deleteLogicalVolumeSearch" },
"deleteIfNeeded": {
"description": "Delete the logical volume if needed to make space.",
"const": true
},
"size": { "$ref": "#/$defs/size" }
}
},
"logicalVolumeStripes": {
"description": "Number of stripes.",
"type": "integer",
Expand Down Expand Up @@ -587,6 +614,23 @@
"ifNotFound": { "$ref": "#/$defs/searchCreatableActions" }
}
},
"deleteLogicalVolumeSearch": {
"anyOf": [
{ "$ref": "#/$defs/searchAll" },
{ "$ref": "#/$defs/searchName" },
{ "$ref": "#/$defs/deleteLogicalVolumeAdvancedSearch" }
]
},
"deleteLogicalVolumeAdvancedSearch": {
"type": "object",
"additionalProperties": false,
"properties": {
"condition": { "$ref": "#/$defs/logicalVolumeSearchCondition" },
"sort": { "$ref": "#/$defs/logicalVolumeSearchSort" },
"max": { "$ref": "#/$defs/searchMax" },
"ifNotFound": { "$ref": "#/$defs/searchActions" }
}
},
"logicalVolumeSearchCondition": {
"anyOf": [
{ "$ref": "#/$defs/searchConditionName" },
Expand Down
5 changes: 5 additions & 0 deletions rust/package/agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Apr 13 15:21:17 UTC 2026 - José Iván López González <jlopez@suse.com>

- Update storage schemas (gh#agama-project/agama#3380).

-------------------------------------------------------------------
Fri Apr 10 13:46:02 UTC 2026 - Ladislav Slezák <lslezak@suse.com>

Expand Down
5 changes: 5 additions & 0 deletions rust/share/system.storage.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
"type": "array",
"items": { "type": "integer" }
},
"availableVolumeGroups": {
"description": "SIDs of the available LVM volume groups",
"type": "array",
"items": { "type": "integer" }
},
"candidateDrives": {
"description": "SIDs of the drives that are candidate for installation",
"type": "array",
Expand Down
25 changes: 16 additions & 9 deletions service/lib/agama/dbus/storage/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -399,15 +399,16 @@ def serialize_system
return serialize_nil unless manager.probed?

json = {
devices: devices_json(:probed),
availableDrives: available_drives,
availableMdRaids: available_md_raids,
candidateDrives: candidate_drives,
candidateMdRaids: candidate_md_raids,
issues: system_issues_json,
productMountPoints: product_mount_points,
encryptionMethods: encryption_methods,
volumeTemplates: volume_templates
devices: devices_json(:probed),
availableDrives: available_drives,
availableMdRaids: available_md_raids,
availableVolumeGroups: available_volume_groups,
candidateDrives: candidate_drives,
candidateMdRaids: candidate_md_raids,
issues: system_issues_json,
productMountPoints: product_mount_points,
encryptionMethods: encryption_methods,
volumeTemplates: volume_templates
}
JSON.pretty_generate(json)
end
Expand Down Expand Up @@ -525,6 +526,12 @@ def candidate_md_raids
proposal.storage_system.candidate_md_raids.map(&:sid)
end

# @see Storage::System#available_volume_groups
# @return [Array<Integer>]
def available_volume_groups
proposal.storage_system.available_volume_groups.map(&:sid)
end

# Meaningful mount points for the current product.
#
# @return [Array<String>]
Expand Down
33 changes: 30 additions & 3 deletions service/lib/agama/storage/config.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# Copyright (c) [2024-2025] SUSE LLC
# Copyright (c) [2024-2026] SUSE LLC
#
# All Rights Reserved.
#
Expand Down Expand Up @@ -112,6 +112,11 @@ def partitionable(device_alias)
supporting_partitions.find { |d| d.alias?(device_alias) }
end

# @return [Array<Configs::Partition, Configs::LogicalVolume>]
def volumes
partitions + logical_volumes
end

# @return [Array<Configs::Partition>]
def partitions
supporting_partitions.flat_map(&:partitions)
Expand All @@ -131,7 +136,7 @@ def filesystems
#
# @return [Array<#search>]
def supporting_search
drives + md_raids + partitions
drives + md_raids + partitions + volume_groups + logical_volumes
end

# Configs with configurable encryption.
Expand Down Expand Up @@ -166,7 +171,7 @@ def supporting_partitions
#
# @return [#delete?]
def supporting_delete
partitions
partitions + logical_volumes
end

# Config objects that could act as physical volume
Expand Down Expand Up @@ -223,6 +228,20 @@ def valid_partitions
partitions.reject { |p| skipped?(p) }
end

# Volume group configs, excluding skipped ones.
#
# @return [Array<Configs::VolumeGroup>]
def valid_volume_groups
volume_groups.reject { |d| skipped?(d) }
end

# Logical volume configs, excluding skipped ones.
#
# @return [Array<Configs::LogicalVolume>]
def valid_logical_volumes
logical_volumes.reject { |d| skipped?(d) }
end

# Configs directly using a device with the given alias.
#
# @note Devices using the given alias as a target device (e.g., for creating physical volumes)
Expand All @@ -242,6 +261,14 @@ def target_users(device_alias)
[boot_target_user(device_alias), vg_target_users(device_alias)].flatten.compact
end

# Finds the config assigned to the given device.
#
# @param device [Y2Storage::BlkDevice]
# @return [#search]
def find_device(device)
supporting_search.find { |c| c.found_device == device }
end

private

# MD RAIDs using the given alias as member device.
Expand Down
15 changes: 13 additions & 2 deletions service/lib/agama/storage/config_checkers/logical_volume.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# Copyright (c) [2024-2025] SUSE LLC
# Copyright (c) [2024-2026] SUSE LLC
#
# All Rights Reserved.
#
Expand All @@ -20,8 +20,10 @@
# find current contact information at www.suse.com.

require "agama/storage/config_checkers/base"
require "agama/storage/config_checkers/with_alias"
require "agama/storage/config_checkers/with_encryption"
require "agama/storage/config_checkers/with_filesystem"
require "agama/storage/config_checkers/with_search"
require "yast/i18n"

module Agama
Expand All @@ -30,18 +32,22 @@ module ConfigCheckers
# Class for checking a logical volume config.
class LogicalVolume < Base
include Yast::I18n
include WithAlias
include WithEncryption
include WithFilesystem
include WithSearch

# @param config [Configs::LogicalVolume]
# @param volume_group_config [Configs::VolumeGroup]
# @param storage_config [Storage::Config]
# @param product_config [Agama::Config]
def initialize(config, volume_group_config, product_config)
def initialize(config, volume_group_config, storage_config, product_config)
super()

textdomain "agama"
@config = config
@volume_group_config = volume_group_config
@storage_config = storage_config
@product_config = product_config
end

Expand All @@ -50,6 +56,8 @@ def initialize(config, volume_group_config, product_config)
# @return [Array<Issue>]
def issues
[
alias_issues,
search_issues,
filesystem_issues,
encryption_issues,
missing_thin_pool_issue
Expand All @@ -64,6 +72,9 @@ def issues
# @return [Configs::VolumeGroup]
attr_reader :volume_group_config

# @return [Storage::Config]
attr_reader :storage_config

# @return [Agama::Config]
attr_reader :product_config

Expand Down
Loading
Loading