Bug 88495

Summary: Samba init scripts have difficulty killing two NMBD processes
Product: [Retired] Red Hat Linux Reporter: Josiah Royse <jroyse>
Component: sambaAssignee: Jay Fenlason <fenlason>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: jfeeney, mishu
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-11-21 01:57:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
smb.conf none

Description Josiah Royse 2003-04-10 15:22:40 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
Using a smb.conf file that has the wins support = yes, causes two nmbd processes
to start, and the "/sbin/service smb stop"  init scripts don't deal well two
nmbd's, you have to run "stop" twice to catch both.

Attached is a smb.conf that re-creates the error, but I believe it just needs
the wins flag = yes.  the smb.conf file attached passed the "testparm" command also.

Version-Release number of selected component (if applicable):
samba-2.2.7a-8.9.0

How reproducible:
Always

Steps to Reproduce:
1. use attached smb.conf
2. start smb process
3. stop smb process
4. check smb status
    

Actual Results:  all started.. then not all stopped

Expected Results:  all started.. all stopped

Additional info:

[root@tabasco samba]# rm /var/run/samba/*
rm: remove regular file `/var/run/samba/nmbd.pid'? y
rm: remove regular file `/var/run/samba/smbd.pid'? y
[root@tabasco samba]# /sbin/service smb status
smbd is stopped
nmbd is stopped
[root@tabasco samba]# /sbin/service smb start
Starting SMB services:                                     [  OK  ]
Starting NMB services:                                     [  OK  ]
[root@tabasco samba]# /sbin/service smb status
smbd (pid 7662) is running...
nmbd (pid 7667 7666) is running...
[root@tabasco samba]# /sbin/service smb stop
Shutting down SMB services:                                [  OK  ]
Shutting down NMB services:                                [  OK  ]
[root@tabasco samba]# /sbin/service smb status
smbd is stopped
nmbd (pid 7693 7666) is running...
[root@tabasco samba]# /sbin/service smb stop
Shutting down SMB services:                                [FAILED]
Shutting down NMB services: /etc/init.d/smb: line 195: kill: (7666) - No such
process
                                                           [  OK  ]
[root@tabasco samba]# /sbin/service smb status
smbd is stopped
nmbd is stopped

Comment 1 Josiah Royse 2003-04-10 15:23:42 UTC
Created attachment 91058 [details]
smb.conf

smb.conf with multiple shares, wins =yes

Comment 2 Jay Fenlason 2003-04-24 22:18:49 UTC
Try adding
pid directory = /var/run
to your /etc/samba/smb.conf file.  It seems to make "service smb stop" work
correctly here.  I'll try to make sure this makes it into the next erratum.

Comment 3 Josiah Royse 2003-04-26 02:19:08 UTC
Great that works!  It seems that the function "killproc" in the init functions
couldn't get to the directory /var/run/samba.

I've also found these areas to change:

samba.spec: compiled in    --with-piddir=/var/run/samba \
samba.spec: directory /var/run/samba created
/etc/init.d/smb: listed in the header comments.

Comment 4 Josiah Royse 2003-11-21 01:57:34 UTC
Really, this is fixed, but the bug exists in RedHat 9.0, which is EOL
soon..?

samba-3.0.0-15 spec file:

...snip...

* Thu Apr 24 2003 Jay Fenlason <fenlason> 2.2.8a-1
- upgrade to 2.2.8a
- remove old .md5 files
- add "pid directory = /var/run" to the smb.conf file.  Fixes #88495
- Patch from jra.org to fix a delete-on-close regression