-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat/Announce capacity via the attributes #2495
feat/Announce capacity via the attributes #2495
Conversation
Let's briefly review it and then decide what we are doing with:
|
Codecov Report
@@ Coverage Diff @@
## master #2495 +/- ##
==========================================
- Coverage 29.70% 29.68% -0.03%
==========================================
Files 403 404 +1
Lines 30670 30697 +27
==========================================
Hits 9111 9111
- Misses 20794 20821 +27
Partials 765 765
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
224961c
to
99fd661
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add win-compatible code as well: https://stackoverflow.com/questions/20108520/get-amount-of-free-disk-space-using-go
cmd/neofs-node/config.go
Outdated
} | ||
} | ||
|
||
// according to API description, in GB, not GiB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then it's obviously 1024^3. We do not use iB
notation and likely won't be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so make 1 << 30
instead of 1000*1000*1000
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
Sure we can, but do we need it? We have not announced |
@roman-khimov, also, please, see the comment (in case you missed it). |
That's exactly why Windows was mentioned at all, it's not that hard to add support here. The second question is just not really a problem. |
99fd661
to
9ec51a1
Compare
bf32f1d
to
3eda9ed
Compare
3eda9ed
to
15abfb6
Compare
Conflicts. |
It is done automatically (as a sum of existing space on every file system available on the configured shards) but can be overwritten if `Capacity` attribute is provided via the application configuration. Closes nspcc-dev#602. Signed-off-by: Pavel Karpy <[email protected]>
15abfb6
to
7c54307
Compare
Unbreak peapods: 2023/09/13 18:50:36 open shard S4wpuCnzpWW7SbwhER3U1v: could not open *blobstor.BlobStor: open substorage peapod: open BoltDB instance: open /storage/peapod0.db: is a directory Call `stat()` gently instead walking up. FS mount point has to exist there in any event and we should have some access to it. The real problem is that #2462 (introducing Peapod) was correct on its own. And #2495 (introducing capacity) was also correct on its own. But they don't work together. Refs 7c54307. Refs c060b16. util.MkdirAllX will be removed from code in most of the cases. Signed-off-by: Roman Khimov <[email protected]>
Unbreak peapods: 2023/09/13 18:50:36 open shard S4wpuCnzpWW7SbwhER3U1v: could not open *blobstor.BlobStor: open substorage peapod: open BoltDB instance: open /storage/peapod0.db: is a directory Call `stat()` gently instead walking up. FS mount point has to exist there in any event and we should have some access to it. The real problem is that #2462 (introducing Peapod) was correct on its own. And #2495 (introducing capacity) was also correct on its own. But they don't work together. Refs 7c54307. Refs c060b16. util.MkdirAllX will be removed from code in most of the cases. Signed-off-by: Roman Khimov <[email protected]>
Unbreak peapods: 2023/09/13 18:50:36 open shard S4wpuCnzpWW7SbwhER3U1v: could not open *blobstor.BlobStor: open substorage peapod: open BoltDB instance: open /storage/peapod0.db: is a directory Call `stat()` gently instead walking up. FS mount point has to exist there in any event and we should have some access to it. The real problem is that #2462 (introducing Peapod) was correct on its own. And #2495 (introducing capacity) was also correct on its own. But they don't work together. Refs 7c54307. Refs c060b16. util.MkdirAllX will be removed from code in most of the cases. Signed-off-by: Roman Khimov <[email protected]>
It is done automatically (as a sum of existing space on every file system available on the configured shards) but can be overwritten if
Capacity
attribute is provided via the application configuration. Closes #602.