[Bug 246389] New: yast2 update empties /dev
https://bugzilla.novell.com/show_bug.cgi?id=246389 Summary: yast2 update empties /dev Product: openSUSE 10.3 Version: Alpha 1 Platform: Other OS/Version: Other Status: NEW Severity: Blocker Priority: P5 - None Component: YaST2 AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: holler@nefkom.info QAContact: jsrain@novell.com With yast2-2.15.8-2 and yast2-update-2.15.2-6 from alpha 1 a system update in a running system with "yast2 update" deletes almost all files in /dev. Seen with inst sources: - directly used iso file - loop-mounted iso file used as directory - dvd burned from iso file. Booting from the dvd and doing the update works. iso file: 10.2 GM deltaapplied with 10.3 Alpha 1 delta iso. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #1 from holler@nefkom.info 2007-02-16 10:22 MST ------- Created an attachment (id=119704) --> (https://bugzilla.novell.com/attachment.cgi?id=119704&action=view) /var/log/YaST2/y2log The log shows no activities in /dev -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 andreas.hanke@gmx-topmail.de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andreas.hanke@gmx-topmail.de ------- Comment #2 from andreas.hanke@gmx-topmail.de 2007-02-16 10:33 MST ------- Could be a duplicate of bug 244937. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 aj@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |locilka@novell.com AssignedTo|bnc-team- |stefan.fent@novell.com |screening@forge.provo.novell| |.com | ------- Comment #3 from aj@novell.com 2007-02-16 11:13 MST ------- No, this is not a duplicate. This is the result of removing the devs.rpm package. We are mounting /dev on tmpfs for some time. But let the experts look at it ;-) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 locilka@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |holler@nefkom.info ------- Comment #4 from locilka@novell.com 2007-02-16 11:40 MST ------- Yes, I can confirm that this is not a duplicate of bug 244937, that 'functionality' (bug) has been added later (and there are no logs that would indicate the same or similar behavior as in that bug - clients/inst_kickoff.ycp). However, the attached y2log seems to be only part of the y2log that contains all needed information. Could, you, please attach also other logs? At least y2log-1 and y2log-2 from /var/log/YaST2 directory? It might be better to gzip that file (cp y2log-1 y2log-1a; gzip y2log-1a). -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #5 from locilka@novell.com 2007-02-16 11:43 MST ------- And please attach also /var/lib/YaST2/failed_packages file, thanks. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #6 from locilka@novell.com 2007-02-16 11:46 MST ------- And maybe /var/log/YaST2/y2logRPM as well :) Or the whole /var/log/YaST2/ directory, if you don't mind. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 olh@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|holler@nefkom.info | ------- Comment #7 from olh@novell.com 2007-02-16 14:40 MST ------- why is the old /dev being removed anyway? we want to get rid of devs.rpm in the rpmdb, not on the hard drive... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #8 from holler@nefkom.info 2007-02-16 14:58 MST ------- Created an attachment (id=119759) --> (https://bugzilla.novell.com/attachment.cgi?id=119759&action=view) YaST2logs.tgz ok, these are the contents of /var/log/YaST2 and /var/lib/YaST2 These logs are from this scenario: I ran "yast2 update" against my up to date system. So no package to update, delete, install. I simply do the system update expecting that there's nothing to do. But straight after clicking on the "Start Update" button almost all files in /dev are removed. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #9 from holler@nefkom.info 2007-02-16 15:05 MST ------- Created an attachment (id=119760) --> (https://bugzilla.novell.com/attachment.cgi?id=119760&action=view) yast2updatetrace.tgz I straced "yast2 update" Please look at the lines with unlinkat(3 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ma@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|ma@novell.com |jsrain@novell.com ------- Comment #12 from ma@novell.com 2007-02-19 04:32 MST ------- YaST calls the update algorithm and requests to tag unmaintained packages to be deleted. The devs package is dropped. The devs package was taged to delete.
From zypp point of view the bug is INVALID.
==> to Jiri/Lucas. This is 'FATE-301903 Dropping devs.rpm'. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #13 from holler@nefkom.info 2007-02-19 04:53 MST ------- Maybe this change in inst_kickoff.ycp helps (don't know whether Mode:update_in_running_system() exists. Take it as pseudo code): // Feature #301903, bugzilla #244937 if (Mode::update()) { // When upgrading system, remove devs.rpm if installed LocalCommand (sformat ( "/bin/rpm --root '%1' -q 'devs' && /bin/rpm --nodeps --root '%1' -e 'devs'", String::Quote (Installation::destdir) )); ++// Don't do this if called from system update in running system ++if (!Mode:update_in_running_system()) { // Mount (bind) the current /dev/ to the /installed_system/dev/ LocalCommand (sformat ( "/bin/rm -rf '%1/dev/' && /bin/mkdir -p '%1/dev/' && /bin/mount -v --bind '/dev/' '%1/dev/'", String::Quote (Installation::destdir) )); ++} } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #14 from locilka@novell.com 2007-02-19 05:02 MST ------- The part of code that you writing about has been added into yast2-packager-2.15.11. These commands were not called (see my comment #4). This functionality was not in Alpha1. ------------------------------------------------------------------- Tue Feb 13 12:51:23 CET 2007 - locilka@suse.cz - Calling bind mount and removing devs.rpm only in case of upgrade (#244937). - 2.15.11 ------------------------------------------------------------------- -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 locilka@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|jsrain@novell.com |kkaempf@novell.com ------- Comment #15 from locilka@novell.com 2007-02-19 05:14 MST ------- grep "inst_kickoff\.ycp" y2log >> 2007-02-16 17:51:45 <1> holler-n(5593) [YCP] clients/inst_kickoff.ycp:141 backup of /etc/sysconfig 2007-02-16 17:51:46 <1> holler-n(5593) [YCP] clients/inst_kickoff.ycp:253 File /etc/mdadm.conf exists, skipping creation... 2007-02-16 17:51:46 <1> holler-n(5593) [Interpreter] clients/inst_kickoff.ycp:439 Called YaST client returned: `next 2007-02-16 17:51:46 <1> holler-n(5593) [YCP] clients/inst_kickoff.ycp:944 Calling `inst_kickoff ($["enable_back":true, "enable_next":true]) returned `next Function LocalCommand(), mentioned in comment #13, logs what it does. On the other hand, this might happen in Alpha3 and it seems that this feature will not work for 10.3 Alpha4 for "System Update". -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #16 from holler@nefkom.info 2007-02-19 05:36 MST ------- In reply to comment #14: Sorry, but my iso (see bug description) has yast2-packager-2.15.11-2 from Tue Feb 13 with the above comment in the changelog. inst_kickoff.ycp _does_ call "/bin/rm -rf /%1/dev ..." on "System Update" in a running system with "%1" == "/"! I hacked this part of the code to if ("%1" == "/mnt) { .. } This did it for me. In reply to comment #15: Does this mean that "System Update" in running system won't work with the next Alphas and Factory snapshots ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #18 from locilka@novell.com 2007-02-19 06:00 MST ------- devs.rpm has been dropped in openSUSE 10.3, such package should _not_ exist anymore. That's why it was selected to be dropped by the packagemanager during that update process. So you have reported a bug with against change in code made by yourself :) That's pretty confusing, don't you think so? Anyway, I've done this change to the yast2-packager-2.15.15: - Do not call bind mount and do not remove devs.rpm when running the System Update (#246389). --- cut --- // Feature #301903, bugzilla #244937 - if (Mode::update()) { + // "/" means updating the running system + if (Mode::update() && Installation::destdir != "/") { // When upgrading system, remove devs.rpm if installed LocalCommand (sformat ( "/bin/rpm --root '%1' -q 'devs' && /bin/rpm --nodeps --root '%1' -e 'devs'", --- cut --- PS: The problem will exist after my change, zypp will drop that package anyway. I've just minimized the use-case to a update-from-CD. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #19 from holler@nefkom.info 2007-02-19 06:15 MST ------- Ok, i think noone needs devs.rpm if there's equivalent functionality. But removing /dev/* isn't funny. I did my hack an hour ago against inst_kickoff.ycp on my harddisk just for testing. This hack is around the /bin/rm -rf ... statement only. If your solution (2.15.15) doesn't touch /dev in case of system update in running system, feel free to close this bug. I will be waiting for this version in factory. THX -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #21 from olh@novell.com 2007-02-19 06:39 MST ------- sigh. guys, 'rpm -e --nodeps --justdeb devs' is all that needs to be done. no 'rm -rf' required anywhere. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #22 from locilka@novell.com 2007-02-19 06:49 MST ------- --justdb Update only the database, not the filesystem. This is not how the feature has been defined. The feature wants to remove the package _and_ the content. As I already said, ZYPP *would* remove the package anyway (with content) so --justdb doesn't help here much. My current fix just doesn't call that rpm command at all in case of System Update. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 locilka@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|jsrain@novell.com |locilka@novell.com Severity|Blocker |Major ------- Comment #23 from locilka@novell.com 2007-02-19 07:13 MST ------- OK, --justdb will be used for the System Update. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 locilka@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #24 from locilka@novell.com 2007-02-19 07:21 MST ------- // Feature #301903, bugzilla #244937 if (Mode::update()) { // "/" means updating the running system, bugzilla #246389 if (Installation::destdir == "/") { // When upgrading system, remove devs.rpm if installed LocalCommand ( "/bin/rpm -q 'devs' && /bin/rpm --nodeps --justdb -e 'devs'" ); // normal upgrade } else { // When upgrading system, remove devs.rpm if installed LocalCommand (sformat ( "/bin/rpm --root '%1' -q 'devs' && /bin/rpm --nodeps --root '%1' -e 'devs'", String::Quote (Installation::destdir) )); // Mount (bind) the current /dev/ to the /installed_system/dev/ LocalCommand (sformat ( "/bin/rm -rf '%1/dev/' && /bin/mkdir -p '%1/dev/' && /bin/mount -v --bind '/dev/' '%1/dev/'", String::Quote (Installation::destdir) )); } } Fixed in yast2-packager-2.15.15 (still not in build) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #25 from holler@nefkom.info 2007-02-19 10:33 MST ------- Thanks, this change does it. :-) But: (I know, I'm boring) How to install 2.15.15 or higher when you have 2.15.11 on your system through "yast2 update" ? The old code will remove especially /dev/loop*, so with any inst-source (e.g. ftp to factory) yast2 won't be able to mount the inst source. :-( Installing the new version and _then_ doing the system update (in the running system) will resolve that. Probably worth to be added to the most annoying bugs for factory. Bye. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #26 from locilka@novell.com 2007-02-20 03:24 MST ------- Adding it to most annoying bugs? Well, the System Update feature was not planned for such tasks (frankly, it should not be used at all), it's very expert tool with almost no support :) I hope nobody other will use it for this :)))) ;) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #27 from holler@nefkom.info 2007-02-20 10:25 MST ------- So, what are the tasks the System Update feature is planned for ? How would you update your system e.g. with current factory ? Rsyncing the whole stuff and generating a installation dvd to boot from ? I've updated my system on my current hardware since 9.2 with every gm, alpha, beta, rc and of course since openSUSE with factory this way. Ok, I know what to do when something's going wrong in most cases, so maybe I'm a expert. Filing this bug did help in this case, so I can feel happy. Thanks once more. And I think I'm not the only one doing this. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
https://bugzilla.novell.com/show_bug.cgi?id=246389 ------- Comment #28 from locilka@novell.com 2007-02-21 00:37 MST ------- At least, I'll tell you how to update to the latest factory :) Run the YaST Packagemanager (Qt), display all (installed) packages, click the right mouse button and select something like "Update when newer version exists". This should be safe because it also solves dependencies. For updating 10.1 to 10.2 or 10.2 to 10.3, installation media should be used. For instance" booting from mini ISO CD, selecting some new 10.3 installation source, and then selection Update method in the Installation. This is almost what you do but the Update/Installation works in a defined (known) space. It has own installation-system with own kernel and own /dev/ ... System Update is an expert tool and it should be probably just used to update packages from, e.g., 10.3 Beta2 to 10.3 Beta3, but reporting a bug that it has broken something, let's say wrongly selected languages might be closed as invalid bugreport. Anyway, this bug seemed to be important to fix, so it it's been fixed :) Please, use some openSUSE mailing-list for discussions and bugzilla for reporting and fixing bugs only ;) Thanks -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.
participants (1)
-
bugzilla_noreply@novell.com