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)
- NFSAdmin CreateCephFSExport API consistently failing in CI(main) HOT 4
- CentOS 7(EOL): CI jobs are failing on `nautilus`
- Update readme to reflect nautilus removal
- Missing rbd API components: function rbd_list HOT 1
- Rados Striping API Support HOT 6
- Ceph RBD rollback image HOT 4
- use the `client ls` command get client list filter param useless HOT 5
- 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 4
- 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
- API call to set image QoS HOT 2
- CI failures with pre-reef and main jobs HOT 1
- APIs pending stability updates in v0.29.0
- Build error on ioctx_octopus.go even will using -tags 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-ceph.