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 no install media are mounted when storage proposal is run (bsc#1196061) #1288

Closed wfeldt closed 2 years ago

wfeldt commented 2 years ago

Problem

When the installation repository is on some local disk partition and the partition is included in the storage setup, the existing mountpoints will lead to confusion.

libstorage-ng

Solution

To avoid this, unmount all installation media before probing.

See also

lslezak commented 2 years ago

I'm just not sure about that reprobing, that's for some storage experts...

wfeldt commented 2 years ago

This is a valid point but I didn't find a better solution.

The original probing happens in the middle of some really complex workflow (with add-ons, roles, full and online workflow) and it would make sense to not do it there at all but we need the storage data for other things. And also I'm not that sure what happens if we detach the repos at that point.

And even if we detach the repos at the first probing point people can still go for explicit reprobing in the expert partitioner and then we're in this mess again unless we at least detach the repos again at the proposal stage.

So I'd leave the first probing where it is to generate some storage data for whatever it is needed and at the proposal point detach the repo and probe again to get the state we need later at the commit phase.

ancorgs commented 2 years ago

Reprobing also invalidates the staging devicegraph, throwing away all the changes done by the proposal or manually with the Expert Partitioner. And that reprobing would be silently executed every time we reach this point in the workflow. No matter if we are going forward or backwards.

I feel is too risky.

wfeldt commented 2 years ago

That leaves:

(1)

or (2)