[00:08] <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:10] <RoyK> ansible?
[00:10] <RoyK> geard_: or just use NIS, that is, NIS went out of style 20 years ago, so perhaps better use LDAP ;)
[00:23] <sarnold> geard_: ldap is the usual tool to automate this when you've got more than just a few laptops laying around
[07:53] <lordievader> Good morning
[08:15] <ducasse> geard_: if you're using nfs that will be helpful
[14:44] <zetheroo> strange problem on one of our Ubuntu Server systems - cifs mounts in fstab aren't mounting on boot
[14:45] <zetheroo> from what I can tell the system cannot resolve the hostnames of the cifs servers early enough
[14:46] <zetheroo> immediately after boot if I ssh into the system and do 'mount -a' all the shares mount instantly
[14:47] <zetheroo> in syslog I see an entry like this for every cifs mount entry in fstab:
[14:47] <zetheroo> ifup[633]: mount error: could not resolve address for SERVERNAME: Unknown error
[15:15] <teward> zetheroo: that USUALLY points to mounts being done before networking is online
[15:15] <teward> which... isn't exactly too surprising just saying.
[15:16] <teward> with 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 up
[15:16] <teward> that way networking, DNS, etc. is all established.
[15:16] <teward> before it attempts to mount those.
[15:23] <rbasak> If 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:24] <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] <rbasak> https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/ has more info on the latter point.
[15:24] <ddstreet> Wants=network-online.target and After=network-online.target
[15:24] <TJ-> yes. use in fstab the option x-systemd.requires=network-online.target
[15:25] <TJ-> see "man 5 systemd.mount"
[15:26] <teward> ^ that.  (I do SystemD workarounds for old systems where I'm not permitted to change the mount method xD)
[15:28] <rbasak> I think you should be able to do After=foo.network
[15:28] <rbasak> To be more specific
[15:28] <rbasak> Or Requires= or whatever
[15:39] <zetheroo> We 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] <zetheroo> I suspect there is something messed up on this system specifically
[15:39] <zetheroo> I just can't figure out what
[15:39] <zetheroo> I have the network configured via netplan
[15:42] <zetheroo> funny 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:45] <TJ-> zetheroo: are the references via FQDNs or IP addresses? if FQDNs then maybe it is DNS related
[15:46] <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:47] <geard_> sarnold: thank you.
[15:48] <teward> TJ-: i'd assume that zetheroo is using DNS FQDNs or hostnames because of that error message.
[15:49] <teward> otherwise you'd get a different error
[16:06] <zetheroo> TJ-: fqdn
[16:06] <zetheroo> actually just the hostname without the domain
[16:08] <zetheroo> I guess I could try with the IPs
[16:10] <zetheroo> I just realised that avahi isn't installed on this system, whereas it seems to be installed on the other (working) systems ...
[16:11] <zetheroo> could that have something to do with it? Isn't avahi installed by default with Ubuntu Server?
[16:19] <zetheroo> ok, changing to IPs works
[16:28] <TJ-> zetheroo: avahi-daemon is the multicast-DNS broadcaster, you'd want also libnss-mdns
[16:30] <zetheroo> I installed avahi-daemon and it pulled in packages libavahi-core7 libdaemon0 libnss-mdns
[16:30] <zetheroo> unfortunately it didn't solve the problem
[16:31] <zetheroo> Suggested packages:
[16:31] <zetheroo>   avahi-autoipd avahi-autoipd | zeroconf
[16:31] <zetheroo> dunno if those would make a difference
[16:32] <TJ-> zetheroo: it may need an extra Requires/After=systemd-resolved
[16:34] <zetheroo> sorry, not sure what you mean
[16:34] <TJ-> zetheroo: the mount entry needs DNS therefore make it wait for systemd-resolved to be started
[16:35] <zetheroo> ah I see
[16: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 unit
[16:35] <TJ-> err, systemd-fstab-generator even
[16:37] <zetheroo> well 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 up
[16:39] <TJ-> zetheroo: I'd analyse the network start-up then
[16:41] <zetheroo> Yeah, 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 :P
[16:54] <Odd_Bloke> I 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.