When adding a new share to smb.conf and "pkill -HUP smbd/nmbd" , i would expect that this share would be also added to avahi-daemon running config to be advertised there, but apparently i need to restart avahi-daemon to make it appear. i'm not sure if this is a bug or if this is by design or a "missing feature", though. this happens with latest samba 4.8.0rc4
apparently, after pkill -HUP smbd/nmbd, restarting avahi-daemon (added sleep 5 after pkill) seems to be unreliable, i had at least one occurence where smbd did not re-register the shares after that and so no user could do timemachine backups.
I am running 4.9.5-Debian on Debian buster and am experiencing similar problems. It looks like Samba registers with Avahi when starting up or avahi starting up and uses a TTL of 120 (at least for the smb service). After these 120 seconds it seems macOS no longer can find Samba via mDNS/Avahi.
The symptoms of this issue are very similar to those I encountered as a result of the firewall in my vanilla configuration of CentOS blocking mDNS by default. When I explicitly allowed mDNS through the firewall, vfs_fruit worked great. Please see Bug 14574.
*** This bug has been marked as a duplicate of bug 14574 ***