[opensuse] systemd service dependency problem - help wanted
So I'm having this annoying problem with systemd... here's my setup: Network card is handled by NetworkManager, configured by DHCP. Computer gets user accounts AND autofs maps from NIS The state of things right now: after the computer starts I have to switch to a console, and log in as root, and restart autofs and sddm to be able to log in with my regular user (home from NFS via autofs, autofs maps from nis...) I had a systemd override file for sddm for a while that stated that sddm required autofs... but that would basically restart X every time a network interface went up/down, which does happen every time you start or stop a VM... Any idea no how to fix it? Cheers MH -- Mathias Homann Senior Systems Engineer, IT Consultant. IT Trainer Mathias.Homann@openSUSE.org http://www.tuxonline.tech gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
Mathias Homann wrote:
So I'm having this annoying problem with systemd...
here's my setup:
Network card is handled by NetworkManager, configured by DHCP.
Computer gets user accounts AND autofs maps from NIS
The state of things right now: after the computer starts I have to switch to a console, and log in as root, and restart autofs and sddm to be able to log in with my regular user (home from NFS via autofs, autofs maps from nis...)
I had a systemd override file for sddm for a while that stated that sddm required autofs... but that would basically restart X every time a network interface went up/down, which does happen every time you start or stop a VM...
Any idea no how to fix it?
Let systemd do the automounting? I haven't thought it through, but I have had vaguely similar problems, and leaving it up to systemd to auto-mount solved them. -- Per Jessen, Zürich (7.7°C) http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Samstag, 6. April 2019, 20:25:50 CEST schrieb Per Jessen:
Mathias Homann wrote:
So I'm having this annoying problem with systemd...
here's my setup:
Network card is handled by NetworkManager, configured by DHCP.
Computer gets user accounts AND autofs maps from NIS
The state of things right now: after the computer starts I have to switch to a console, and log in as root, and restart autofs and sddm to be able to log in with my regular user (home from NFS via autofs, autofs maps from nis...)
I had a systemd override file for sddm for a while that stated that sddm required autofs... but that would basically restart X every time a network interface went up/down, which does happen every time you start or stop a VM...
Any idea no how to fix it?
Let systemd do the automounting? I haven't thought it through, but I have had vaguely similar problems, and leaving it up to systemd to auto-mount solved them.
... can systemd do the automounting with standard automounter maps provided by nis? cheers MH -- Mathias Homann Senior Systems Engineer, IT Consultant. IT Trainer Mathias.Homann@openSUSE.org http://www.tuxonline.tech gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
Mathias Homann wrote:
Am Samstag, 6. April 2019, 20:25:50 CEST schrieb Per Jessen:
Mathias Homann wrote:
So I'm having this annoying problem with systemd...
here's my setup:
Network card is handled by NetworkManager, configured by DHCP.
Computer gets user accounts AND autofs maps from NIS
The state of things right now: after the computer starts I have to switch to a console, and log in as root, and restart autofs and sddm to be able to log in with my regular user (home from NFS via autofs, autofs maps from nis...)
I had a systemd override file for sddm for a while that stated that sddm required autofs... but that would basically restart X every time a network interface went up/down, which does happen every time you start or stop a VM...
Any idea no how to fix it?
Let systemd do the automounting? I haven't thought it through, but I have had vaguely similar problems, and leaving it up to systemd to auto-mount solved them.
... can systemd do the automounting with standard automounter maps provided by nis?
I don't know, I have not had reason to try. It does not sound too unreasonable to have a systemd auto-mount unit to do a NIS lookup. Let us know how it goes. -- Per Jessen, Zürich (7.8°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Am Samstag, 6. April 2019, 20:39:40 CEST schrieb Per Jessen:
Mathias Homann wrote:
Am Samstag, 6. April 2019, 20:25:50 CEST schrieb Per Jessen:
Mathias Homann wrote:
So I'm having this annoying problem with systemd...
here's my setup:
Network card is handled by NetworkManager, configured by DHCP.
Computer gets user accounts AND autofs maps from NIS
The state of things right now: after the computer starts I have to switch to a console, and log in as root, and restart autofs and sddm to be able to log in with my regular user (home from NFS via autofs, autofs maps from nis...)
I had a systemd override file for sddm for a while that stated that sddm required autofs... but that would basically restart X every time a network interface went up/down, which does happen every time you start or stop a VM...
Any idea no how to fix it?
Let systemd do the automounting? I haven't thought it through, but I have had vaguely similar problems, and leaving it up to systemd to auto-mount solved them.
... can systemd do the automounting with standard automounter maps provided by nis?
I don't know, I have not had reason to try. It does not sound too unreasonable to have a systemd auto-mount unit to do a NIS lookup. Let us know how it goes.
At least according to what I've found with google, systemd can automount stuff that used to live in /etc/fstab, but not based on classic automounter maps, either stored locally or in NIS. Besides, the way the systemd automounter handles mounts is kinda detrimental for a desktop system, each mount shows up as an actual DEVICE in your file manager - annoying to users. Anyway, I switched back to wickedd and now all is well again - except I don't have firewalld anymore - it works best with networkmanager after all. Cheers MH -- Mathias Homann Senior Systems Engineer, IT Consultant. IT Trainer Mathias.Homann@openSUSE.org http://www.tuxonline.tech gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
Mathias Homann wrote:
Am Samstag, 6. April 2019, 20:39:40 CEST schrieb Per Jessen:
Mathias Homann wrote:
Am Samstag, 6. April 2019, 20:25:50 CEST schrieb Per Jessen:
Mathias Homann wrote:
So I'm having this annoying problem with systemd...
here's my setup:
Network card is handled by NetworkManager, configured by DHCP.
Computer gets user accounts AND autofs maps from NIS
The state of things right now: after the computer starts I have to switch to a console, and log in as root, and restart autofs and sddm to be able to log in with my regular user (home from NFS via autofs, autofs maps from nis...)
I had a systemd override file for sddm for a while that stated that sddm required autofs... but that would basically restart X every time a network interface went up/down, which does happen every time you start or stop a VM...
Any idea no how to fix it?
Let systemd do the automounting? I haven't thought it through, but I have had vaguely similar problems, and leaving it up to systemd to auto-mount solved them.
... can systemd do the automounting with standard automounter maps provided by nis?
I don't know, I have not had reason to try. It does not sound too unreasonable to have a systemd auto-mount unit to do a NIS lookup. Let us know how it goes.
At least according to what I've found with google, systemd can automount stuff that used to live in /etc/fstab, but not based on classic automounter maps, either stored locally or in NIS.
I haven't tried it either, but I have some systems due for migration, and they use programmatical maps. I guess I'll be surprised :-)
Besides, the way the systemd automounter handles mounts is kinda detrimental for a desktop system, each mount shows up as an actual DEVICE in your file manager - annoying to users.
Isn't that a file manager problem rather than a systemd problem? -- Per Jessen, Zürich (7.4°C) http://www.cloudsuisse.com/ - your owncloud, hosted in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
06.04.2019 22:10, Mathias Homann пишет:
Am Samstag, 6. April 2019, 20:39:40 CEST schrieb Per Jessen:
Mathias Homann wrote:
Am Samstag, 6. April 2019, 20:25:50 CEST schrieb Per Jessen:
Mathias Homann wrote:
So I'm having this annoying problem with systemd...
here's my setup:
Network card is handled by NetworkManager, configured by DHCP.
Computer gets user accounts AND autofs maps from NIS
The state of things right now: after the computer starts I have to switch to a console, and log in as root, and restart autofs and sddm to be able to log in with my regular user (home from NFS via autofs, autofs maps from nis...)
I had a systemd override file for sddm for a while that stated that sddm required autofs... but that would basically restart X every time a network interface went up/down, which does happen every time you start or stop a VM...
I do not understand how interface up/down is related to service being started/stopped. Care to explain?
Any idea no how to fix it?
Assuming you are using system connection, enable NetworkManager-wait-online.service and set suitable wait time to be sure network is really up. ...
Anyway, I switched back to wickedd and now all is well again - except I don't have firewalld anymore
Sorry? Of course you have firewalld just as before.
Am Samstag, 6. April 2019, 22:55:07 CEST schrieb Andrei Borzenkov:
I had a systemd override file for sddm for a while that stated that sddm required autofs... but that would basically restart X every time a network interface went up/down, which does happen every time you start or stop a VM...
I do not understand how interface up/down is related to service being started/stopped. Care to explain?
/etc/NetworkManager/dispatcher.d contains all kind of scripts that get triggered by interface up/down events. Among others a restart of autofs.
Any idea no how to fix it?
Assuming you are using system connection, enable NetworkManager-wait-online.service and set suitable wait time to be sure network is really up.
tried that, didn't work.
...
Anyway, I switched back to wickedd and now all is well again - except I don't have firewalld anymore
Sorry? Of course you have firewalld just as before.
yup. But not as nicely integrated, or can I set the zone for an interface in wickedd as well? -- Mathias Homann Senior Systems Engineer, IT Consultant. IT Trainer Mathias.Homann@openSUSE.org http://www.tuxonline.tech gpg key fingerprint: 8029 2240 F4DD 7776 E7D2 C042 6B8E 029E 13F2 C102
07.04.2019 9:15, Mathias Homann пишет:
Am Samstag, 6. April 2019, 22:55:07 CEST schrieb Andrei Borzenkov:
> I had a systemd override file for sddm for a while that stated that > sddm required autofs... but that would basically restart X every > time a network interface went up/down, which does happen every time > you start or stop a VM...
I do not understand how interface up/down is related to service being started/stopped. Care to explain?
/etc/NetworkManager/dispatcher.d contains all kind of scripts that get triggered by interface up/down events. Among others a restart of autofs.
OK, I'll leave the question why autofs is restarted on every up/down to maintainer, but in your case Requires is likely too strong anyway, it is enough to order SDDM after autofs. Not to forget that Requires alone does *not* configure ordering between services anyway.
> Any idea no how to fix it?
Assuming you are using system connection, enable NetworkManager-wait-online.service and set suitable wait time to be sure network is really up.
tried that, didn't work.
This is a bug in openSUSE autofs.service. It should order itself after network-online.target. Upstream does it in sample service since 2015: commit ee7beb818d4919512814b79b04630eda149367a0 Author: Ian Kent <ikent@redhat.com> Date: Wed Jan 21 12:51:03 2015 +0800 autofs-5.1.0 - make service want network-online Wicked startup is synchronous, so it appears to work with it.
...
Anyway, I switched back to wickedd and now all is well again - except I don't have firewalld anymore
Sorry? Of course you have firewalld just as before.
yup. But not as nicely integrated, or can I set the zone for an interface in wickedd as well?
NetworkManager works with connections, not with interfaces. It allows to assign interface where current connection is activated to specific zone based on connection configuration. Do you have different connections with different zones that may be active for the same interface?
participants (3)
-
Andrei Borzenkov
-
Mathias Homann
-
Per Jessen