Comments (16)
Um, actually these are not just warnings, the list objects code doesn't work anymore on luminous (it returns rados: Operation not supported). These have to be replaced by the new versions that include the namespace.
from go-ceph.
Thank you for reporting this. I knew something like this would come along eventually. I guess we'll need to think about how to handle this general Go+C compat issue now.
My initial thought is to just now cut releases of Go and match them up with the span of Ceph versions that is compatible. I'm open to suggestions.
Another option would be to have the Go code introspect the librados version and adapt dynamically, but I'm not sure what limitations that has since presumably Go would have to link against the symbols even if they aren't being used in a newer version.
from go-ceph.
Cutting the go versions seems reasonable. I personally have had bad experiences trying to do dynamic adaption with cgo stuff because all the C symbols are in the same namespace so you cannot actually build and link against multiple versions of librados. Detecting at build time and only linking against one is no more useful than just using the correct go branch and is significantly more complex and error prone.
from go-ceph.
Thanks for the input. Also I misread your second comment above. It seems like you are saying that the methods are not just deprecated, they're not working either? :/
from go-ceph.
Yes, as of luminous those methods have been removed in librados. They just return not supported :(
from go-ceph.
This is still affecting me BTW
from go-ceph.
The rados_objects_list_*
functions can harmlessly be changed to their namespace-aware versions rados_nobjects_list_*
(which exist in jewel), passing nil
as the namespace. It won't magically make go-ceph support namespaces, but will at least squash that warning.
The rados_read_op_omap_get_vals
function needs to be replaced by rados_read_op_omap_get_vals2
, which takes an additional flag-pointer to indicate if there are more values to fetch. This function doesn't exist in the jewel API, so it's going to need some conditional compilation.
These issues appear to have been addressed by hangzws#2 (albeit jewel support effectively dropped).
from go-ceph.
Is the code in @hangzws's fork going to be merged back here? Given that this is completely broken for luminous now, I am going to PR the nobjects
functions first. It appears the deprecated omap function is still implemented so apart from the warning it will still work.
from go-ceph.
my ceph version is 12.2.2, I use the lastest go-ceph to operator ceph, i get the follow deprecation warning:
github.com/ceph/go-ceph/rados cgo-gcc-prolog: In function ‘_cgo_ee59cd06be73_Cfunc_rados_read_op_omap_get_vals’: cgo-gcc-prolog:498:2: warning: ‘rados_read_op_omap_get_vals’ is deprecated [-Wdeprecated-declarations] In file included from ../../github.com/ceph/go-ceph/rados/ioctx.go:6:0: /usr/include/rados/librados.h:3272:21: note: declared here CEPH_RADOS_API void rados_read_op_omap_get_vals(rados_read_op_t read_op
please re-check the lastest go-ceph work wall.Thx
my librados version is 12.2.2
from go-ceph.
@cloudislife that warning is harmless, it works well. It is quite difficult to fix that without losing jewel support.
from go-ceph.
@immesys thanks for your replay! Yes,it is, it's harmless and work well!
from go-ceph.
Hello everyone, this problem can't compile ceph_exporter, how should I solve it?
from go-ceph.
Hello everyone, this problem can't compile ceph_exporter, how should I solve it?
@lnsyyj Met the same issue, have you solved?
from go-ceph.
I have not solved it, no, but the warning does not cause any problems. You can ignore it
from go-ceph.
I'm speculating a bit here as I haven't tried any local experimentation yet, but it might make sense to move deprecated (or new) functions into files using go build constraints and provide tags to the build based on the ceph release codename (for example).
from go-ceph.
This is something worth investigating. It's been a while but I remember there being some complications because the code in question is in C
from go-ceph.
Related Issues (20)
- Question : MountWithRoot() mounts any directory HOT 6
- rbd: mirror_peer_site.go exposes C type `time_t` to public api HOT 2
- How to call OSD BLACKLIST? HOT 4
- Failed to list images in trash blocks PV cleanup HOT 1
- Mismatched struct Policy vs Bucket in https://github.com/ceph/go-ceph/blob/master/rgw/admin/bucket.go HOT 4
- in-file option not recognized HOT 3
- APIs pending stability updates in v0.23.0
- Support crush manager HOT 4
- Add timeout to Ceph GET API calls HOT 2
- 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
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.