Commit Graph

177 Commits

Author SHA1 Message Date
Daniel Swarbrick
340e124452 Convert RBD feature flags to constants with iota 2018-09-14 16:38:01 +02:00
Noah Watkins
b2d948844f
Merge pull request #60 from ceph/ci-update
ci: update to luminous and dockerized setup
2018-07-07 13:21:27 -07:00
Noah Watkins
19a37c4565 ci: update to luminous and dockerized setup
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-07-07 13:20:41 -07:00
Noah Watkins
e57e53d585
Merge pull request #31 from Vicente-Cheng/minor-fixed-rbd-go
rbd: the length of args on create_v3 should be 3 instead of 2
2018-07-07 12:26:02 -07:00
Noah Watkins
8b9635ff29
Merge pull request #51 from nanjekyejoannah/add_go_vet
Add go vet to Travis
2018-07-07 11:12:38 -07:00
Noah Watkins
3b3b73fc99
Merge pull request #52 from immesys/improve-namespaces
Improve namespace support
2018-07-07 10:41:28 -07:00
Noah Watkins
6dc4192325
Merge pull request #59 from wtsi-hgi/fix-58-write-empty-object-panic
fix panic when writing empty objects
2018-07-07 10:40:26 -07:00
Joshua C. Randall
3c08133264 fix panic when writing empty objects
fixes #58
2018-06-29 14:49:12 +00:00
Michael Andersen
59cdfdc5a4 rados: improve support for namespaces 2018-02-03 10:59:54 -08:00
Joannah Nanjekye
35ee127486 Add go vet to Travis 2018-01-30 21:12:42 +03:00
Noah Watkins
bd5bc6d4cb
Merge pull request #48 from immesys/master
Get luminous working
2018-01-04 14:54:52 -06:00
Kefu Chai
2d7cf82ea7
Merge pull request #46 from tchaikov/wip-osx
ioctx: compiles on osx
2018-01-01 17:03:11 +08:00
Michael Andersen
a97ce4a032 ioctx: replace functions unimplemented on luminous 2017-12-30 09:35:26 -08:00
Kefu Chai
9db9a99b59 ioctx: compiles on osx
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2017-10-17 19:44:47 +08:00
Noah Watkins
81e4191e13 Merge pull request #41 from damz/pr/rados-lock
Fix bogus duration handling in IOContext.Lock*

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2017-07-28 07:40:07 -07:00
Damien Tournoud
03facd6d90 Fix bogus duration handling in IOContext.Lock*
Signed-off-by: Damien Tournoud <damien@platform.sh>
2017-07-28 16:32:25 +02:00
Noah Watkins
25b1a318b3 doc: update readme
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2017-01-20 09:47:55 -08:00
Noah Watkins
616140cd3c Merge pull request #36 from immesys/test-omap-enoent
Add test for ENOENT for omap

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2017-01-20 09:38:21 -08:00
Noah Watkins
022d69c468 ioctx: check high-level error first
the problem was that the C-API was returning an error, but the error
pointer (from the op) was getting -EIO. That makes sense as the outer
error was resulting in junk being decode somewhere.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2017-01-20 09:36:07 -08:00
Michael Andersen
f40720f238 Add test for ENOENT for omap 2017-01-12 17:49:01 -08:00
Noah Watkins
a1c7418732 doc: fix travis link
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2017-01-12 15:23:11 -08:00
Noah Watkins
2f760b2b4d Merge pull request #34 from ceph/ci
Ci

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2017-01-12 15:22:23 -08:00
Noah Watkins
3b0e26e76e ci: set mon allow pool delete
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2017-01-12 15:19:14 -08:00
Noah Watkins
fd5c141175 ci: fixup ci for jewel and kraken
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2017-01-12 15:16:34 -08:00
Vicente Cheng
d6ed102905 rbd: add test cases about create image for rbd_create, rbd_create2, rbd_create3
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
2016-12-23 00:24:13 +08:00
Vicente Cheng
19439f3958 rbd: the length of args on create_v3 should be 3 instead of 2
Signed-off-by: Vicente Cheng <freeze.bilsted@gmail.com>
2016-12-20 19:24:31 +08:00
Noah Watkins
dba6a108d6 Merge pull request #30 from codenrhoden/update_go_and_ceph_version
Update Dockerfile to Go 1.7.1 and Ceph Jewel
2016-10-04 15:19:48 -07:00
Travis Rhoden
aefb922d5d Update Dockerfile to Go 1.7.1 and Ceph Jewel
This moves Go to 1.7.1, using Debian Jessie
Uses Ceph Jewel instead of Hammer
Uses download.ceph.com

Debian Jessie does not have `uuidgen` command by default, so
also needed to install uuid-runtime.

Signed-off-by: Travis Rhoden <trhoden@gmail.com>
2016-10-04 15:00:34 -07:00
Noah Watkins
c400c94a36 Merge pull request #29 from immesys/add-locks-rebased
rados: add support for object locking + test
2016-08-03 16:47:14 -07:00
Emmet Cassidy
628bae93d1 rados: add support for object locking + test 2016-08-03 15:50:34 -07:00
Noah Watkins
b900b94822 Merge pull request #25 from quantum/mon-command-inbuf
Add support for mon_command input buffer
2016-07-22 08:19:10 -07:00
Jared Watts
c08104a20f Add support for mon_command input buffer 2016-07-21 13:07:30 -07:00
Noah Watkins
1cbeb759e2 Merge pull request #22 from david-z/wip-fix-list-lockers-crash
Fix rbd list lockers crashing
2016-05-20 07:34:18 -07:00
Noah Watkins
62e94854a4 Merge pull request #19 from abligh/fix-read-at-write-at-race
Replace ReadAt and WriteAt with thread-safe versions
2016-05-20 07:34:10 -07:00
Noah Watkins
e42fd909d4 Merge pull request #17 from ralfonso/ralfonso/list-children-fix
continue after -ERANGE in retval of rbd_list_children
2016-05-20 07:29:19 -07:00
Zhi Zhang
b68bd88243 Fix rbd list lockers crashing
Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
2016-05-20 17:26:29 +08:00
Alex Bligh
38c3c12b50 Replace ReadAt and WriteAt with thread-safe versions
ReadAt and WriteAt should not rely on image.offset as this
prevents the from working in a thread-safe manner.

Signed-off-by: Alex Bligh <alex@alex.org.uk>
2016-04-29 14:36:01 +01:00
Ryan Roemmich
777d9c72ab continue after -ERANGE in retval of rbd_list_children. fix out of range on zero children 2016-04-05 10:23:09 -06:00
Noah Watkins
29d1ad9394 ioctx: fix integer cast
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2016-03-26 11:54:51 -07:00
Noah Watkins
8c0703f5e2 Merge remote-tracking branch 'origin/pr/15' 2016-03-26 11:52:02 -07:00
Noah Watkins
b6a7e80009 Merge remote-tracking branch 'origin/pr/14' 2016-03-26 11:49:28 -07:00
Noah Watkins
a82279dba8 Merge remote-tracking branch 'origin/pr/13' 2016-03-26 11:44:42 -07:00
Noah Watkins
b417966b36 Merge remote-tracking branch 'origin/pr/11' 2016-03-26 11:33:22 -07:00
Livio Soares
3d88c03e6e rados: Change RadoError Error() interface to provide meaningful string, even for non-default cases GetRadosError().
I got a "rados: ret=-22" message as part of call I made. I'm a bit rusty with my
C stderror codes, which made the error a bit unhelpful.

This commit makes this particular error come out as "rados: invalid argument",
even if we don't need to explicitly create a Rados error variable for invalid
argument case. It does so by using C.strerror().

A further change is that with this, we do not need to explicitly code
RadosErrorNotFound and RadosErrorPermissionsDenied using a different error type
thank RadosError.
2016-03-26 11:50:03 -04:00
Livio Soares
f74dc6c3c6 rados: Use GetRadosError() in lieu of RadosError() so as to guarantee the translation of error codes into rados errors where applicable.
This commit fixes the TestObjectStat() case where a non existing object name is
tested for existance.
2016-03-25 00:59:18 -04:00
Livio Soares
57195e64fe rados_test.go: Improve Stat() test for non existant object name.
The test currently fails since 'RadosErrorNotFound' is not properly returned.
2016-03-25 00:58:11 -04:00
Livio Soares
d5b49dd4ea rados_test.go: Fix import header to allow gofmt to work. 2016-03-25 00:57:23 -04:00
Livio Soares
46f5d61aba Namespace support for Pools.
This commit simply adds a SetNamespace() method to IOContext, allowing users to
perform pool operations in the context of a specific namespace.
2016-03-25 00:42:49 -04:00
Livio Soares
2d33c55c6b rados: Fix iterator memory allocation; allocating a c_entry is not necessary and performed directly by the library. 2016-03-25 00:08:28 -04:00
Livio Soares
373a3043d7 rados: Implement Iter() interface to allow incremental listing of Pools.
The current IOContext struct has a ListObjects() method that works well for
pools with a reasonable number of objects. However, for very large pools, having
finer control over the iteration may be desirable.

This commit adds a new Iter() interface for pools. It allows callers to stop
iterating at any time by issuing a iter.Close(). It also allows callers to
"Seek" into the pool list using a token object.
2016-03-24 23:18:07 -04:00