Comments (7)
BTW, this is the best documentation I could find for the 9p protocol's errors:
http://lxr.free-electrons.com/source/net/9p/error.c
from datakit.
Isn't this correct? The root is read-only, and /branch
already exists. Is the bug that we should return File exists
rather than Directory is read-only
?
from datakit.
Maybe? It wasn't clear to me that the root was RO, but now I know! Thanks!
It didn't help matters that from the filesystem, ls
didin't show a branch
directory and that mkdir branch
would also complete without error.
As for the error message, yes I'd expect File Exists
before Directory is read-only
.
What I'd like is a safe way for a client to handle certain types of error.
In the mkdir -p
example. it's okay if part of the path exists and I can safely ignore the error.
It is however, not ok to ignore other errors e.g No space left on device
for example.
It seems the documentation is scare for error strings... I'm not really fond of pattern matching error strings to determine the "kind" of error either 😭 but I think it's the best we can do with the protocol as it stands. Open to other ideas though...
from datakit.
Why didn't ls
show it? It does with the Linux and OCaml clients, at least:
/Database # ls
branch remotes snapshots trees
/Database # mkdir branch
mkdir: can't create directory 'branch': File exists
I guess Linux is adding the File exists
here because ocaml9p shows the protocol message:
tal@Thomass-MacBook-Pro ~> ocaml9p shell
9P > ls
drwxrwxr-x ? root root 0 Jan 1 1970 branch
drwxrwxr-x ? root root 0 Jan 1 1970 trees
drwxrwxr-x ? root root 0 Jan 1 1970 snapshots
drwxrwxr-x ? root root 0 Jan 1 1970 remotes
9P > mkdir branch
Directory is read-only
strace
shows:
mkdir("/Database/branch", 0777) = -1 EEXIST (File exists)
from datakit.
Closing, as I don't think there's anything to fix here. Linux reports "file exists" rather than "read only" because it checks whether the directory exists before calling mkdir, and you can do that too if you want. Please reopen if you disagree.
from datakit.
Nope, I think this was probably user error ;)
The mkdir
thing I mentioned was user error - I was using the host filesystem.
Happy to help adding some docs :D
from datakit.
More docs are always welcome :-)
from datakit.
Related Issues (20)
- Invalid use of `${ROOT}` HOT 2
- check version
- Datakit using irmin store not writing to repository HOT 1
- Minor release with s/per_file/per_module/ ? HOT 3
- "git commit" seems to break the transaction interface HOT 4
- Unable to run CI example (permission denied) HOT 7
- Unable to run DataKit Local-Git bridge HOT 2
- Unix.ENAMETOOLONG when using datakit-bridge-local-git HOT 3
- Unix.EROFS while running self-ci locally HOT 8
- DataKitCI: configure docker run HOT 5
- CI: Rebuilding a job doesn't cancel its childen jobs HOT 5
- Can't create new live log on branch HOT 13
- Assert_failure ci/src/cI_monitored_pool.ml:44:2 HOT 5
- CI: local-bridge does not rebuild on new commit HOT 3
- CI: local state repo HOT 2
- CI: unable to use Git.run HOT 2
- Datakit-CI is rebuilding PR on title edit HOT 3
- Irmin.merge_head: conflict, retrying (223684) (100% CPU) HOT 10
- Irmin 2.0.0
- datakit-client is not compatible with result 1.5 on OCaml 4.08+
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 datakit.