[Bug 811688] New: Initscripts executed before being fetched
https://bugzilla.novell.com/show_bug.cgi?id=811688 https://bugzilla.novell.com/show_bug.cgi?id=811688#c0 Summary: Initscripts executed before being fetched Classification: openSUSE Product: openSUSE 12.3 Version: Final Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: AutoYaST AssignedTo: fehr@suse.com ReportedBy: joschibrauchle@gmx.de QAContact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22 So after working around bnc#803577, I now have some machines where autoyast tries to execute the init scripts before they are actually fetched by yast! :-) The problem seems to be, that Autoyast enables the "autoyast-initscripts.service" via systemd too early (looks like as early as stage1?) and the service then starts before Autoyast even writes the configured initscripts to disk. See these logs: ------------ journalctl ------------ Mar 26 10:25:28 linux.site systemd[1]: Installed new job autoyast-initscripts.service/start as 109 ... Mar 26 10:25:52 lab05 systemd[1]: Starting Autoyast2 Init Scripts... Mar 26 10:25:52 lab05 systemd[1]: About to execute /usr/bin/plymouth --hide-splash Mar 26 10:25:52 lab05 systemd[1]: Forked /usr/bin/plymouth as 3626 Mar 26 10:25:52 lab05 systemd[1]: autoyast-initscripts.service changed dead -> start-pre Mar 26 10:25:52 lab05 systemd[1]: Received SIGCHLD from PID 3626 (plymouth). Mar 26 10:25:52 lab05 systemd[1]: Got SIGCHLD for process 3626 (plymouth) Mar 26 10:25:52 lab05 systemd[1]: Child 3626 died (code=exited, status=0/SUCCESS) Mar 26 10:25:52 lab05 systemd[1]: Child 3626 belongs to autoyast-initscripts.service Mar 26 10:25:52 lab05 systemd[1]: autoyast-initscripts.service: control process exited, code=exited status=0 Mar 26 10:25:52 lab05 systemd[1]: autoyast-initscripts.service got final SIGCHLD for state start-pre Mar 26 10:25:52 lab05 systemd[1]: About to execute /usr/lib/YaST2/bin/autoyast-initscripts.sh Mar 26 10:25:52 lab05 systemd[1]: Forked /usr/lib/YaST2/bin/autoyast-initscripts.sh as 3629 Mar 26 10:25:52 lab05 /usr/sbin/cron[3592]: (CRON) INFO (running with inotify support) Mar 26 10:25:52 lab05 systemd[1]: autoyast-initscripts.service changed start-pre -> start ... ------------ journalctl ------------ Start time of the service is 10:25:52 ------------ y2log ------------ 2013-03-26 10:28:49 <1> lab05(4403) [YCP] AutoinstScripts.ycp:714 Writing init script into /var/adm/autoinstall/init.d/init0000_final_installation.sh 2013-03-26 10:28:49 <1> lab05(4403) [agent-system] SystemAgent.cc(Execute):1130 mkdir /tmp/YaST2-04403-RK8OeL/tmp_mount 2013-03-26 10:28:49 <1> lab05(4403) [YCP] autoinstall/io.ycp:205 Copy Command: /bin/cp /tmp/YaST2-04403-RK8OeL/tmp_mount/init0000_final_installation.sh /var/adm/autoinstall/init.d/init0000_final_installation.sh 2013-03-26 10:28:49 <1> lab05(4403) [YCP] AutoinstScripts.ycp:714 Writing init script into /var/adm/autoinstall/init.d/init9999_send_email.sh 2013-03-26 10:28:49 <1> lab05(4403) [agent-system] SystemAgent.cc(Execute):1130 mkdir /tmp/YaST2-04403-RK8OeL/tmp_mount 2013-03-26 10:28:49 <1> lab05(4403) [YCP] autoinstall/io.ycp:205 Copy Command: /bin/cp /tmp/YaST2-04403-RK8OeL/tmp_mount/init9999_send_email.sh /var/adm/autoinstall/init.d/init9999_send_email.sh 2013-03-26 10:28:49 <1> lab05(4403) [YCP] AutoinstScripts.ycp:714 Writing init script into /var/adm/autoinstall/init.d/init1000_from_conf-lab.xml__copy_lab_home.sh 2013-03-26 10:28:49 <1> lab05(4403) [agent-system] SystemAgent.cc(Execute):1130 mkdir /tmp/YaST2-04403-RK8OeL/tmp_mount 2013-03-26 10:28:49 <1> lab05(4403) [YCP] autoinstall/io.ycp:205 Copy Command: /bin/cp /tmp/YaST2-04403-RK8OeL/tmp_mount/init1000_from_conf-lab.xml__copy_lab_home.sh /var/adm/autoinstall/init.d/init1000_from_conf-lab.xml__copy_lab_home.sh ------------ y2log ------------ Init scripts are copied at 10:28:49 It looks like "autoyast-initscripts.service" are installed and enabled in stage1 already, but I guess this should be done *after* the initscripts are copied to the system. ------------ y2log-1 ------------ 2013-03-26 10:23:17 <1> lab05(6370) [Interpreter] clients/autoinst_scripts2_finish.ycp:64 Calling YaST client autoinst_scripts2_finish 2013-03-26 10:23:17 <1> lab05(6370) [YCP] clients/autoinst_scripts2_finish.ycp:33 starting autoinst_scripts2_finish 2013-03-26 10:23:17 <1> lab05(6370) [YCP] clients/autoinst_scripts2_finish.ycp:51 executing:systemctl enable autoyast-initscripts.service 2013-03-26 10:23:17 <1> lab05(6370) [YCP] clients/autoinst_scripts2_finish.ycp:53 calling ret:$["exit":0, "stderr":"ln -s '/usr/lib/systemd/system/autoyast-initscripts.service' '/etc/systemd/system/default.target.wants/autoyast-initscripts.service'\n", "stdout":""] 2013-03-26 10:23:17 <1> lab05(6370) [YCP] clients/autoinst_scripts2_finish.ycp:64 autoinst_scripts2_finish finished ------------ y2log-1 ------------ So either the service must be enabled after the scripts are copied, or the service must get some dependency on the files or the yast-stage2 service... Reproducible: Sometimes -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=811688 https://bugzilla.novell.com/show_bug.cgi?id=811688#c1 --- Comment #1 from Joschi Brauchle <joschibrauchle@gmx.de> 2013-04-05 08:46:21 UTC --- My current workaround is to change the 'autoyast-initscripts.service' such that is starts after yast second stage by setting ---------- After=default.target ---------- I have done 20+ installations without problems using this workaround. Still I think that this may not be 100% foolproof... A real fix would be to let autoyast first fetch the files and then install/enable/start the systemd 'autoyast-initscripts.service'. -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=811688 https://bugzilla.novell.com/show_bug.cgi?id=811688#c Thomas Fehr <fehr@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- 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.
From the test I could verify that autoyast-initscripts.service is now run after
https://bugzilla.novell.com/show_bug.cgi?id=811688 https://bugzilla.novell.com/show_bug.cgi?id=811688#c2 Thomas Fehr <fehr@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #2 from Thomas Fehr <fehr@suse.com> 2013-04-15 17:16:00 UTC --- I now added "YaST2-Second-Stage.service" to the "After=" section of the service. the second stage service where the scripts are fetched and stored into filesystem. The intuitive approach to enable the service just after the scripts get fetched does not work as expected, no real idea why. Uwe already put enabling of this service to yast2 first stage because it did not work in second stage (maybe because yast2 itself is running as a systemd service in second stage). -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=811688 https://bugzilla.novell.com/show_bug.cgi?id=811688#c3 --- Comment #3 from Bernhard Wiedemann <bwiedemann@suse.com> 2013-04-16 13:00:30 CEST --- This is an autogenerated message for OBS integration: This bug (811688) was mentioned in https://build.opensuse.org/request/show/171057 Maintenance / -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=811688 https://bugzilla.novell.com/show_bug.cgi?id=811688#c4 --- Comment #4 from Swamp Workflow Management <swamp@suse.de> 2013-06-10 10:30:17 UTC --- openSUSE-RU-2013:0987-1: An update that has three recommended fixes can now be installed. Category: recommended (low) Bug References: 565557,803577,811688 CVE References: Sources used: openSUSE 12.3 (src): autoyast2-2.23.6-1.4.1 -- 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.
participants (1)
-
bugzilla_noreply@novell.com