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

fix(storage): avoid segmentation fault when generating actions #1379

Merged
merged 2 commits into from
Jun 26, 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
11 changes: 7 additions & 4 deletions service/lib/agama/storage/actions_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ class ActionsGenerator
# param target_graph [Y2Storage::Devicegraph]
def initialize(system_graph, target_graph)
@system_graph = system_graph
@target_graph = target_graph
# It is important to keep a reference to the actiongraph. Otherwise, the gargabe collector
# could kill the actiongraph, leaving the compound actions orphan.
# See https://github.com/openSUSE/agama/issues/1377.
@actiongraph = target_graph.actiongraph
end

# All actions properly sorted.
Expand All @@ -44,8 +47,8 @@ def generate
# @return [Y2Storage::Devicegraph]
attr_reader :system_graph

# @return [Y2Storage::Devicegraph]
attr_reader :target_graph
# @return [Y2Storage::Actiongraph]
attr_reader :actiongraph

# Sorted main actions (everything except subvolume actions).
#
Expand All @@ -67,7 +70,7 @@ def subvolume_actions
#
# @return [Array<Action>]
def actions
@actions ||= target_graph.actiongraph.compound_actions.map do |action|
@actions ||= actiongraph.compound_actions.map do |action|
Action.new(action, system_graph)
end
end
Expand Down
10 changes: 8 additions & 2 deletions service/package/rubygem-agama-yast.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jun 26 09:12:33 UTC 2024 - José Iván López González <[email protected]>

- Fix segmentation fault in the storage actions
(gh#openSUSE/agama#1377).

-------------------------------------------------------------------
Wed Jun 26 08:25:56 UTC 2024 - Ladislav Slezák <[email protected]>

Expand Down Expand Up @@ -142,7 +148,7 @@ Wed Feb 7 11:49:02 UTC 2024 - Imobach Gonzalez Sosa <[email protected]>
-------------------------------------------------------------------
Thu Feb 1 13:08:39 UTC 2024 - Josef Reidinger <[email protected]>

- Log if multipath probing is misconfigured (bsc#1215598)
- Log if multipath probing is misconfigured (bsc#1215598)

-------------------------------------------------------------------
Mon Jan 29 13:51:30 UTC 2024 - José Iván López González <[email protected]>
Expand All @@ -165,7 +171,7 @@ Thu Jan 18 08:35:01 UTC 2024 - Ancor Gonzalez Sosa <[email protected]>
Tue Jan 16 10:49:14 UTC 2024 - Michal Filka <[email protected]>

- bsc#1210541, gh#openSUSE/agama#516
- copy NM's runtime config created on dracut's request to the target
- copy NM's runtime config created on dracut's request to the target
-------------------------------------------------------------------
Thu Jan 11 15:32:44 UTC 2024 - Imobach Gonzalez Sosa <[email protected]>

Expand Down
Loading