Comments (11)
I believe the desire is to move ceph-csi to native Go function calls where possible. The hope is to have simpler and more efficient interactions with ceph without the costs of fork-and-exec'ing the cli tools. So for this case the function calls would be used to map the rbd devices to the local kernel. @Madhu-1 and @nixpanic please correct me if I am wrong about the motivation.
from go-ceph.
https://tracker.ceph.com/issues/43906
https://tracker.ceph.com/issues/43907
from go-ceph.
Can you point at the function you want wrapped?
from go-ceph.
Is this what you mean ;-) https://github.com/torvalds/linux/blob/master/include/linux/ceph/libceph.h
from go-ceph.
from go-ceph.
@Madhu-1 can you please follow up with clarification on what functionality you are asking for. I feel that the other contributors to this thread have been helpful but we've been kinda guessing at the request.
If you have a specific function in either the librbd/librados/etc please either link to it or spell out the function name, if the functionality is part of one of the ceph cli tools but you don't know the exact implementation that's ok too, just spell out what cli is being used and we can do a little additional research. If as nixpanic suggests this is a feature that's not exported by the libs we can make a feature request in ceph and then link it here to monitor for a future ceph release.
If we can't do any of the above I'd suggest we close this request.
from go-ceph.
@phlogistonjohn I was referring to rbd map
function
rbd map foopool/bar1 --id admin --keyring /etc/ceph/ceph.client.admin.keyring
from go-ceph.
Thanks!
It appears that rbd map ...
is an alias for rbd device map ...
and this code, as suspected, does not interact with the librbd apis. I traced thru some of the code and it appears that at its core this is primarily loading the krbd module and then interacting with udev and sysfs files (such as /sys/bus/rbd/add_single_major).
It might be interesting to have native go code that mimics the behavior of the C++ code for interacting with the kernel module but for now I think we should focus on wrapping the C apis in librbd (etc).
We can leave this open to consider an additional helper package(s) that would interact with the system.
from go-ceph.
For future reference function do_map
in src/krbd.cc in the ceph tree.
from go-ceph.
I do not like duplicating the work done in the rbd
command. There are also options for krbd and ndb-rbd, so it would be required to (re)implement both ways.
@dillaman is it reasonable to request rbd_map()
and rbd_unmap()
functions for librbd?
from go-ceph.
I do not like duplicating the work done in the
rbd
command. There are also options for krbd and ndb-rbd, so it would be required to (re)implement both ways.@dillaman is it reasonable to request
rbd_map()
andrbd_unmap()
functions for librbd?
I think it would be reasonable to add rbd_kernel_map
and rbd_kernel_unmap
to the librbd API, but what is this trying to solve?
For nbd
, we would first need to solve the issue of moving it to a single, stand-alone daemon and then we could add librbd API methods to interact with it.
from go-ceph.
Related Issues (20)
- Missing rbd API components: function peer_site_remove HOT 2
- macos m1pro fatal error: 'rados/librados.h' file not found HOT 12
- Image corruption when doing Copy(...) HOT 1
- Potential memory leak on rbd image copy HOT 6
- CI job 'check' emits a warning about go.mod
- rgw: Empty usage problem HOT 3
- TestPingMonitor crashes HOT 6
- Enhance `GetPoolStats()` Method to Include `Num_bytes_available` Field in `PoolStat` HOT 2
- APIs pending stability updates in v0.24.0
- Support bucket scope quota HOT 4
- Add support for rbd_resize2
- Implement subvolume quiesce API HOT 4
- Need squid branch support
- Pacific CI jobs are failing with package dependencies HOT 5
- Should `Resize()` after `EncryptionLoad()` account for the encryption header space? HOT 7
- Quiesce test failing for pre-squid HOT 2
- TestCloneSubVolumeSnapshot failing on ceph main branch HOT 2
- APIs pending stability updates in v0.27.0
- APIs pending stability updates in v0.28.0
- TestRadosGWTestSuite/TestUserBucket is consistently failing in CI HOT 5
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-ceph.