Latest samba package: samba-3.0.0-6rc3.3E smbclient and smbfs hang after failover. Additionally: - No anonymous browsing (may be a "Security" feature?) - nmbd -n <foo> does not work properly when an IP address is specified as the NetBIOS name Potentially a bug in latest Samba; 2.2.8 (imported version from dist-8.0.1/dist-9) worked. Going to try older 3.0.0-2beta3 and see if this works.
Has it been determined whether this is a samba bug or a clumanager bug?
3.0.0rc3 requires changes to the default smb.conf.<sharename>. For one, these need to go into the [global] section to enable anonymous browsing: map to guest = Bad User socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 Anonymous browsing was disabled by default because it was a security problem. Other findings: - "nmbd -n <netbios_name>" doesn't seem to work. nmbd uses the hostname as the netbios name instead of the one specified on the command line! This causes the netbios name to no longer be available. - the configuration option: "bind interfaces only = yes" does not seem to bind only to the interfaces. It binds to the list of interfaces as well as INADDR_ANY, which causes failover to break - machines were connecting via the VIP and probably getting responses via the main IP; so when the service was disabled, ifconfig <VIP> down was *not* sufficient for disallowing further connections/traffic.
For upstream maintainers: <comments from lhh> nmbd doesn't respect "-n <primary_netbios_name>" command line option source/nmbd/nmbd.c:610 has POPT_COMMON_SAMBA, but there is no POPT_COMMON_CONNECTION (which may be why the -n is getting ignored?) However, even if we place POPT_COMMON_CONNECTION in, the specified NetBIOS name gets replaced by the local hostname: * main() @ nmbd/nmbd.c:596 calls reload_nmbd_services() at line 673 * reload_nmbd_services() @ nmbd/nmbd.c:273 calls lp_load() at line 291 * lp_load() @ param/loadparam.c:3900 calls init_globals() at line 3919 * init_globals() @ param/loadparam.c:1277 calls set_global_myname(myhostname()) at line 1338 At this point, we set our NetBIOS name to our hostname. That's fine for initialization, but the command line option would have been parsed earlier - thus, our "-n <...>" parameter is lost. We then proceed to parse the configuration file and replace our NetBIOS name with the "netbios name = foo" in the config file. Was it intentional to disable parsing of "-n" ? </comment>
Created attachment 94422 [details] dirty patch to fix nmbd behavior, 3.0.0rc3
Logging time.
Hardy is also working on a workaround in redhat-config-cluster which would add a generated netbios name parameter to /etc/samba/smb.conf.<sharename> when it gets created: - Use hostname of first service IP, if it exists, or - Use first service IP if it doesn't. (ugly, but should work) This is the same behavior clumanager uses to determine the "netbios name" it sends to nmbd on the command line: nmbd -n <hostname_or_ip> -D -s /etc/samba/smb.conf.<sharename> I added a Samba fix to clumanager in case someone doesn't like the generated netbios parameter and wants to comment it out; clumanager-1.2.1 is in the pool.
Created attachment 94425 [details] Newer patch fixes nmbd -n <name> (was missing POPT_COMMON_CONNECTION in nmbd.c)
New redhat-config-cluster w/o workaround: 1.0.0-5 in 3.0E removes workaround.