Bug 1043238

Summary: yast2-live-installer strives to use old swap partitions if they are selected for removing
Product: [openSUSE] openSUSE Distribution Reporter: Mindaugas Baranauskas <opensuse.lietuviu.kalba>
Component: YaST2Assignee: Forgotten User kWxJsf0s20 <forgotten_kWxJsf0s20>
Status: RESOLVED WONTFIX QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: hillwoodroc, jsrain, mfilka, sb56637
Version: Leap 42.2   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1042559, 1043228    
Attachments: y2logs from openSUSE-Leap-42.2-livecd-gnome.x86_64-1.0.0-Build21.1.iso
y2logs from openSUSE-Leap-42.2-livecd-gnome.x86_64-1.0.0-Build56.1.iso
y2logs from openSUSE-Leap-42.2-livecd-gnome.x86_64-1.0.0-Build56.1.iso swap umounted before starting yast2-live-installer
y2logs from openSUSE-Leap-42.3-livecd-gnome.x86_64-1.0.0-Build38.1.iso

Description Mindaugas Baranauskas 2017-06-07 20:14:55 UTC
Created attachment 728087 [details]
y2logs from openSUSE-Leap-42.2-livecd-gnome.x86_64-1.0.0-Build21.1.iso

I used Hillwood's openSUSE-Leap-42.2-livecd-gnome.x86_64-1.0.0-Build21.1.iso aplliance, build at 
https://build.opensuse.org/package/show/home:embar-:boo1011147/livecd-gnome

try install with yast2-live-installer. Problems at performing installation:


[Ruby] modules/StorageClients.rb:161 Failure occurred during the following action:
Deleting partition /dev/sda1

DISK_REMOVE_PARTITION_PARTED_FAILED

System error code was: -1014

/usr/sbin/parted  -s  '/dev/sda' rm 1:
Error: Partition /dev/sda1 is being used. You must unmount it before you modify it with Parted.

Continue despite the error?

/dev/sda1 was swap. Luckily, this is not fatal: I can try umount (`swapoff -a`) and try to continue.
Comment 1 Mindaugas Baranauskas 2017-06-07 21:49:59 UTC
Becides I used ont official rpm


# rpm -qi yast2-live-installer
Name        : yast2-live-installer
Version     : 3.1.10
Release     : 4.1
Architecture: noarch
Install Date: Wed 07 Jun 2017 04:19:12 PM EDT
Group       : System/YaST
Size        : 70119
License     : GPL-2.0+
Signature   : RSA/SHA256, Mon 05 Jun 2017 02:51:34 AM EDT, Key ID ea4e468fef265ecf
Source RPM  : yast2-live-installer-3.1.10-4.1.src.rpm
Build Date  : Mon 05 Jun 2017 02:51:28 AM EDT
Build Host  : lamb63
Relocations : (not relocatable)
Vendor      : obs://build.opensuse.org/home:hillwood
Summary     : YaST2 - Installation from Live Media
Description :
This package contains the YaST component to deploy a live media to the
hard disk of the computer.
Distribution: home:hillwood / openSUSE_Leap_42.2
Comment 2 Michal Filka 2017-06-08 19:36:23 UTC
@Jiri:
what to do with these live-installer bugs? Live installer is no longer developed, however it was included into 42.2. Dropping from 42.3 is subject of another issue (bnc#1042559), but we need to decide what to do in 42.2
Comment 4 Mindaugas Baranauskas 2017-06-09 15:07:08 UTC
Created attachment 728469 [details]
y2logs from openSUSE-Leap-42.2-livecd-gnome.x86_64-1.0.0-Build56.1.iso

Interesting, that if at warring about fail to delete /dev/sda1 (swap)
(i.e. at DISK_REMOVE_PARTITION_PARTED_FAILED ), 
I do `swapoff -a` and manually remove sda1,
press button to continue installion,
later I get error, that systems fails to mount /sda1 as swap:

Failure occurred during the following action:
Mounting /dev/sda1 to swap
VOLUME_MOUNT_FAILED
System error code was: -3003
/sbin/swapon --fixpgsz '/dev/sda1':
swapon: /dev/sda1: read swap header failed


Note sequence:
1. /dev/sda1 (swap) selected to be removed by user 
   (YaST seems never suggest to remove/resise swap 
    even if I intentionally create huge swap before install; 
   do we need to open separate bug for this 'feature'?)
2. /dev/sda1 (swap) failed to remove (because mounted) by YaST
3. /dev/sda1 (swap) umounted and remove manually
4. /dev/sda1 success to create as other partition type 
   (e.g. LVM or other, but not swap) by YaST (as expected)
5. YaST prematurely try to re-mount swap (by out-dated information) 
   even if it already should be removed (by YaST itself)!
Comment 5 Mindaugas Baranauskas 2017-06-09 19:06:50 UTC
Created attachment 728493 [details]
y2logs from openSUSE-Leap-42.2-livecd-gnome.x86_64-1.0.0-Build56.1.iso swap umounted before starting yast2-live-installer

I umounted swap (/dev/sda1) before starting yast2-live-installer,
swap remained not mounted also rigthh before doing real changes in hard-disk,
but yast2-live-installer still failed at removing /dev/sda1...
and at moment of DISK_REMOVE_PARTITION_PARTED_FAILED error, 
I found it is mounted again...
Comment 6 Mindaugas Baranauskas 2017-06-10 01:28:27 UTC
Created attachment 728507 [details]
y2logs from openSUSE-Leap-42.3-livecd-gnome.x86_64-1.0.0-Build38.1.iso

Becides, 42.3 is also affected
Comment 7 Tomáš Chvátal 2018-04-17 14:11:31 UTC
This is automated batch bugzilla cleanup.

The openSUSE 42.2 changed to end-of-life (EOL [1]) status. As such
it is no longer maintained, which means that it will not receive any
further security or bug fix updates.
As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
openSUSE, or you can still observe it under openSUSE Leap 15.0, please
feel free to reopen this bug against that version (see the "Version"
component in the bug fields), or alternatively open
a new ticket.

Thank you for reporting this bug and we are sorry it could not be fixed
during the lifetime of the release.

[1] https://en.opensuse.org/Lifetime