Comments (5)
Adding this should not be a problem at all. The fastest approach is to submit a pull request. But I'll put this on the todo list.
from go-ceph.
@noahdesu Can do. I do have a question though, there are a few ways of doing this, would it be preferred if somehow the existing Create
call on the go side understood how to call out to create4 based on the arguments passed and/or the function signature, or would it be preferred to introduce an entirely new Create4
call on the go side that calls out to rbd_create4
?
I could try taking cues from how librbdpy does it and submit a PR, but it'd be nice to know if there's a convention/style being followed here.
from go-ceph.
I think that adding something like Create4
would be just fine (or using some other descriptive name). IIRC Go doesn't have default parameters, so trying to create some generic interface may be more trouble than it's worth.
from go-ceph.
If the goal is to maintain a go-ceph repo that can build against any installed librados, perhaps consider setting build tags via Makefile shell commands. For example, to handle the deprecation warnings mentioned in #42, a readelf
could be executed to check for the newer, namespace-aware rados_nobjects_list_*
functions (which were available in Jewel anyway):
$ readelf -s $(ldconfig -p | grep librados | awk '{print $NF}') | grep rados_nobjects_list_open
699: 0000000000050160 614 FUNC GLOBAL DEFAULT 12 rados_nobjects_list_open
Conditionally set go build
tags, and split out the two variants of the rados_objects_list_*
and rados_nobjects_list_*
cgo wrappers into separate files containing build tags such as the following:
// +build HAVE_RADOS_NOBJECTS
and for older libraries:
// +build !HAVE_RADOS_NOBJECTS
This would work so long as something (i.e., the Makefile) would set the build tag. It may not be so convenient if the go-ceph library was simply being slurped in by go get; go build
of a client app. Perhaps it would be better to assume that the latest and greatest library was present on the system, and rely on errors being thrown by the linker, forcing the user to explicitly set a build tag.
Alternatively, just git branch and maintain a different branch for older (LTS) releases of librados. Since the Ceph client libraries are generally backwards compatible, I don't see any harm in primarily / only supporting the latest Ceph client C library.
from go-ceph.
Hello, I'm automatically closing all issues filed prior to 2018 that have not been commented on recently. If this issue is still relevant to you please reopen the issue and restart the discussion. Thank you for your understanding.
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
- 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 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.