Bug 853598 - readlink fails on CIFS mount
Summary: readlink fails on CIFS mount
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: 2.0
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Raghavendra Bhat
QA Contact: Ujjwala
URL:
Whiteboard:
Depends On: 802036
Blocks: 858492
TreeView+ depends on / blocked
 
Reported: 2012-09-01 06:28 UTC by Vidya Sakar
Modified: 2013-03-04 02:07 UTC (History)
8 users (show)

Fixed In Version: glusterfs-3.4.0qa6
Doc Type: Bug Fix
Doc Text:
Clone Of: 802036
: 858492 (view as bug list)
Environment:
Last Closed: 2013-01-11 10:33:04 UTC
Embargoed:


Attachments (Terms of Use)

Description Vidya Sakar 2012-09-01 06:28:34 UTC
+++ This bug was initially created as a clone of Bug #802036 +++

Description of problem:
Look up for link files on a CIFS mount fails


Version-Release number of selected component (if applicable):
3.3.0qa26


How reproducible:
Always


Steps to Reproduce:
1. Configure samba and do a cifs mount of the gluster volume on a Linux client.
2. Run Posix tests on the mount pt which creates many symlinks
3. After the tests are completed, do a ls -lh on the mnt pt

  
Actual results:
[root@coverity-machine cifs]# readlink fstest_16aaad323fe141aff916c13aa9918129 
[root@coverity-machine cifs]# echo $?
1
[root@coverity-machine cifs]# ls -lh
ls: cannot access fstest_4cdc259f27290c8f51d58ea962293641: Not a directory
ls: cannot access fstest_dde38409aafd44668f63fc9ffbae5db0: Not a directory
ls: cannot access fstest_408f4545367cb1df7830142cb67e6ad2: Not a directory
ls: cannot access fstest_aded26290f63256ef9d27e4b5c490fd8: Not a directory
ls: cannot access fstest_2b5286843e596f7986b8eca2e02155b6: Not a directory
ls: cannot access fstest_6d156dc1764f19fe2817eb01deff356e: Not a directory
ls: cannot access fstest_c29c8f15a53b7a814f600335f886451b: Not a directory
ls: cannot access fstest_4643f68c15e14fa0846248448e728334: Not a directory
ls: cannot access fstest_7cba4da0625441aee5d7f5d86f1e6d09: No such file or directory
ls: cannot access fstest_5a4a23b8b34449eb449bb99ea0c0c025: Not a directory
ls: cannot access fstest_e79e085d886b454e052528014cb89729: Not a directory
ls: cannot access fstest_23e53fa34b5631cc180ee021ceee753c: Not a directory
ls: cannot access fstest_a95e3f45018dac6789c099eeca81bffe: Not a directory
ls: cannot access fstest_ae357a46dbdfbf96a7671364c3a8d61d: Not a directory
ls: cannot access fstest_d79454f974ff0c2797b450422b9008c6: Not a directory
ls: cannot access fstest_7d41a4be52af464029a675fa8f8f4f00: Not a directory
ls: cannot access fstest_22bfdc5165d68b87f060f9a20ef9d2dc: Not a directory
ls: cannot access fstest_3c836965bc4a484361d539ccde8bdea0: Not a directory
ls: cannot access fstest_16aaad323fe141aff916c13aa9918129: Not a directory
ls: cannot access fstest_fc84a995fb62b2b08ed5d2d62216378b: Not a directory
ls: cannot access fstest_f1c00c9774ad52e14cfe8b0e7dd357c4: Not a directory
ls: cannot access fstest_b353c45d603a6eea8e361e8e58acd3fa: Not a directory
ls: cannot access fstest_4a36fb2592e82c5bbfb24fd80fe97862: Not a directory
total 8.3G
drwx-w----   3 root root    0 Mar  9 23:29 a
drwxr-xr-x   2 root root    0 Mar  8 22:20 abcd
-rw-------   1 root root 7.9G Mar  9 23:41 file1
l?????????   ? ?    ?       ?            ? fstest_16aaad323fe141aff916c13aa9918129
l?????????   ? ?    ?       ?            ? fstest_22bfdc5165d68b87f060f9a20ef9d2dc
l?????????   ? ?    ?       ?            ? fstest_23e53fa34b5631cc180ee021ceee753c
l?????????   ? ?    ?       ?            ? fstest_2b5286843e596f7986b8eca2e02155b6
l?????????   ? ?    ?       ?            ? fstest_3c836965bc4a484361d539ccde8bdea0
l?????????   ? ?    ?       ?            ? fstest_408f4545367cb1df7830142cb67e6ad2
l?????????   ? ?    ?       ?            ? fstest_4643f68c15e14fa0846248448e728334
l?????????   ? ?    ?       ?            ? fstest_4a36fb2592e82c5bbfb24fd80fe97862
l?????????   ? ?    ?       ?            ? fstest_4cdc259f27290c8f51d58ea962293641
l?????????   ? ?    ?       ?            ? fstest_5a4a23b8b34449eb449bb99ea0c0c025
l?????????   ? ?    ?       ?            ? fstest_6d156dc1764f19fe2817eb01deff356e
l?????????   ? ?    ?       ?            ? fstest_7cba4da0625441aee5d7f5d86f1e6d09
l?????????   ? ?    ?       ?            ? fstest_7d41a4be52af464029a675fa8f8f4f00
l?????????   ? ?    ?       ?            ? fstest_a95e3f45018dac6789c099eeca81bffe
l?????????   ? ?    ?       ?            ? fstest_aded26290f63256ef9d27e4b5c490fd8
l?????????   ? ?    ?       ?            ? fstest_ae357a46dbdfbf96a7671364c3a8d61d
l?????????   ? ?    ?       ?            ? fstest_b353c45d603a6eea8e361e8e58acd3fa
l?????????   ? ?    ?       ?            ? fstest_c29c8f15a53b7a814f600335f886451b
l?????????   ? ?    ?       ?            ? fstest_d79454f974ff0c2797b450422b9008c6
l?????????   ? ?    ?       ?            ? fstest_dde38409aafd44668f63fc9ffbae5db0
l?????????   ? ?    ?       ?            ? fstest_e79e085d886b454e052528014cb89729
l?????????   ? ?    ?       ?            ? fstest_f1c00c9774ad52e14cfe8b0e7dd357c4
l?????????   ? ?    ?       ?            ? fstest_fc84a995fb62b2b08ed5d2d62216378b



Expected results:
Readlink should show the corresponding link to the file
ls -lh should show the proper permissions 


Additional info:

Comment 2 Amar Tumballi 2012-09-04 08:09:45 UTC
Want to check if this is happening on RHS 2.0. Bug got opened in March10th/2012. Didn't had any report from RHS2.0 testing.

Comment 3 Ujjwala 2012-09-05 09:01:05 UTC
Tested it on RHS 2.0.z update 2 . The issue still exists.
The readlink and ls -lh gives following output, while the same files on fuse mount works fine.

Command output:
[root@gqac003 ~]# readlink /mnt/cifs/run28983/fstest_14a068838ca434832d51637697ee54fc
[root@gqac003 ~]# echo $?
1

[root@gqac003 ~]# ls -lh /mnt/cifs/run28983/
ls: cannot access /mnt/cifs/run28983/fstest_6bc5929adc37fd218730c85f578c7367: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_dac1874ee341dca26f8b6d7bd843a300: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_df97b4710289ba22bf2a22a42c9e6d0b: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_8bf35b49f5f9ae799b101e52db0a334f: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_fce33afcda5fa3a8106d74f7625b9e11: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_566c0066a4a20ce87d823191376dee3d: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_fe9e545b604fba31d6ef0b6fdd340342: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_a78f10d7178970954ee025a34aeadb55: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_9e4059a0646fc43ccb00034034ad2538: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_4b8f11ce926f1abf1311d2051e505957: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_c54ff14b8a0bdeb0750649525a612188: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_7f8d2632f13106f3de91db3dccc3caad: No such file or directory
ls: cannot access /mnt/cifs/run28983/fstest_93e94bdb5b14d636c456a8dcac710b7d: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_bc4fca1d4b99a8eb939bf91f1a547b6c: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_38363d6d8a5eddd9a09fe5908ac42fee: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_14a068838ca434832d51637697ee54fc: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_c771e44ef7af9db9fe79c3639684029b: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_3527f8f4415af5bb63b59789fc01ce0c: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_59e74a3b69a4d14a782a14935458cf55: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_8c7c7823c9f57293b466a3a08c390fa8: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_ec83955b5ab5c00b1bc6656057f2f9af: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_6c4f4d9b6cdae9ab5c03de9b5973817e: Not a directory
ls: cannot access /mnt/cifs/run28983/fstest_7a572cebd88307d2383ea2d7e9236a4f: Not a directory
total 0
l????????? ? ? ? ?            ? fstest_14a068838ca434832d51637697ee54fc
l????????? ? ? ? ?            ? fstest_3527f8f4415af5bb63b59789fc01ce0c
l????????? ? ? ? ?            ? fstest_38363d6d8a5eddd9a09fe5908ac42fee
l????????? ? ? ? ?            ? fstest_4b8f11ce926f1abf1311d2051e505957
l????????? ? ? ? ?            ? fstest_566c0066a4a20ce87d823191376dee3d
l????????? ? ? ? ?            ? fstest_59e74a3b69a4d14a782a14935458cf55
l????????? ? ? ? ?            ? fstest_6bc5929adc37fd218730c85f578c7367
l????????? ? ? ? ?            ? fstest_6c4f4d9b6cdae9ab5c03de9b5973817e
l????????? ? ? ? ?            ? fstest_7a572cebd88307d2383ea2d7e9236a4f
l????????? ? ? ? ?            ? fstest_7f8d2632f13106f3de91db3dccc3caad
l????????? ? ? ? ?            ? fstest_8bf35b49f5f9ae799b101e52db0a334f
l????????? ? ? ? ?            ? fstest_8c7c7823c9f57293b466a3a08c390fa8
l????????? ? ? ? ?            ? fstest_93e94bdb5b14d636c456a8dcac710b7d
l????????? ? ? ? ?            ? fstest_9e4059a0646fc43ccb00034034ad2538
l????????? ? ? ? ?            ? fstest_a78f10d7178970954ee025a34aeadb55
l????????? ? ? ? ?            ? fstest_bc4fca1d4b99a8eb939bf91f1a547b6c
l????????? ? ? ? ?            ? fstest_c54ff14b8a0bdeb0750649525a612188
l????????? ? ? ? ?            ? fstest_c771e44ef7af9db9fe79c3639684029b
l????????? ? ? ? ?            ? fstest_dac1874ee341dca26f8b6d7bd843a300
l????????? ? ? ? ?            ? fstest_df97b4710289ba22bf2a22a42c9e6d0b
l????????? ? ? ? ?            ? fstest_ec83955b5ab5c00b1bc6656057f2f9af
l????????? ? ? ? ?            ? fstest_fce33afcda5fa3a8106d74f7625b9e11
l????????? ? ? ? ?            ? fstest_fe9e545b604fba31d6ef0b6fdd340342

Comment 4 Amar Tumballi 2012-09-06 06:57:18 UTC
Chris, does samba depend on 'd_type' sent in readdir dentries? suspecting if that would be one of the possible reason for failure here.

Comment 5 Amar Tumballi 2012-10-31 10:09:43 UTC
> Tested it on RHS 2.0.z update 2 . The issue still exists.

Ujjwala, please try once with upstream RPMs and let me know what is the behavior.

Comment 7 Christopher R. Hertel 2012-11-02 21:10:29 UTC
(In reply to comment #4)
> Chris, does samba depend on 'd_type' sent in readdir dentries? suspecting if
> that would be one of the possible reason for failure here.

Please help me understand these steps...

> Steps to Reproduce:
> 1. Configure samba and do a cifs mount of the gluster volume on a Linux client.

Samba doesn't do any form of mount, since it's the server.  Please correct me if I am wrong, but I think this is:
  Samba is running on a system with a GlusterFS volume mounted.
  Samba is exporting the GlusterFS volume as an SMB share.
  A Linux client node uses the Linux CIFS kernel client to mount the share.
Is that correct?

If so, please note that the Linux CIFS client will negotiate the UNIX Extensions for SMB1 and will create symlinks using those extensions.  Windows does not (or did not) support soft links in an accessible way.

> 2. Run Posix tests on the mount pt which creates many symlinks

I am not familiar with this test suite.

> 3. After the tests are completed, do a ls -lh on the mnt pt

There are also restrictions on the use of symbolic links that were added to Samba a couple of years back as a security fix.  Again, I don't believe that the native protocol supports symbolic links, so it was probably not considered a big problem when they were restricted.

This may be better answered by one of our CIFS Kernel hackers.

Comment 8 Amar Tumballi 2012-12-21 07:42:39 UTC
Ujjwala, marking it ON_QA for 3.4.0qa bits. Please run a round of tests and verify (and re-open if exists again).

Comment 9 Ujjwala 2012-12-27 06:22:12 UTC
Amar,

Ran tests on the build - glusterfs 3.4.0qa5 built on Dec 17
I see the same results.
-------------------------------------------
Lookup from SMB mount:
[root@RHEL6 ~]# ls -l /mnt/cifs/run21173/
ls: cannot access /mnt/cifs/run21173/fstest_7045038df4f2f74286a49b59f6185ad4: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_3fce70a13fdf3fd7bd015ef309f63413: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_3c583b5a962777b954315409dabe50ef: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_300faf8d6879df6dcc2f74f167a0cf31: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_7ac39fa7791eed4e0909b1b3a9f12647: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_68d41d2e90cecb2364165bc851dd979a: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_47ce7115f3553efe201fa690ab574d25: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_ed8ca68ec2d4d89f6bd85fec93d4c492: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_8d79f3cffa79c64171ab48c0150b0c07: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_f42168fbd1acbf2a155dbd3abbdbde63: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_c445ada8a96ccdaa83dfb7f3575123c2: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_c8a8e870056f9e40713d4686fe6c27d5: No such file or directory
ls: cannot access /mnt/cifs/run21173/fstest_7fdc3b97e0e2e6e0f9f4af89218ef421: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_df52a1d144d80c4ca8dcaed56497d5c5: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_84e747b5b2846c39e334952809c1f1a9: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_84d4ca41de0ca68612b7038020af9c4b: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_d215904a16d882fabd404901148bbbe5: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_551668e0ba88b7fd1774f48cd58ca566: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_3dd46dc34fb7ba06b3061459e3488896: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_cc87693e1adfa76db517a97f3422018e: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_832b5cde142816158cb032a61d814f2c: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_0f9951c340eb4b9ddd0b69effbb8ecbd: Not a directory
ls: cannot access /mnt/cifs/run21173/fstest_a551eb3bd8aee639e0d9a9a8f772c018: Not a directory
total 0
l????????? ? ? ? ?            ? fstest_0f9951c340eb4b9ddd0b69effbb8ecbd
l????????? ? ? ? ?            ? fstest_300faf8d6879df6dcc2f74f167a0cf31
l????????? ? ? ? ?            ? fstest_3c583b5a962777b954315409dabe50ef
l????????? ? ? ? ?            ? fstest_3dd46dc34fb7ba06b3061459e3488896
l????????? ? ? ? ?            ? fstest_3fce70a13fdf3fd7bd015ef309f63413
l????????? ? ? ? ?            ? fstest_47ce7115f3553efe201fa690ab574d25
l????????? ? ? ? ?            ? fstest_551668e0ba88b7fd1774f48cd58ca566
l????????? ? ? ? ?            ? fstest_68d41d2e90cecb2364165bc851dd979a
l????????? ? ? ? ?            ? fstest_7045038df4f2f74286a49b59f6185ad4
l????????? ? ? ? ?            ? fstest_7ac39fa7791eed4e0909b1b3a9f12647
l????????? ? ? ? ?            ? fstest_7fdc3b97e0e2e6e0f9f4af89218ef421
l????????? ? ? ? ?            ? fstest_832b5cde142816158cb032a61d814f2c
l????????? ? ? ? ?            ? fstest_84d4ca41de0ca68612b7038020af9c4b
l????????? ? ? ? ?            ? fstest_84e747b5b2846c39e334952809c1f1a9
l????????? ? ? ? ?            ? fstest_8d79f3cffa79c64171ab48c0150b0c07
l????????? ? ? ? ?            ? fstest_a551eb3bd8aee639e0d9a9a8f772c018
l????????? ? ? ? ?            ? fstest_c445ada8a96ccdaa83dfb7f3575123c2
l????????? ? ? ? ?            ? fstest_c8a8e870056f9e40713d4686fe6c27d5
l????????? ? ? ? ?            ? fstest_cc87693e1adfa76db517a97f3422018e
l????????? ? ? ? ?            ? fstest_d215904a16d882fabd404901148bbbe5
l????????? ? ? ? ?            ? fstest_df52a1d144d80c4ca8dcaed56497d5c5
l????????? ? ? ? ?            ? fstest_ed8ca68ec2d4d89f6bd85fec93d4c492
l????????? ? ? ? ?            ? fstest_f42168fbd1acbf2a155dbd3abbdbde63


[root@RHEL6 ~]# readlink fstest_0f9951c340eb4b9ddd0b69effbb8ecbd
[root@RHEL6 ~]# echo $?
1
----------------------------------

Comment 10 Amar Tumballi 2012-12-27 06:53:55 UTC
Ujjwala, did you consider comment #7 from Chris?

We may have to call it a NOTABUG if symlink is not properly supported by CIFS itself.

Comment 11 Ujjwala 2013-01-08 13:18:47 UTC
(In reply to comment #10)
> Ujjwala, did you consider comment #7 from Chris?
> 
> We may have to call it a NOTABUG if symlink is not properly supported by
> CIFS itself.

Amar,

Sure.
If Symlinks are not completely supported by CIFS, then we can close it as NOTABUG 
and mention it in the documentation.

Comment 12 Amar Tumballi 2013-01-11 10:33:04 UTC
as per comment #7, symlink has issues with CIFS implementation. Hence closing the bug.


Note You need to log in before you can comment on or make changes to this bug.