yast / yast-storage-ng

Rewrite of https://github.com/yast/yast-storage
http://yast.github.io/
GNU General Public License v2.0
14 stars 20 forks source link

Ensure adding Storage Support Software Packages for MicroOS [SLE-15-SP4] #1346

Closed shundhammer closed 1 year ago

shundhammer commented 1 year ago

Target Branch / Product

This is for SLE-15-SP4 / MicroOS 5.3 and MicroOS 5.4.

See below for the merge PRs to SLE-15-SP5 and master / Factory .

Bugzilla

https://bugzilla.suse.com/show_bug.cgi?id=1212452

Trello

https://trello.com/c/T9nqET80/

Problem

On an system with a multipath storage setup, the reboot after the installation failed. It turned out that the multipath-tools package was not installed.

Cause

A regular SLE-15-SPx or Leap 15.x or Tumbleweed installation uses the _inst_diskproposal client in the installation workflow which at its end determines which storage features (e.g. Btrfs, XFS, LVM, multipath) are used and adds the software packages that are needed for those technologies to the pool of packages that are going to be installed.

But MicroOS has a different installation workflow, and it doesn't use that default _inst_diskproposal client at all; instead, it uses a custom _partitionsproposal client to handle the storage proposal. And in that client, the packages handling was missing.

Fix

Added the packages handling to that _partitionsproposal client.

To avoid code duplication, that handling was factored out from the _inst_diskproposal client: It is now done by a new PackageHandler::set_proposal_packages_for(devicegraph) method which is now called from both clients.

Test

Installer Self-Update / Maintenance Update

Related PRs

ancorgs commented 1 year ago

I'm debugging the failed test. It was introduced by 0247f7e4be4eac609513c2ffa253833de24cbfe4

You can verify that manually by running rspec test/y2storage/package_handler_test.rb test/y2storage/storage_features_list_test.rb

ancorgs commented 1 year ago

I'm debugging the failed test. It was introduced by 0247f7e

The root of the problem is this caching: https://github.com/yast/yast-storage-ng/blob/master/src/lib/y2storage/storage_feature.rb#L189

That method StorageFeature#packages discards the packages that are not available, logs the circumstance and caches the result. The code assumes the availability of packages do not change during the execution of Y2Storage, which may make sense in the real scenario.

But we are actually re-defining that availability in our tests depending on the scenario we want to check. In that case, the caching hurts us.

yast-bot commented 1 year ago

:heavy_check_mark: Internal Jenkins job #12 successfully finished :heavy_check_mark: Created IBS submit request #302893