Bug 326478 - yast2 reboots the machine at the end of stage1 but doesn't unmount /mnt/ before
Summary: yast2 reboots the machine at the end of stage1 but doesn't unmount /mnt/ before
Status: RESOLVED FIXED
: 326899 326942 326985 327439 327929 (view as bug list)
Alias: None
Product: openSUSE 10.3
Classification: openSUSE
Component: Installation (show other bugs)
Version: RC 1
Hardware: Other Other
: P5 - None : Blocker (vote)
Target Milestone: ---
Assignee: Lukas Ocilka
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-19 18:04 UTC by Christopher Stender
Modified: 2007-09-29 08:19 UTC (History)
12 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---
coolo: SHIP_STOPPER-


Attachments
yast-logs.tar.gz (341.95 KB, application/x-gzip)
2007-09-19 18:04 UTC, Christopher Stender
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Stender 2007-09-19 18:04:24 UTC
On a fresh installation YaST reboots the machine at the end of stage 1 without unmounting /mnt/dev and /mnt before.
Comment 1 Christopher Stender 2007-09-19 18:04:55 UTC
Created attachment 173436 [details]
yast-logs.tar.gz
Comment 2 Stephan Kulow 2007-09-19 19:09:07 UTC
what makes you think so?
Comment 3 Christopher Stender 2007-09-19 19:18:07 UTC
Well, I stopped the "going down for reboot in X sec" process and called mount. It lists the /mnt/ and /mnt/dev mounts. Then I pressed okay -> machine reboots and a fsck was running and found some failures on boot.
Comment 4 Christian Boltz 2007-09-19 20:29:14 UTC
reseting forgotten needinfo...
Comment 5 Christopher Stender 2007-09-19 20:43:58 UTC
Thanks :) 
Comment 6 Lukas Ocilka 2007-09-20 09:07:28 UTC
I'll check again what was the problem but as far as I remember, the problem was that calling

umount /mnt/dev
umount /mnt

returned "still busy"...

So installer tries to umount them but it is not successful :(
Comment 7 Stefan Hundhammer 2007-09-20 09:34:30 UTC
Christopher, just curious: Did you by any chance work in the shell running on console 2 and "cd /mnt" ? In that case, umount is bound to fail.
Comment 8 Christopher Stender 2007-09-20 09:47:26 UTC
I tought about it, too. So I did a new install on my private notebook last night and could reproduce it without touching a console. When the machine reboots at the end of stage1 I saw messages like: umount /mnt/ - is still bussy. Sadly, I forgot to run a lsof /mnt. I guess you can reproduce this as well on your machine.
Comment 9 Lukas Ocilka 2007-09-20 09:48:26 UTC
Might be also because of some process still having some files open in the /mnt (target) directory :( I'll check it, hopefully with Jkupec.
Comment 10 Jan Kupec 2007-09-20 10:44:29 UTC
As for libzypp, it seem it correctly releases installation media after finishing the installation:

2007-09-19 21:35:20 <1> 10.10.100.17(4108) [zypp] ZYppImpl.cc(commit):285 Commit (CommitPolicy( )) returned: CommitResult 606 (errors 0, remaining 0, srcremaining 0)
2007-09-19 21:35:20 <1> 10.10.100.17(4108) [wfm] Source.cc(SourceReleaseAll):593 Releasing all sources...

No problems related to SourceReleaseAll reported afterwards.
Comment 11 Lukas Ocilka 2007-09-20 13:53:29 UTC
I was unable to reproduce this bug in RC1 -- minimal installation + online repos.
Comment 12 Lukas Ocilka 2007-09-20 13:59:13 UTC
Moreover this is hard to debug using your logs because those logs don't contain the umount_finish call -- logs are copied to the installed system before the umount is called :) Otherwise there would be NO logs at all.
Comment 13 Lukas Ocilka 2007-09-20 14:17:17 UTC
Please, try to duplicate:
- When installation is going to reboot the system, press [Stop]
- Attach the y2log file
- Continue (reboot)
Comment 14 Lukas Ocilka 2007-09-20 14:38:00 UTC
Ah, found it :)

there is a
/usr/sbin/ntpd -p /var/run/ntp/ntpd.pid -u ntp
running :)))

fuser /mnt
returns 13010rce
(which is that mentioned process)
Comment 15 Christoph Thiel 2007-09-20 15:02:47 UTC
Could this be another side-effect of #326490 / #287539?
Comment 16 Katarina Machalkova 2007-09-20 15:25:13 UTC
It is more likely a side effect of ntp configuration during installation. Ntp client is set to be started during boot by default (see bug #302389). Thus, calling NtpClient::Write() to write configuration at the end of installation starts ntp daemon.
I'll set ntp-client to 'write only' mode during 1st stage and we'll see if it helps (yast2-ntp-client 2.15.11)
Comment 17 Stephan Kulow 2007-09-20 17:14:34 UTC
why is ntpd in the inst sys anyway?
Comment 18 Lukas Ocilka 2007-09-20 19:06:39 UTC
Because it's in /mnt (on the target) during the inst_finish (finalizing installation). NtpClient needs to write its data (configuration) after RPM of xntp is installed.

I have a prepared fix for inst_finish / inst_umount to try
    * mount -o remount,ro /...
    * umount --force /...
when normal umount fails

This will help with other running processes that will definitely appear later in GM :) (it's just an extension of the current solution)

Needs to be tested tomorrow morning
(affected package yast2-installation.rpm)
Comment 19 Stephan Kulow 2007-09-21 05:03:39 UTC
*** Bug 326985 has been marked as a duplicate of this bug. ***
Comment 20 Stephan Kulow 2007-09-21 05:42:57 UTC
the actual bug is submitted though
Comment 21 Lukas Ocilka 2007-09-21 08:01:24 UTC
- When normal umount at the end of the installation fails, try
  at least: sync, remount read-only, umount --force.
- Report all services running in the installation directory
  (both #326478).
- yast2-installation-2.15.52

This actually only *helps* to avoid problems, the *real* problem is that there might be several process running and all of them should be shut-down or killed but it's uneasy to determine which process should be left (whitelist).

In my opinion, Linuxrc should work as a fallback and try to shut-down (and then shoot-down, if it doesn't help) all processes (and umount, of course) before rebooting. -- Will be solved as a feature for openSUSE 11.0
Comment 22 Steffen Winterfeldt 2007-09-21 13:52:40 UTC
I've just had a look and there is not only ntpd but also dhcpcd running.

Please make sure that's killed as well.
Comment 23 Steffen Winterfeldt 2007-09-21 13:54:33 UTC
*** Bug 326942 has been marked as a duplicate of this bug. ***
Comment 24 Lukas Ocilka 2007-09-21 13:59:20 UTC
dhcpcd? Ah, I see ... hmm, but it doesn't need to be killed because it doesn't use /mnt or does it?
Comment 25 Steffen Winterfeldt 2007-09-21 14:20:57 UTC
I mean the dhcpcd started by yast, not the one linuxrc runs. It sits below
/mnt.
Comment 26 Lukas Ocilka 2007-09-21 14:23:49 UTC
Yes, I know, but it shouldn't use /mnt at all ... We'll check it.
Comment 27 Lukas Ocilka 2007-09-21 14:31:56 UTC
Proposed patch to the installation:

.local.bash_output

instead of

.target.bash_output

Index: inst_network_setup.ycp
===================================================================
--- inst_network_setup.ycp      (revision 41018)
+++ inst_network_setup.ycp      (working copy)
@@ -754,7 +754,7 @@
        FlushAllIPSettings();
 
        string cmd = sformat ("/sbin/dhcpcd '%1'", String::Quote (network_settings["network_device"]:""));
-       map run_cmd = (map) SCR::Execute (.target.bash_output, cmd);
+       map run_cmd = (map) WFM::Execute (.local.bash_output, cmd);
        y2milestone ("Running %1 returned %2", cmd, run_cmd);
 
        if (run_cmd["exit"]:-1 != 0) {
Comment 28 Lukas Ocilka 2007-09-21 14:41:47 UTC
- Start dhcpcd using WFM instead of SCR.
- Kill dhcpcd at the end of the installation (both #326342).
- yast2-installation-2.15.53
Comment 29 Dean Hilkewich 2007-09-21 16:39:05 UTC
Would it be possible to get a delta.iso soon up on the repositories for this so we can install RC1 to search for other bugs/issues?  This bug is preventing further troubleshooting of other issues and some people do not have the greatest luck doing net installs with the repositories often timing out.
Comment 30 Stephan Kulow 2007-09-22 13:22:28 UTC
the bug is easy to work around. Just halt the reboot and do the unmount manually
Comment 31 Andreas Jaeger 2007-09-24 16:19:29 UTC
Note: This will be fixed in the final Goldmaster.  You will get a delta.iso from RC1 to the final goldmaster once we release the final version.
Comment 32 Andreas Jaeger 2007-09-25 07:58:25 UTC
Just did an installation with XFS using RC2 - no more problems with XFS, so I hope this bug is fixed for good.
Comment 34 Matej Horvath 2007-09-25 13:09:15 UTC
*** Bug 327439 has been marked as a duplicate of this bug. ***
Comment 35 Charles Arnold 2007-09-25 17:07:53 UTC
*** Bug 327929 has been marked as a duplicate of this bug. ***
Comment 36 Stephan Kulow 2007-09-29 08:19:06 UTC
*** Bug 326899 has been marked as a duplicate of this bug. ***