[Samba] CTDB and locking issues in 4.4.6 (Classic domain)

Alex Crow acrow at integrafin.co.uk
Sun Oct 23 10:18:55 UTC 2016



On 23/10/16 10:00, Ralph Böhme wrote:
> Alex,
>
> On Sat, Oct 22, 2016 at 07:30:01PM +0100, Alex Crow wrote:
>> I applied the patch to a new build of Sernet 4.4.6 SRPM. I could still
>> open the file from both hosts, and in fact this time I could actually
>> open it on the same host without any problems:
> I don't see where you're opening the file twice from one smbclient
> below. Am I missing something?

Not the same client session, but two sessions connecting to the same host.

>
> And then there's no need to use an xls file, simply create an empty
> file in the root of the share with `touch file` and use that.

Yes, it's just I had been testing with that file the whole time so I had
it in my clipboard...

>
>> host 1:
>>
>> smbclient -U ajc //172.31.0.120/ifa_v
>>
>> ...
>>
>> smb: \jmi\Corporate Accounting\ISL Ltd Accounts\2016\1609\> open "201609
>> 213_ ISL Balance sheet variance analysis.xls"
>> open file \jmi\Corporate Accounting\ISL Ltd Accounts\2016\1609\201609
>> 213_ ISL Balance sheet variance analysis.xls: for read/write fnum 56287
>>
>> host 2:
>>
>> smbclient -U ajc //172.31.0.120/ifa_v
>>
>> ...
>>
>> smb: \jmi\Corporate Accounting\ISL Ltd Accounts\2016\1609\> open "201609
>> 213_ ISL Balance sheet variance analysis.xls"
>> open file \jmi\Corporate Accounting\ISL Ltd Accounts\2016\1609\201609
>> 213_ ISL Balance sheet variance analysis.xls: for read/write fnum 17669
>>
>> But this:
>>
>> # smbstatus -L
>> Locked files:
>> Pid          Uid        DenyMode   Access      R/W       
>> Oplock           SharePath   Name   Time
>> --------------------------------------------------------------------------------------------------
>> 1:19650      1046       DENY_NONE  0x83        RDWR      
>> NONE             /mfs/samba/drive_v   jmi/Corporate Accounting/ISL Ltd
>> Accounts/2016/1609/201609 213_ ISL Balance sheet variance analysis.xls  
>> Sat Oct 22 19:26:06 2016
>> 0:13503      1046       DENY_NONE  0x83        RDWR      
>> NONE             /mfs/samba/drive_v   jmi/Corporate Accounting/ISL Ltd
>> Accounts/2016/1609/201609 213_ ISL Balance sheet variance analysis.xls  
>> Sat Oct 22 18:58:06 2016
> Is this from an open with the patched smbclient or from Excel?

smbclient.

>
>> Is odd as the patch was applied fine during the RPM build process.
>>
>> Is there something I need to do when building from sRPMs to make
>> this stick?
> You could double check in ~/rpmbuild/BUILD/ if the patch was really
> applied. If it was, an smbclient open should result in DENY_ALL
> denymode in smbstatus -L, eg:
>
> $ ./bin/smbclient -Uslow%x -msmb3 //10.10.11.100/test
> Domain=[SLOWSERVER] OS=[] Server=[]
> smb: \> open test
> open file \test: for read/write fnum 1
>
> $ sudo ./bin/smbstatus -L
> Locked files:
> Pid          Uid        DenyMode   Access      R/W        Oplock           SharePath   Name   Time
> --------------------------------------------------------------------------------------------------
> 12757        1000       DENY_ALL   0x3         RDWR       NONE             /shares/test   test   Sun Oct 23 10:39:25 2016
>
> Cheerio!
> -slow

Does look like it didn't get applied. Odd, as it was in the specfile and
the SOURCES dir and the build finished. I'll check,

Cheers

Alex

--
This message is intended only for the addressee and may contain
confidential information. Unless you are that person, you may not
disclose its contents or use it in any way and are requested to delete
the message along with any attachments and notify us immediately.
This email is not intended to, nor should it be taken to, constitute advice.
The information provided is correct to our knowledge & belief and must not
be used as a substitute for obtaining tax, regulatory, investment, legal or
any other appropriate advice.

"Transact" is operated by Integrated Financial Arrangements Ltd.
29 Clement's Lane, London EC4N 7AE. Tel: (020) 7608 4900 Fax: (020) 7608 5300.
(Registered office: as above; Registered in England and Wales under
number: 3727592). Authorised and regulated by the Financial Conduct
Authority (entered on the Financial Services Register; no. 190856).



More information about the samba mailing list