Bug #34411
Get samba_server status when checking if AD started
Description
Parent smbd occasionally exits on signal 6. Have not completed root cause analysis of this yet. Separate bug ticket. This results in shares being inaccessible. Customer asked for script to restart samba if it enters this state. Existing logic in AD monitoring does not catch this situation.
Arguably this is should be monitored separately (i.e. part of smb monitoring, not AD monitoring), but AD exists and monitoring is being rewritten in the future. The simple fix to this is to add additional check for samba_server status. This has added advantage of perhaps getting us out having to do a full restart of Active Directory when it's not warranted.
Related issues
History
#1
Updated by Andrew Walker almost 3 years ago
- Status changed from Unscreened to In Progress
#2
Updated by Andrew Walker over 2 years ago
The real PR against master
https://github.com/freenas/freenas/pull/1324
#4
Updated by Dru Lavigne over 2 years ago
- Status changed from In Progress to Ready for Testing
- Target version changed from Backlog to 11.2-BETA1
#6
Updated by Dru Lavigne over 2 years ago
- Subject changed from AD monitoring does not restart smbd if it crashes to Get samba_server status when checking if AD started
#7
Updated by Nick Wolff over 2 years ago
- Status changed from Ready for Testing to Passed Testing
Tested as planned
root@fn02:~ # service samba_server status nmbd is running as pid 54144. smbd is running as pid 54595. winbindd is running as pid 54157. root@fn02:~ # ps aux | grep smb root 54144 0.0 0.0 37200 23008 - Ss Tue16 0:01.79 /usr/local/sbin/nmbd --daemon --configfile=/usr/local/etc/smb4.conf root 54157 0.0 0.0 45580 27948 - Ss Tue16 0:03.07 /usr/local/sbin/winbindd --daemon --configfile=/usr/local/etc/smb4.conf root 54179 0.0 0.0 45632 27708 - S Tue16 0:00.14 /usr/local/sbin/winbindd --daemon --configfile=/usr/local/etc/smb4.conf root 54566 0.0 0.0 45556 27932 - S 07:13 0:00.00 /usr/local/sbin/winbindd --daemon --configfile=/usr/local/etc/smb4.conf root 54595 0.0 0.1 133692 115288 - Is 07:13 0:00.11 /usr/local/sbin/smbd --daemon --configfile=/usr/local/etc/smb4.conf root 54624 0.0 0.1 130724 113832 - S 07:13 0:00.00 /usr/local/sbin/smbd --daemon --configfile=/usr/local/etc/smb4.conf root 54625 0.0 0.1 130724 113828 - S 07:13 0:00.00 /usr/local/sbin/smbd --daemon --configfile=/usr/local/etc/smb4.conf root 55088 0.0 0.1 92340 75456 - I Tue16 14:41.63 /usr/local/sbin/winbindd --daemon --configfile=/usr/local/etc/smb4.conf root 55205 0.0 0.0 46748 28168 - S Tue16 0:00.13 /usr/local/sbin/winbindd --daemon --configfile=/usr/local/etc/smb4.conf root 56422 0.0 0.0 6704 2688 0 S+ 07:15 0:00.00 grep smb root@fn02:~ # pkill -9 smbd root@fn02:~ # ps aux | grep smb root 54144 0.0 0.0 37200 23008 - Ss Tue16 0:01.79 /usr/local/sbin/nmbd --daemon --configfile=/usr/local/etc/smb4.conf root 54157 0.0 0.0 45580 27948 - Ss Tue16 0:03.07 /usr/local/sbin/winbindd --daemon --configfile=/usr/local/etc/smb4.conf root 54179 0.0 0.0 45632 27708 - S Tue16 0:00.14 /usr/local/sbin/winbindd --daemon --configfile=/usr/local/etc/smb4.conf root 54566 0.0 0.0 45556 27932 - S 07:13 0:00.00 /usr/local/sbin/winbindd --daemon --configfile=/usr/local/etc/smb4.conf root 55088 0.0 0.1 92340 75456 - I Tue16 14:41.63 /usr/local/sbin/winbindd --daemon --configfile=/usr/local/etc/smb4.conf root 55205 0.0 0.0 46748 28168 - S Tue16 0:00.13 /usr/local/sbin/winbindd --daemon --configfile=/usr/local/etc/smb4.conf root 56425 0.0 0.0 6704 2688 0 S+ 07:15 0:00.00 grep smb root@fn02:~ # service samba_server status nmbd is running as pid 54144. smbd is not running. winbindd is running as pid 54157. root@fn02:~ # service samba_server status nmbd is running as pid 54144. smbd is not running. winbindd is running as pid 54157. root@fn02:~ # service samba_server status nmbd is running as pid 54144. smbd is not running. winbindd is running as pid 54157. root@fn02:~ # service samba_server status nmbd is running as pid 54144. smbd is not running. winbindd is running as pid 54157. root@fn02:~ # sleep 60;service samba_server status nmbd is running as pid 54144. smbd is running as pid 56739. winbindd is running as pid 54157. root@fn02:~ #
#8
Updated by Dru Lavigne over 2 years ago
- Status changed from Passed Testing to Done
- Needs QA changed from Yes to No
- Needs Doc changed from Yes to No
- Needs Merging changed from Yes to No
#9
Updated by John Hixson over 2 years ago
- Copied to Bug #40644: Get samba_server status when checking if AD started added