Bug 2180 - OS X client: Local Drive Redirection support: Port unfsd to OSX
Summary: OS X client: Local Drive Redirection support: Port unfsd to OSX
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Client platforms (show other bugs)
Version: 1.5.0
Hardware: PC macOS
: P2 Enhancement
Target Milestone: 4.2.0
Assignee: Karl Mikaelsson
URL:
Keywords: hean01_tester, relnotes
Depends on: 4991
Blocks: 2425
  Show dependency treegraph
 
Reported: 2006-09-29 09:26 CEST by Peter Åstrand
Modified: 2014-04-01 15:45 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Peter Åstrand cendio 2006-09-29 09:26:06 CEST
This bug is about adding Local Drive Redirection support to the OSX client. This
means porting of unfsd. Since OSX is basically UNIX, this is hopefully feasible.
Comment 1 Pierre Ossman cendio 2012-12-07 10:33:32 CET
We'll try for 4.1.0 on the assumption that we can easily do this. If it turns out to be a lot of work we'll have to move it.
Comment 2 Karl Mikaelsson cendio 2013-02-06 14:09:20 CET
So far, so good. With a tiny bit of extra typedefs, unfs3 builds on OS X.

* r26527 adds the typedef
* r26528 adds unfsd to the OS X client build

Waiting for a nightly build to continue testing.
Comment 3 Karl Mikaelsson cendio 2013-02-12 13:16:39 CET
* r26558 adds the LOCAL_DRIVES feature define for OS X
* r26559 and r26560 makes sure that in_addr and sockaddr_in structs are zero:ed before use.

Brief testing on OS X 10.4 and OS X 10.8 tells me that it works well enough.
Comment 5 Henrik Andersson cendio 2013-05-06 11:37:13 CEST
Tested using build 3939.

Creating a folder in the root of mount in finder fails like this;

First a folder named "untitled folder" is created and user is instructed to name the folder, which will fail with rename file to new name with "Device or resource busy". Leaving a folder "untitled folder" which cant be renamed.


Creating a folder in subdirectory of mount in finder fails like above but with error messages "Stale NFS Handle".


When going into a subfolder content is not show, repeatedly hits on F5 (refresh) in finder makes some of the content to be shown.
Comment 6 Karl Mikaelsson cendio 2013-05-08 11:18:23 CEST
(In reply to comment #5)
> Tested using build 3939.
> 
> Creating a folder in the root of mount in finder fails like this;
> 
> First a folder named "untitled folder" is created and user is instructed to
> name the folder, which will fail with rename file to new name with "Device or
> resource busy". Leaving a folder "untitled folder" which cant be renamed.
> 
> 
> Creating a folder in subdirectory of mount in finder fails like above but with
> error messages "Stale NFS Handle".
> 
> 
> When going into a subfolder content is not show, repeatedly hits on F5
> (refresh) in finder makes some of the content to be shown.

This comment was copied to bug 3104, the error was reproducible on other platforms as well. Waiting for action on bug 3104 before I mark this as resolved again.
Comment 7 Peter Åstrand cendio 2013-05-13 13:41:32 CEST
(In reply to comment #6)
> (In reply to comment #5)
> > Tested using build 3939.
> > 
> > Creating a folder in the root of mount in finder fails like this;
> > 
> > First a folder named "untitled folder" is created and user is instructed to
> > name the folder, which will fail with rename file to new name with "Device or
> > resource busy". Leaving a folder "untitled folder" which cant be renamed.

Apparently "finder" should be read as "nautilus". However, I cannot reproduce this problem. I'm using the latest nightly build on XP as client, against eudemo.thinlinc.com, creating a directory in nautilus. Need more info from tester...
Comment 8 Henrik Andersson cendio 2013-05-14 08:14:47 CEST
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > Tested using build 3939.
> > > 
> > > Creating a folder in the root of mount in finder fails like this;
> > > 
> > > First a folder named "untitled folder" is created and user is instructed to
> > > name the folder, which will fail with rename file to new name with "Device or
> > > resource busy". Leaving a folder "untitled folder" which cant be renamed.
> 
> Apparently "finder" should be read as "nautilus". However, I cannot reproduce
> this problem. I'm using the latest nightly build on XP as client, against
> eudemo.thinlinc.com, creating a directory in nautilus. Need more info from
> tester...

Apperently there was a mixup when reporting, finder is the filemanager on macosx i was testing on. I have retested and the problems occurs on ubuntu 12.04  x86_64 and SLED 11 sp2, could not reproduce the problem against eudemo or against my fedora 17. However i also tested 4.0.0 and 3.4.0 client which also fails as with the 4.0.0post version so this is a serverside issue.
Comment 9 Karl Mikaelsson cendio 2013-05-14 14:42:34 CEST
The issues in comments #5, #6, #7 and #8 has been moved to bug 4645.

Marking this as resolved again and removing dependency on 3104.
Comment 10 Henrik Andersson cendio 2013-05-16 10:52:03 CEST
Renaming a directory in a redirected mac osx home directory (Users/<username>) fails with: Resource or Device busy.

If i export /tmp there is no problem with renaming directories.

Problem appears on both MacOSX version 10.4.11 and 10.8.2.
Comment 11 Karl Mikaelsson cendio 2013-05-20 15:03:23 CEST
Couldn't figure it out, so setting milestone to '---' for further discussion on where to place the bug.

r27410 and r27411 makes sure that we keep building but not shipping unfsd for OS X.

For the curious, here's a couple of strace/dtruss logs:

strace of mv on the ThinLinc server side (unfsd client side).

execve("/bin/mv", ["mv", "Untitled Folder/", "Untitled Folder 2"], [/* 45 vars */]) = 0
[...]
stat("Untitled Folder 2", 0x7fff9934a7f0) = -1 ENOENT (No such file or directory)
lstat("Untitled Folder/", {st_mode=S_IFDIR|0775, st_size=68, ...}) = 0
lstat("Untitled Folder 2", 0x7fff9934a590) = -1 ENOENT (No such file or directory)
rename("Untitled Folder/", "Untitled Folder 2") = -1 EBUSY (Device or resource busy)
[...]

dtruss output from tracing unfsd on OS X 10.8 (same operation as above).

13595/0x6b2f3:    515245  454989     63 select_nocancel(0x400, 0xBFFFFA94, 0x0)		 = 1 0
13595/0x6b2f3:    515290       9      2 select_nocancel(0x6, 0xBFFFF2D8, 0x0)		 = 1 0
13595/0x6b2f3:    515294       7      3 read_nocancel(0x5, "\200\0", 0xFA0)		 = 132 0
13595/0x6b2f3:    515368     248     66 lstat("/Users/aaron\0", 0x4C8BF0, 0xFA0)		 = 0 0
13595/0x6b2f3:    515396      30     24 open_nocancel("/Users/aaron\0", 0x1120004, 0x0)		 = 4 0
13595/0x6b2f3:    515404       7      3 fstatfs(0x4, 0xBFFFF118, 0x0)		 = 0 0
13595/0x6b2f3:    515434      31     27 getdirentries(0x4, 0xBC7A00, 0x1000)		 = 492 0
13595/0x6b2f3:    515441       7      4 getdirentries(0x4, 0xBC7A00, 0x1000)		 = 0 0
13595/0x6b2f3:    515445       5      2 lseek(0x4, 0x0, 0x0)		 = 0 0
13595/0x6b2f3:    515453       8      4 close_nocancel(0x4)		 = 0 0
13595/0x6b2f3:    515458       3      0 getuid(0x4, 0x0, 0x0)		 = 502 0
13595/0x6b2f3:    515459       3      0 getgid(0x4, 0x0, 0x0)		 = 20 0
13595/0x6b2f3:    515463       5      3 lstat("/Users/aaron\0", 0xBFFFF210, 0x0)		 = 0 0
13595/0x6b2f3:    515485      20     16 write_nocancel(0x5, "\200\0", 0x7C)		 = 124 0
13595/0x6b2f3:    515502     932      9 select_nocancel(0x400, 0xBFFFFA94, 0x0)		 = 1 0
13595/0x6b2f3:    515510       4      1 select_nocancel(0x6, 0xBFFFF2D8, 0x0)		 = 1 0
13595/0x6b2f3:    515513       5      2 read_nocancel(0x5, "\200\0", 0xFA0)		 = 128 0
13595/0x6b2f3:    515540      25     22 lstat("/Users/aaron/Untitled Folder\0", 0xBFFFF2A8, 0xFA0)		 = 0 0
13595/0x6b2f3:    515548       7      5 getuid(0x15DB0, 0xBFFFF2A8, 0xFA0)		 = 502 0
13595/0x6b2f3:    515549       2      0 getgid(0x15DB0, 0xBFFFF2A8, 0xFA0)		 = 20 0
13595/0x6b2f3:    515551       4      1 lstat("/Users/aaron\0", 0xBFFFF210, 0xFA0)		 = 0 0
13595/0x6b2f3:    515564      14     10 write_nocancel(0x5, "\200\0", 0x74)		 = 116 0
13595/0x6b2f3:    515602 1001061     29 select_nocancel(0x400, 0xBFFFFA94, 0x0)		 = 0 0
Comment 12 Karl Mikaelsson cendio 2013-12-12 13:59:29 CET
Re-enabled local drives feature on OS X in r28194.
Comment 13 Karl Mikaelsson cendio 2014-02-17 14:08:06 CET
Issue(s) in comment #11 moved to Bug 4991 or I won't ever get this done.
Comment 14 Karl Mikaelsson cendio 2014-03-17 13:25:21 CET
Now that bug 4991 has been solved, local drives on OS X works fine from what I can tell.
Comment 15 Henrik Andersson cendio 2014-03-18 09:19:22 CET
Tested using client build 4290

- dd 100Mb file
- creating renaming folders / files
- moving around folders / files

Works as expected on both 10.6 and 10.9.

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