Comments (11)
I don't know if there's a way to communicate the internal kernel state about how the socket is supposed to work through the nfs protocol
from go-nfs.
Interestingly, if I try to start nc using the socket in the mount (so, nc -lU mount/test.sock
instead of nc -lU test.sock
), I get [ERROR] call to 0x11ae70 failed: Operation not supported
. If the file already exists, Remove
is called.
from go-nfs.
It's probably because onMknod
has no support.
from go-nfs.
good catch. it should be reasonable straight forward to add that - i think the trick will be that the underlying billy fs interface also doesn't expose anything around this, so we'll need to add another optional interface for handlers to implement if they want to expose that on their filesystem implementation.
from go-nfs.
Yes --- we could just copy the syscall
argument list --- path, mode, device number.
from go-nfs.
Do you have a sense of what the underlying system call should be when Mknod
for a socket is sent over NFS?
- the rfc indicates that
Mknod
can take a file type ofNF3SOCK
indicating creation of a socket. When that is requested, the only passed data is thesattr3 pipe_attributes;
- which does not include a major or minor number.
from go-nfs.
I think i have a sketch of the expected backing behavior - working through it in https://github.com/willscott/go-nfs/tree/feat/mknod and will PR once ready.
The rfc is pretty thin on details on the expected semantics of a created socket in particular, but this may be close enough
from go-nfs.
the branch has a first pass at what seems like plausible for this code, and the osnfs
example supporting mknod
operations.
if you can point me to concrete repro steps for things not working ("on ubuntu, make an nfs mount, run these lines, get error") i'll be able to get to fixing potential bugs in here faster
from go-nfs.
Sorry, didn't see this till now: interestingly, you can't create just "hanging" sockets, but it looks like you figured something out.
There are two reproducers: one, create a mount exposing a local directory --- mount 127.0.0.1:dir mount
. Run nc -lkU dir/test.sock
. Try to do nc mount/test.sock
. You should get a "Connection refused". However, this does not seem possible to solve.
Another reproducer: Do nc -lkU mount/test.sock
. Then try to do nc mount/test.sock
. You should get a Remove call and an "Operation not permitted". This is something that should be fixable.
from go-nfs.
Updated the branch linked above. I was able to create a socket and a fifo over the mount locally at least.
can you see if that gives you better behavior?
from go-nfs.
It does seem to work now --- the second reproducer now leads to the expected behavior (I can connect and send messages back and forth). #91 is still an issue though, so sockets wasn't the issue. Thanks!
from go-nfs.
Related Issues (20)
- There are still places where FileID zero is returned, which confuses linux HOT 9
- Still getting stale file handle issues: see #100 HOT 3
- `onRename` errors out with "comparing uncomparable type" HOT 4
- if `fs.Remove` fails with `non-empty directory`, the server should forward that. HOT 1
- Incorrect handling of an open file's `Name()` HOT 1
- If `Read` is above a certain size, it will return nothing HOT 1
- onReadDirPlus with small cache yields no results, but no error HOT 2
- Some Write calls leads to data loss HOT 30
- A git clone will lead to the server displaying files with corrupted permissions HOT 9
- Unnecessary error messages for non-errors HOT 8
- make `onlookup` use stat rather than readdir HOT 1
- Removing directory leads to `Stale file handle` HOT 3
- Symbolic Links Cause Stale NFS File Handles HOT 1
- tagged releases
- fs.Stat is called when fs.Lstat should be called HOT 5
- support backing systems without exposed fileids
- "Illegal instruction" when trying to run `su user` in chroot in mount HOT 29
- `flock` hangs HOT 3
- GETATTR does not set fhandle in returned struct HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-nfs.