Commit Graph

206 Commits

Author SHA1 Message Date
Daniel Swarbrick
951118e855
Drop unnecessary typecasts
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2018-09-18 11:12:32 +02:00
Daniel Swarbrick
3023eb281d
Go style cleanups
- Use C errno constants in place of hardcoded ints
- Use type inference where possible (especially C.CString
- Don't explicitly specify zero values where value would be default anway
- Rewrap some unnecessarily wrapped short lines
- Use if/else one-liners where value is not needed afterwards

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2018-09-18 11:03:41 +02:00
Noah Watkins
c521b5aa72
Merge pull request #67 from ceph/ci-go-fmt
Ci go fmt
2018-09-17 16:06:29 -07:00
Noah Watkins
208695a8c1 fmt: apply gofmt updates
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-09-17 15:57:31 -07:00
Noah Watkins
6107372c34 ci: check go formatting
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-09-17 15:41:24 -07:00
Noah Watkins
fd4036e498
Merge pull request #66 from dswarbrick/trash-wrappers
Implement wrappers around rbd_trash_* functions
2018-09-17 15:28:21 -07:00
Daniel Swarbrick
bdc1c100fe
Force trash remove to override deferment time
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2018-09-17 23:33:23 +02:00
Daniel Swarbrick
837181cb94
Add unit test for rbd_trash functionality
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2018-09-17 23:07:18 +02:00
Daniel Swarbrick
4a88b5da12
Implement wrappers around rbd_trash_* functions
Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
2018-09-17 20:46:23 +02:00
Noah Watkins
28db807c97
Merge pull request #65 from ceph/connected-state
Connected state
2018-09-14 15:10:35 -07:00
Noah Watkins
4e815e9872
Merge pull request #64 from dswarbrick/feature-consts
Convert RBD feature flags to constants with iota
2018-09-14 15:10:05 -07:00
Daniel Swarbrick
9d12f2ecd1
Merge branch 'master' into feature-consts 2018-09-14 23:53:47 +02:00
Daniel Swarbrick
1623e77d20
Wrap feature macros from rbd/features.h 2018-09-14 23:52:24 +02:00
Noah Watkins
fe9a93bb73 rados: migrate remaining tests to suite interface
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-09-14 14:35:45 -07:00
Noah Watkins
818e026b20 rados: grab all namespace prefix from C header
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-09-14 14:34:51 -07:00
Noah Watkins
5074481957 fmt: fix formatting
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-09-14 14:34:33 -07:00
Daniel Swarbrick
3a8c38ca41 Add RBD feature flag sets as per Python rbd module 2018-09-14 16:59:08 +02:00
Noah Watkins
92db4f867c
Merge pull request #63 from dswarbrick/fix-snapshot-unopened-parent
Check that parent image is open before attempting snapshot operations
2018-09-14 07:55:28 -07:00
Daniel Swarbrick
340e124452 Convert RBD feature flags to constants with iota 2018-09-14 16:38:01 +02:00
Daniel Swarbrick
df4109f4b7 Check that parent image has been opened before attempting snapshot operations 2018-09-14 16:02:11 +02:00
Noah Watkins
a1c3394414 test: convert more tests to use suite
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-08-22 10:58:45 -07:00
Noah Watkins
fad63ff1f9 test: convert more tests to use suite
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-08-17 11:51:36 -07:00
Noah Watkins
7b5a27ca9a rados: refactor tests to use testing suite
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-08-09 07:34:43 -07:00
Noah Watkins
3dd9a8e5d4 ci: build and run tests with luminous/mimic
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-08-09 07:34:43 -07:00
Noah Watkins
96b41ea93e ci: change mon id in micro-osd script
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-08-07 18:48:28 -07:00
Noah Watkins
b389ed391c ci: update golang in ci
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-08-07 18:48:28 -07:00
Noah Watkins
6363bf77ae rados: use test suite to share code
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-08-07 18:48:17 -07:00
Noah Watkins
0a30725b59 ioctx: do not short-circuit read for empty slice
ioctx.read should contact the cluster even when its slice is empty so
that errors like ENOENT can be reported.

Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-08-07 18:48:17 -07:00
Noah Watkins
c14a3857fa rados: add a connected flag to the conn obj
Signed-off-by: Noah Watkins <nwatkins@redhat.com>
2018-07-28 14:23:18 -07:00
Noah Watkins
3b687cfa99 doc: add note about vstart.sh setup
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2018-07-28 10:08:19 -07: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