[Bug 800365] New: systemd: rcnetwork start in YaST2-Second-Stage.service blocks
https://bugzilla.novell.com/show_bug.cgi?id=800365 https://bugzilla.novell.com/show_bug.cgi?id=800365#c0 Summary: systemd: rcnetwork start in YaST2-Second-Stage.service blocks Classification: openSUSE Product: openSUSE Factory Version: 12.3 Beta 1 Platform: All URL: http://w3.suse.de/~mt/bnc798348/ OS/Version: Other Status: NEW Severity: Major Priority: P5 - None Component: YaST2 AssignedTo: fcrozat@suse.com ReportedBy: mt@suse.com QAContact: jsrain@suse.com CC: locilka@suse.com, mfilka@suse.com Blocks: 798348 Found By: --- Blocker: --- This happens on factory + $OBS/home:mtomaschewski:tests/* packages also with systemd from Base:System -- most recent changelog entry: Tue Jan 22 17:02:04 UTC 2013 - fcrozat@suse.com - Add systemctl-options.patch: handle SYSTEMCTL_OPTIONS internaly (bnc#798620). ... The $OBS/home:mtomaschewski:tests/* are using network.service alias link instead of the NETWORKMANAGER=yes/no variable. While 2nd stage boot, YaST2-Second-Stage.service starts a script (and yast2-network which may restart it), which is trying to start the network. The service file is using "systemctl --ignore-dependencies" option for all services it starts/stops inside of the script via: [Unit] Before=[...]network.service[...] [Service] Type=oneshot Environment=SYSTEMCTL_OPTIONS=--ignore-dependencies TERM=linux [...] but the systemctl triggers a start of systemd-tty-ask-password-agent and it hangs then, see: http://w3.suse.de/~mt/bnc798348/network-start.console2.png Try to use "systemctl --ignore-dependencies --no-ask-password --no-block start network.service" does not help. The call returns and yast2 starts, but network is not started. It gets merged with the pending regular network.service start, see last boot in http://w3.suse.de/~mt/bnc798348/journal.txt: 2013-01-24T17:53:43.494104+01:00 linux rcnetwork[1734]: redirecting to "systemctl --ignore-dependencies --no-ask-password --no-block start network.service" 2013-01-24T17:53:43.496111+01:00 linux systemd[1]: Trying to enqueue job network.service/start/ignore-dependencies 2013-01-24T17:53:43.496113+01:00 linux systemd[1]: Merged into installed job network.service/start as 71 2013-01-24T17:53:43.496115+01:00 linux systemd[1]: Enqueued job network.service/start as 71 -- 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=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c1
--- Comment #1 from Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c2
--- Comment #2 from Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c3
--- Comment #3 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c4
Bruno Friedmann
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c5
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c6
--- Comment #6 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c7
--- Comment #7 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c8
--- Comment #8 from Jiří Suchomel
* I think we should remove in YaST2-Second-Stage.service (and Firstboot) ...
Frederic, please make a pull request directly for YaST2-*service files, I'm bit confused what was already implemented and what is yet to be done... -- 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=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c9
--- Comment #9 from Frederic Crozat
(In reply to comment #5)
* I think we should remove in YaST2-Second-Stage.service (and Firstboot) ...
Frederic, please make a pull request directly for YaST2-*service files, I'm bit confused what was already implemented and what is yet to be done...
I was waiting for other people comments before doing the pull request. The only bits unknowns to me (might requires some fixes) are /etc/resolv.conf not being filled and network stack being shutdown after yast second stage is finished. -- 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=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c10
--- Comment #10 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c11
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c12
--- Comment #12 from Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c13
--- Comment #13 from Marius Tomaschewski
801654 is probably due to
-> Unit network.service: Description: LSB: Configure the localfs depending network interfaces ... After: YaST2-Second-Stage.service
See comment 3, it is caused by "Before=network.service" in y2ss. "After" is adjusted by systemd automatically because of "Before".
And this service is not yet started from the systemd PoV
YaST2-Second Stage.service loaded activating start start YaST2 Second Stage
May be second stage should fork and continue to run so that service startup is "completed" from systemd PoV. Setting KillMode=none will prevent it from being "cleaned up". Otherwise you will continue to play catch game with dependencies.
You can't continue here. The yast2 2nd stage has to run in foreground (it starts yast2 UI) and it is to finish the configuration. It (re)configures and restarts services. -- 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=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c14
--- Comment #14 from Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c15
--- Comment #15 from Andrey Borzenkov
You can't continue here. The yast2 2nd stage has to run in foreground (it starts yast2 UI) and it is to finish the configuration. It (re)configures and restarts services.
OK, so the problem is cause by a) network.service being started by default and job is waiting for YaST2 second stage to complete b) "systemctl restart" blocking for unit which has pending job It seems that replacing "systemctl restart" with explicit "systemctl cancel <pending job>; systemctl start" works around this issue. "systemctl cancel" removes pending job. Which allows later to use "systemctl start --ignore-dependencies". Work for naive testing using two oneshot services. -- 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=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c16
--- Comment #16 from Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c17
--- Comment #17 from Marius Tomaschewski
(In reply to comment #13)
You can't continue here. The yast2 2nd stage has to run in foreground (it starts yast2 UI) and it is to finish the configuration. It (re)configures and restarts services.
OK, so the problem is cause by
a) network.service being started by default and job is waiting for YaST2 second stage to complete
yes and because systemd is trying to merge the network start with --ignore-dependencies (all the starts/restarts inside of yast2 second state) into the already queued job.
b) "systemctl restart" blocking for unit which has pending job
It seems that replacing "systemctl restart" with explicit "systemctl cancel <pending job>; systemctl start" works around this issue. "systemctl cancel" removes pending job. Which allows later to use "systemctl start --ignore-dependencies". Work for naive testing using two oneshot services.
"systemctl cancel" may work, but it would be a workaround the dependency loop. We are going to start network service before y2second-stage so there is no loop any more. See comment 5 and comment 9, Frederic already adjusted it. It just needs some time to be applied / merged by the maintainers... See also: https://github.com/yast/yast-yast2/pull/44 https://github.com/yast/yast-network/pull/47 which are needed too. -- 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=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c18
--- Comment #18 from Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c19
--- Comment #19 from Marius Tomaschewski
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c20
--- Comment #20 from Bernhard Wiedemann
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c21
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c22
--- Comment #22 from Andrey Borzenkov
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c23
Thomas Göttlicher
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c24
Jiří Suchomel
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c25
--- Comment #25 from Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c
Alberto Planas Dominguez
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c
Alberto Planas Dominguez
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c26
Martin Vidner
See comment 5 and comment 9, Frederic already adjusted it. It just needs some time to be applied / merged by the maintainers... See also:
https://github.com/yast/yast-yast2/pull/44 https://github.com/yast/yast-network/pull/47
which are needed too.
The YaST pull requests were superceded by https://github.com/yast/yast-yast2/pull/51 and https://github.com/yast/yast-network/pull/61 and merged -- 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=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c
Martin Vidner
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c
Frederic Crozat
https://bugzilla.novell.com/show_bug.cgi?id=800365
https://bugzilla.novell.com/show_bug.cgi?id=800365#c27
Pawel Wieczorkiewicz
participants (1)
-
bugzilla_noreply@novell.com