/srv/irclogs.ubuntu.com/2021/02/19/#ubuntu-server.txt

geard_hello all, I am working with ansible on automating user creation. I am curious if there is any value in ensuring UID between multiple servers for the same user. IE bob's UID is 2001 on all systems?00:08
RoyKansible?00:10
RoyKgeard_: or just use NIS, that is, NIS went out of style 20 years ago, so perhaps better use LDAP ;)00:10
sarnoldgeard_: ldap is the usual tool to automate this when you've got more than just a few laptops laying around00:23
lordievaderGood morning07:53
ducassegeard_: if you're using nfs that will be helpful08:15
=== denningsrogue8 is now known as denningsrogue
=== vlm_ is now known as vlm
=== vlm_ is now known as vlm
=== vlm_ is now known as vlm
=== vlm_ is now known as vlm
zetheroostrange problem on one of our Ubuntu Server systems - cifs mounts in fstab aren't mounting on boot14:44
zetheroofrom what I can tell the system cannot resolve the hostnames of the cifs servers early enough14:45
zetherooimmediately after boot if I ssh into the system and do 'mount -a' all the shares mount instantly14:46
zetherooin syslog I see an entry like this for every cifs mount entry in fstab:14:47
zetherooifup[633]: mount error: could not resolve address for SERVERNAME: Unknown error14:47
tewardzetheroo: that USUALLY points to mounts being done before networking is online15:15
tewardwhich... isn't exactly too surprising just saying.15:15
tewardwith CIFS mounts I usually noauto them and disable them from boot and then have a oneshot SystemD unit that calls a script that mounts the CIFS shares after networking and everything is up15:16
tewardthat way networking, DNS, etc. is all established.15:16
tewardbefore it attempts to mount those.15:16
rbasakIf you're using networkd (or netplan driving networkd which is the default now I think?) then I think systemd mount units can help because then you can express the dependency to systemd and it'll be able to do the right thing.15:23
rbasak"Network online" is ambiguous; I think it's better to express more directly the dependency on a specific network interface being up.15:24
rbasakhttps://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ has more info on the latter point.15:24
ddstreetWants=network-online.target and After=network-online.target15:24
TJ-yes. use in fstab the option x-systemd.requires=network-online.target15:24
TJ-see "man 5 systemd.mount"15:25
teward^ that.  (I do SystemD workarounds for old systems where I'm not permitted to change the mount method xD)15:26
rbasakI think you should be able to do After=foo.network15:28
rbasakTo be more specific15:28
rbasakOr Requires= or whatever15:28
=== vlm_ is now known as vlm
zetherooWe have over a dozen Ubuntu Server systems mounting the same cifs mounts via fstab using the same fstab entries ... and this is the first time I see this.15:39
zetherooI suspect there is something messed up on this system specifically15:39
zetherooI just can't figure out what15:39
zetherooI have the network configured via netplan15:39
zetheroofunny thing is also that it's intermittent - I just rebooted it and all the mounts were mounted automatically on boot, then I rebooted again and they weren't :/15:42
TJ-zetheroo: are the references via FQDNs or IP addresses? if FQDNs then maybe it is DNS related15:45
geard_RoyK: thanks we've been looking at LDAP, might be time to do that. Thank you.15:46
geard_ducasse: We run some NFS so that might be worth doing. Thank you.15:46
geard_sarnold: thank you.15:47
=== vlm_ is now known as vlm
tewardTJ-: i'd assume that zetheroo is using DNS FQDNs or hostnames because of that error message.15:48
tewardotherwise you'd get a different error15:49
zetherooTJ-: fqdn16:06
zetherooactually just the hostname without the domain16:06
zetherooI guess I could try with the IPs16:08
zetherooI just realised that avahi isn't installed on this system, whereas it seems to be installed on the other (working) systems ...16:10
zetheroocould that have something to do with it? Isn't avahi installed by default with Ubuntu Server?16:11
zetheroook, changing to IPs works16:19
TJ-zetheroo: avahi-daemon is the multicast-DNS broadcaster, you'd want also libnss-mdns16:28
zetherooI installed avahi-daemon and it pulled in packages libavahi-core7 libdaemon0 libnss-mdns16:30
zetheroounfortunately it didn't solve the problem16:30
zetherooSuggested packages:16:31
zetheroo  avahi-autoipd avahi-autoipd | zeroconf16:31
zetheroodunno if those would make a difference16:31
TJ-zetheroo: it may need an extra Requires/After=systemd-resolved16:32
zetheroosorry, not sure what you mean16:34
TJ-zetheroo: the mount entry needs DNS therefore make it wait for systemd-resolved to be started16:34
zetherooah I see16:35
TJ-zetheroo: fstab entries are converted into systemd.mount jobs at runtime by systemd-ftab-generator. That will use those x-systemd-* options to set the dependencies of the .mount unit16:35
TJ-err, systemd-fstab-generator even16:35
zetheroowell since it's working fine with the IPs so I won't waste any more time on it. Like I said, the fstab entries are the same on a dozen other Ubuntu Server systems and they all work ... just on this one things are a bit messed up16:37
TJ-zetheroo: I'd analyse the network start-up then16:39
zetherooYeah, if the system was critical, or not going to be rebuilt in the next few months, I definitely would do so. I think the user (who has sudo rights) tinkered a bit too much on this system :P16:41
Odd_BlokeI believe systemd identifies CIFS mounts and orders them in boot after networking comes up without additional configuration, which is why you're seeing it work fine elsewhere.  DNS resolution sounds like a likely lead to follow if you do come back to it.16:54
=== de-facto_ is now known as de-facto

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!