[opensuse-autoinstall] 12.2RC2: Failed to fetch init script from NFS, all other scripts OK
Hey there, I just started testing 12.2RC2 and noticed to following. There are multiple custom user scripts in my XML file, all of which get pulled from an NFS server. Now, all scripts were transferred successfully to the installation system under /var/adm/autoinstall/scripts, EXCEPT the init script! The Init script is mention like this in my XML: -------- <init-scripts config:type="list"> <script> <filename>init0000_final_installation.sh</filename> <location><![CDATA[nfs://<server>/<path>/init0000_final_installation.sh]]></location> </script> </init-scripts> -------- All other scripts come from the same NFS server, same path, different filename (of course) and work nicely. In y2log, it says: -------- 2012-08-06 10:34:13 <1> test122(3344) [Interpreter] clients/autoinst_scripts2_finish.ycp:60 Calling YaST client autoinst_scripts2_finish 2012-08-06 10:34:13 <1> test122(3344) [YCP] clients/autoinst_scripts2_finish.ycp:33 starting autoinst_scripts2_finish 2012-08-06 10:34:13 <1> test122(3344) [YCP] AutoinstScripts.ycp:690 Writing init script into /var/adm/autoinstall/init.d/init0000_final_installation.sh 2012-08-06 10:34:13 <1> test122(3344) [agent-system] SystemAgent.cc(Execute):1130 mkdir /tmp/YaST2-03344-nXRhf8/tmp_mount 2012-08-06 10:34:13 <2> test122(3344) [YCP] autoinstall/io.ycp:196 Mount failed 2012-08-06 10:34:13 <3> test122(3344) [YCP] AutoinstScripts.ycp:696 script nfs://<server>/<path>/init0000_final_installation.sh could not be retrieved -------- Another init script is included with its source in the XML file, and this is running fine. Hence, it looks like the problem lies in mounting the remote NFS path when running the init scripts...? Best regards, Joschi Brauchle
On 06.08.2012 10:51, Joschi Brauchle wrote:
2012-08-06 10:34:13 <2> test122(3344) [YCP] autoinstall/io.ycp:196 Mount failed 2012-08-06 10:34:13 <3> test122(3344) [YCP] AutoinstScripts.ycp:696 script nfs://<server>/<path>/init0000_final_installation.sh could not be retrieved --------
Another init script is included with its source in the XML file, and this is running fine. Hence, it looks like the problem lies in mounting the remote NFS path when running the init scripts...?
autoyast was not able to mount the NFS server. Can you try to debug that? Write a chroot-script (chrooted=true, feedback=true, debug=true) that mounts the nfs share. Does that also fail? Autoyast tries to mount with "-o noatime,nolock" and if that fails: "-o noatime -t nfs4" -- ciao, Uwe Gansert SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net listening to: "Ebenholz, Schnee & Blut" by Stillste Stund -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Hello Uwe, I will try and let you know! Just one more thing that **looks** related, but maybe is not. My autoinstall hangs during the "Configuring System according to auto-install settings", at the step "Configuring lan". y2log says (truncated the citation): -------- 2012-08-06 17:50:05 <1> test122(4646) [Interpreter] network/services/host.ycp:375 Calling YaST client lan_auto 2012-08-06 17:50:05 <1> test122(4646) [YCP] clients/lan_auto.ycp:14 ---------------------------------------- 2012-08-06 17:50:05 <1> test122(4646) [YCP] clients/lan_auto.ycp:15 Lan autoinst client started 2012-08-06 17:50:05 <1> test122(4646) [YCP] Lan.ycp:377 Writing configuration .... 2012-08-06 17:50:11 <1> test122(4646) [YCP] Service.ycp:455 Restarting service network 2012-08-06 17:50:11 <1> test122(4646) [YCP] Service.ycp:299 Running service initscript network restart -------- When I go to a terminal and type "ps aux", I see: -------- root 902 0.0 0.0 21552 2080 tty1 Ss+ 17:47 0:00 /bin/sh /usr/lib/YaST2/startup/YaST2.Second-Stage root 3960 0.0 0.0 21684 2112 tty1 S+ 17:47 0:00 \_ /bin/sh /usr/lib/YaST2/startup/YaST2.call installation continue root 4585 0.5 0.4 150384 18632 tty7 Ss+ 17:47 0:02 \_ Xorg -noreset -br -deferglyphs 16 vt07 root 4646 5.0 5.5 687100 221572 tty1 Sl+ 17:47 0:25 \_ y2base installation ("continue") qt --noborder --auto-fonts --fullscreen root 4800 0.0 0.0 21568 1940 tty1 S+ 17:47 0:00 \_ /bin/bash /usr/lib/YaST2/servers_non_y2/ag_initscripts root 4910 0.0 0.1 22588 6024 tty1 S+ 17:47 0:00 \_ /usr/bin/perl /usr/lib/YaST2/servers_non_y2/ag_modinfo root 11705 0.0 4.5 687100 181092 tty1 S+ 17:50 0:00 \_ y2base installation ("continue") qt --noborder --auto-fonts --fullscreen root 11706 0.0 4.5 687096 181096 tty1 S+ 17:50 0:00 \_ y2base installation ("continue") qt --noborder --auto-fonts --fullscreen root 11707 0.0 0.0 21416 1768 tty1 S+ 17:50 0:00 \_ /bin/bash /sbin/service network restart root 11708 0.0 0.0 26236 1060 tty1 S+ 17:50 0:00 \_ systemctl restart network.service root 11709 0.0 0.0 14780 812 tty1 S+ 17:50 0:00 \_ /bin/systemd-tty-ask-password-agent --watch -------- I have to kill the service restart command in order for the installation to continue. I'm not sure if it is related, just the line "Running service initscript network restart" made me think that. If it's a separate problem, let's split the thread. Best regards, Joschi Brauchle On 08/06/2012 04:00 PM, Uwe Gansert wrote:
On 06.08.2012 10:51, Joschi Brauchle wrote:
2012-08-06 10:34:13 <2> test122(3344) [YCP] autoinstall/io.ycp:196 Mount failed 2012-08-06 10:34:13 <3> test122(3344) [YCP] AutoinstScripts.ycp:696 script nfs://<server>/<path>/init0000_final_installation.sh could not be retrieved --------
Another init script is included with its source in the XML file, and this is running fine. Hence, it looks like the problem lies in mounting the remote NFS path when running the init scripts...?
autoyast was not able to mount the NFS server. Can you try to debug that? Write a chroot-script (chrooted=true, feedback=true, debug=true) that mounts the nfs share. Does that also fail?
Autoyast tries to mount with "-o noatime,nolock" and if that fails: "-o noatime -t nfs4"
So, about the original problem: it looks like there is no network connection during the chroot and init script phase. I ran an chrooted chroot script with feedback, that was supposed to do a ----- host <NFS server> mount -t nfs .... <something from the NFS server> ----- where the first command fails with a timeout and the second says it cannot resolve the hostname. I did not test this exakt script under 11.4, but I definitely know that the <location>nfs://...</location> used to work for me for chroot and init scripts there. Just a stupid question: Do I need to turn on networking in stage2 under 12.2. somehow that was not needed/different under 11.4? Best regards, Joschi Brauchle ________________________________________ Von: Uwe Gansert [ug@suse.de] Gesendet: Montag, 6. August 2012 16:01 Bis: opensuse-autoinstall@opensuse.org Betreff: Re: [opensuse-autoinstall] 12.2RC2: Failed to fetch init script from NFS, all other scripts OK On 06.08.2012 10:51, Joschi Brauchle wrote:
2012-08-06 10:34:13 <2> test122(3344) [YCP] autoinstall/io.ycp:196 Mount failed 2012-08-06 10:34:13 <3> test122(3344) [YCP] AutoinstScripts.ycp:696 script nfs://<server>/<path>/init0000_final_installation.sh could not be retrieved --------
Another init script is included with its source in the XML file, and this is running fine. Hence, it looks like the problem lies in mounting the remote NFS path when running the init scripts...?
autoyast was not able to mount the NFS server. Can you try to debug that? Write a chroot-script (chrooted=true, feedback=true, debug=true) that mounts the nfs share. Does that also fail? Autoyast tries to mount with "-o noatime,nolock" and if that fails: "-o noatime -t nfs4" -- ciao, Uwe Gansert SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net listening to: "Ebenholz, Schnee & Blut" by Stillste Stund -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
On Mon, Aug 6, 2012 at 10:17 PM, Joschi Brauchle <joschi.brauchle@tum.de> wrote:
So, about the original problem: it looks like there is no network connection during the chroot and init script phase.
I ran an chrooted chroot script with feedback, that was supposed to do a ----- host <NFS server> mount -t nfs .... <something from the NFS server> ----- where the first command fails with a timeout and the second says it cannot resolve the hostname.
I did not test this exakt script under 11.4, but I definitely know that the <location>nfs://...</location> used to work for me for chroot and init scripts there.
Just a stupid question: Do I need to turn on networking in stage2 under 12.2. somehow that was not needed/different under 11.4?
Disclaimer: I haven't tested 12.2 yet, hopefully I'll be able to do that this or next week. (For now, I'll just assume the 12.1 problems persist.) If the network is completely down, I'd assume a problem with systemd. Do you use final_reboot or did you reboot manually and does the script work after the reboot? If it is only a DNS problem, try if the script in 2a here helps: http://lists.opensuse.org/opensuse-autoinstall/2012-04/msg00015.html I haven't encountered the hanging LAN config yet, but that sounds like a systemd problem to me. -- Kind regards 686f6c6d / Christopher 'm4z' Holm -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Hello, I just added the "ifconfig" command to the chroot script and it's output is perfectly OK, i.e. network is configured correctly. Hence, it really does look like a DNS problem in stage 2... On 08/07/2012 12:02 AM, 686f6c6d wrote:
On Mon, Aug 6, 2012 at 10:17 PM, Joschi Brauchle <joschi.brauchle@tum.de> wrote:
So, about the original problem: it looks like there is no network connection during the chroot and init script phase.
I ran an chrooted chroot script with feedback, that was supposed to do a ----- host <NFS server> mount -t nfs .... <something from the NFS server> ----- where the first command fails with a timeout and the second says it cannot resolve the hostname.
I did not test this exakt script under 11.4, but I definitely know that the <location>nfs://...</location> used to work for me for chroot and init scripts there.
Just a stupid question: Do I need to turn on networking in stage2 under 12.2. somehow that was not needed/different under 11.4?
Disclaimer: I haven't tested 12.2 yet, hopefully I'll be able to do that this or next week. (For now, I'll just assume the 12.1 problems persist.)
If the network is completely down, I'd assume a problem with systemd. Do you use final_reboot or did you reboot manually and does the script work after the reboot? If it is only a DNS problem, try if the script in 2a here helps: http://lists.opensuse.org/opensuse-autoinstall/2012-04/msg00015.html
I haven't encountered the hanging LAN config yet, but that sounds like a systemd problem to me.
-- Dipl.-Ing. Joschi Brauchle, M.S. Institute for Communications Engineering (LNT) Technische Universitaet Muenchen (TUM) 80290 Munich, Germany Tel (work): +49 89 289-23474 Fax (work): +49 89 289-23490 E-mail: joschi.brauchle@tum.de Web: http://www.lnt.ei.tum.de/
Not to be pity but a valid ifocnfig simply means that the network card is configured but does not mean that the correct card is selected nor that the card is working. At least a single ping to the gateway IP should be done for testing and be aware that some cards need some time to getting active ... Hth Hajo -----Original Message----- From: Joschi Brauchle [mailto:joschi.brauchle@tum.de] Sent: Tuesday, August 07, 2012 9:27 AM Cc: opensuse-autoinstall@opensuse.org Subject: Re: [opensuse-autoinstall] 12.2RC2: Failed to fetch init script from NFS, all other scripts OK Hello, I just added the "ifconfig" command to the chroot script and it's output is perfectly OK, i.e. network is configured correctly. Hence, it really does look like a DNS problem in stage 2... On 08/07/2012 12:02 AM, 686f6c6d wrote:
On Mon, Aug 6, 2012 at 10:17 PM, Joschi Brauchle <joschi.brauchle@tum.de> wrote:
So, about the original problem: it looks like there is no network connection during the chroot and init script phase.
I ran an chrooted chroot script with feedback, that was supposed to do a ----- host <NFS server> mount -t nfs .... <something from the NFS server> ----- where the first command fails with a timeout and the second says it cannot resolve the hostname.
I did not test this exakt script under 11.4, but I definitely know that the <location>nfs://...</location> used to work for me for chroot and init scripts there.
Just a stupid question: Do I need to turn on networking in stage2 under 12.2. somehow that was not needed/different under 11.4?
Disclaimer: I haven't tested 12.2 yet, hopefully I'll be able to do that this or next week. (For now, I'll just assume the 12.1 problems persist.)
If the network is completely down, I'd assume a problem with systemd. Do you use final_reboot or did you reboot manually and does the script work after the reboot? If it is only a DNS problem, try if the script in 2a here helps: http://lists.opensuse.org/opensuse-autoinstall/2012-04/msg00015.html
I haven't encountered the hanging LAN config yet, but that sounds like a systemd problem to me.
-- Dipl.-Ing. Joschi Brauchle, M.S. Institute for Communications Engineering (LNT) Technische Universitaet Muenchen (TUM) 80290 Munich, Germany Tel (work): +49 89 289-23474 Fax (work): +49 89 289-23490 E-mail: joschi.brauchle@tum.de Web: http://www.lnt.ei.tum.de/ N�����r��y隊Z)z{.�殶���֥�맲��r��z�^�ˬz��N�(�֜��^� ޭ隊Z)z{.�殶���֥��0�����Ǩ�
On 06.08.2012 10:51, Joschi Brauchle wrote:
I just started testing 12.2RC2 and noticed to following. There are multiple custom user scripts in my XML file, all of which get pulled from an NFS server.
I started to reproduce your issue here and it looks like it's a bug triggered by a fix I've added to workaround problems with systemd. I hope I can fix that in time for 12.2 Thanks for the report -- ciao, Uwe Gansert SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net listening to: "Monochrome" by Covenant -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Hello Uwe, that's good news. For me it looks like the /etc/resolv.conf is indeed empty like Christopher mentioned (at least inside the chrooted system, did not check outside). If I manually add a nameserver, the chroot script can mount the NFS server. Still, the *next* chroot script is not correctly pulled from the NFS, I get the same original error there: "mount failed". I guess YaST runs outside the chroot, and there is a similar problem DNS there? Also, the (possibly related) problem that YaST hangs at the next step "Configuring lan" and the process list suggests that systemd is waiting for some kind of password/input (process name is: "/bin/systemd-tty-ask-password-agent --watch") persists after creating a valid resolv.conf. Best regards, Joschi Brauchle On 08/07/2012 11:30 AM, Uwe Gansert wrote:
On 06.08.2012 10:51, Joschi Brauchle wrote:
I just started testing 12.2RC2 and noticed to following. There are multiple custom user scripts in my XML file, all of which get pulled from an NFS server.
I started to reproduce your issue here and it looks like it's a bug triggered by a fix I've added to workaround problems with systemd. I hope I can fix that in time for 12.2 Thanks for the report
-- Dipl.-Ing. Joschi Brauchle, M.S. Institute for Communications Engineering (LNT) Technische Universitaet Muenchen (TUM) 80290 Munich, Germany Tel (work): +49 89 289-23474 Fax (work): +49 89 289-23490 E-mail: joschi.brauchle@tum.de Web: http://www.lnt.ei.tum.de/
On 07.08.2012 11:46, Joschi Brauchle wrote:
For me it looks like the /etc/resolv.conf is indeed empty like Christopher mentioned (at least inside the chrooted system, did not check outside). If I manually add a nameserver, the chroot script can mount the NFS server.
yes I know but that has always been the case For 12.2 I had to move some code from the 2nd to the 1st stage because of systemd. That included fetching the init-scripts. That step does not work for nfs for some reason in the 1st stage. I'll move the fetching back to 2nd stage and will only activate the autoyast service in stage1. That sould solve it. You can easily try that by changing inst_autoconfigure.ycp index 850d773..7a32eb9 100644 --- a/src/clients/inst_autoconfigure.ycp +++ b/src/clients/inst_autoconfigure.ycp @@ -243,8 +243,7 @@ Please wait while the system is being configured. logStep( _("Executing Post-Scripts")); AutoinstScripts::Write("post-scripts", false); - // moved to 1st stage to fix issue with systemd - //AutoinstScripts::Write("init-scripts", false); + AutoinstScripts::Write("init-scripts", false); // Just in case, remove this file to avoid reconfiguring... SCR::Execute(.target.remove, "/var/lib/YaST2/runme_at_boot"); if you do that change, it should work again. My complete patch is a bit bigger but for your test the patch is sufficient. Would be cool if you could test that on 12.2 It's enough to patch it in the installed system before you start yast. You can patch that via chroot script for example
Also, the (possibly related) problem that YaST hangs at the next step "Configuring lan" and the process list suggests that systemd is waiting for some kind of password/input (process name is: "/bin/systemd-tty-ask-password-agent --watch") persists after creating a valid resolv.conf.
I don't see that here. Network config works fine. At the moment I can not imagine what triggers that. -- ciao, Uwe Gansert SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net listening to: "Like Tears In Rain" by Covenant -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Hello Uwe, yes, the patch works and the init script is fetched from NFS! Thanks! Just a little detail: The log file of the init script contains the line "redirecting to systemctl" plus a lot of non-ascii characters following it, before it eventually contains the real script log. I am currently trying to reproduce the hang at "Configuring lan" reliably. I managed to do it once with a completely manual installation, hence it has nothing to do with AuoYaST! Best regards, Joschi Brauchle On 08/07/2012 01:40 PM, Uwe Gansert wrote:
On 07.08.2012 11:46, Joschi Brauchle wrote:
For me it looks like the /etc/resolv.conf is indeed empty like Christopher mentioned (at least inside the chrooted system, did not check outside). If I manually add a nameserver, the chroot script can mount the NFS server.
yes I know but that has always been the case For 12.2 I had to move some code from the 2nd to the 1st stage because of systemd. That included fetching the init-scripts. That step does not work for nfs for some reason in the 1st stage. I'll move the fetching back to 2nd stage and will only activate the autoyast service in stage1. That sould solve it. You can easily try that by changing
inst_autoconfigure.ycp
index 850d773..7a32eb9 100644 --- a/src/clients/inst_autoconfigure.ycp +++ b/src/clients/inst_autoconfigure.ycp @@ -243,8 +243,7 @@ Please wait while the system is being configured. logStep( _("Executing Post-Scripts")); AutoinstScripts::Write("post-scripts", false);
- // moved to 1st stage to fix issue with systemd - //AutoinstScripts::Write("init-scripts", false); + AutoinstScripts::Write("init-scripts", false);
// Just in case, remove this file to avoid reconfiguring... SCR::Execute(.target.remove, "/var/lib/YaST2/runme_at_boot");
if you do that change, it should work again. My complete patch is a bit bigger but for your test the patch is sufficient. Would be cool if you could test that on 12.2 It's enough to patch it in the installed system before you start yast. You can patch that via chroot script for example
Also, the (possibly related) problem that YaST hangs at the next step "Configuring lan" and the process list suggests that systemd is waiting for some kind of password/input (process name is: "/bin/systemd-tty-ask-password-agent --watch") persists after creating a valid resolv.conf.
I don't see that here. Network config works fine. At the moment I can not imagine what triggers that.
participants (4)
-
686f6c6d
-
Hans-Joachim Ehlers
-
Joschi Brauchle
-
Uwe Gansert