Git Product home page Git Product logo

Comments (11)

phlogistonjohn avatar phlogistonjohn commented on May 23, 2024 1

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.

dillaman avatar dillaman commented on May 23, 2024 1

https://tracker.ceph.com/issues/43906
https://tracker.ceph.com/issues/43907

from go-ceph.

dotnwat avatar dotnwat commented on May 23, 2024

Can you point at the function you want wrapped?

from go-ceph.

camilo-schoeningh-sociomantic avatar camilo-schoeningh-sociomantic commented on May 23, 2024

Is this what you mean ;-) https://github.com/torvalds/linux/blob/master/include/linux/ceph/libceph.h

from go-ceph.

nixpanic avatar nixpanic commented on May 23, 2024

from go-ceph.

phlogistonjohn avatar phlogistonjohn commented on May 23, 2024

@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.

Madhu-1 avatar Madhu-1 commented on May 23, 2024

@phlogistonjohn I was referring to rbd map function

rbd map foopool/bar1 --id admin --keyring /etc/ceph/ceph.client.admin.keyring

from go-ceph.

phlogistonjohn avatar phlogistonjohn commented on May 23, 2024

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.

phlogistonjohn avatar phlogistonjohn commented on May 23, 2024

For future reference function do_map in src/krbd.cc in the ceph tree.

from go-ceph.

nixpanic avatar nixpanic commented on May 23, 2024

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.

dillaman avatar dillaman commented on May 23, 2024

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?

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.