Commit Graph

1077 Commits

Author SHA1 Message Date
John Mulligan
4cd344a2be common admin: port mgr module calls from cephfs/admin
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
John Mulligan
73bbdbfe08 common admin: add admin.go file with basic admin type
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
John Mulligan
4fa966d579 common admin: add new manager package
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-08 15:55:02 +00:00
Sven Anderson
520018f6ef rados: fix revive error
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-08 15:17:34 +00:00
Sven Anderson
3b859f8f80 cutil: fix revive error
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-08 15:17:34 +00:00
Sven Anderson
63ae1fcbde Makefile: make revive check independent of build tags
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-08 15:17:34 +00:00
Robert Vasek
4c8fb2d210 rados: implement binding for rados_{read,write}_op_assert_version
This commit implements binding for rados_read_op_assert_version
RADOS Read operation as well as rados_write_op_assert_version
RADOS Write operation.

Includes unit tests for both.

Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
2022-02-08 14:29:21 +00:00
Robert Vasek
17fbb4b3a0 rados: implement binding for rados_write_op_remove
This commit implements binding for rados_write_op_remove RADOS Write operation.
Includes a unit test.

Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
2022-02-07 23:08:33 +00:00
John Mulligan
89631a50d3 containers: disable a repo to get the ci up and going again
This issue should have been fixed in ceph-containers already but for
whatever reason we don't seem to be getting the fix.
For now, disable the apache-arrow-centos repo.

Based on: 8b4c8dc730

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-02-07 21:20:20 +00:00
Sven Anderson
b8695c037c make: always rebuild implements.json
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-01 14:39:34 +00:00
John Mulligan
c27cfe90d2 readme: note how to get supported packages on centos
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-01-25 17:29:22 +00:00
John Mulligan
805f26cc5d github: update mergify.yml to new style
Mergify has not been working for weeks as they removed support for the
deprecated style we were relying on. This is my first attempt to
update it to the new style.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-01-25 09:03:11 -05:00
Robert Vasek
937f8d8164 rados: implement binding for rados_read_op_read
This commit implements binding for rados_read_op_read RADOS Read operation.
Includes a unit test.

Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
2022-01-13 09:37:59 -05:00
John Mulligan
0e3ed2982f readme: document v0.13.0 and the ceph versions it supports
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-12-14 18:54:41 +00:00
rakeshgm
a833cd7474 rgw/admin: correct example
the function `co.GetUser()` needs -
ctx and type user not string

Signed-off-by: rakeshgm <rakeshgm@redhat.com>
2021-12-13 12:57:50 +00:00
Robert Vasek
0443277bb9 rados: implement binding for rados_write_op_cmpext
This commit implements binding for rados_write_op_cmpext RADOS Write operation.
Includes a unit test.

Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
2021-12-08 19:07:12 +00:00
John Mulligan
1d9c3f8533 cephfs admin: poll mgr to see if mirroring module is enabled
When testing the mirroing workflow, we will not explicitly check
on the mgr for the presence of the mirroring module before proceeding
with the tests. The plan is to have this cut down on test flakes.

The previous workaround also had a bug in that the 2nd sleep was in the
wrong location. Perhaps, fixing this alone would resolve the test
flakes, but this is more proper anyway.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-12-07 18:00:56 +00:00
John Mulligan
a26d4b8563 cephfs admin: add a private function for getting mgr modules
Add a function for getting the lists of enabled/disabled mgr modules
from ceph. This is private for the moment as general module management
probably shouldn't be part of cephfs admin. It's bad enough we hacked
in the functions for enabling mirroring. :-)

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-12-07 18:00:56 +00:00
Robert Vasek
20da1c607d docs: api-update typo
This commit fixes a typo in development docs:

    s/udpate/update/g

Signed-off-by: Robert Vasek <robert.vasek@cern.ch>
2021-11-30 17:07:58 +00:00
Rakshith R
7d881032a6 rbd/admin: promote ImageSpec & tasks api to stable
Promoting ImageSpec & task apis to stable so
they can be release in v0.13.0.

Signed-off-by: Rakshith R <rar@redhat.com>
2021-11-29 15:07:06 +00:00
Sven Anderson
b5c4989a88 rados: add comment about missing pinning in writeStep
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-11-15 21:47:09 +00:00
Sven Anderson
3a7f2e2896 rados: C-allocate return parameters in GetOmapStep
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-11-15 21:47:09 +00:00
Seena Fallah
bae93ac4ab rbd: export image name
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2021-11-09 02:31:09 +00:00
John Mulligan
a46d9cbd62 entrypoint: ensure implements tool is up to date
When running things by hand it's nice to reuse the same build of
implements over and over, but for the casual contributor
who may need to run implements as part of adding a new API we want to
ensure the tool being run is up-to-date with the repo.
Cleaning the binary first is a quick and dirty way of getting there.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 02:02:08 +00:00
John Mulligan
dfba5f5bb0 makefile: add a rule to clean up implements binary
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 02:02:08 +00:00
John Mulligan
a1fbaf921a docs: expand on the newer doc/comment policies in dev guide
Specifically, this provides examples of the newly standardized
methods for marking deprecated and preview as well as telling
the user how to update the api-status docs.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 02:02:08 +00:00
John Mulligan
8f19d77c68 docs: reference api-status.md from api-stability.md
Removes a long standing TODO.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 02:02:08 +00:00
John Mulligan
0f565466b2 github: add a checklist item as a reminder about api preview
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 02:02:08 +00:00
John Mulligan
5d1ec1d64f makefile: generate implements.json if not present
Add new rules to build/run the implements tool via the test container,
an only the implements tool, when apiage is to be run and the
implements.json is not present.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 02:02:08 +00:00
John Mulligan
3c874e078d makefile: add rules for managing api stability docs
The rules added to the makefile help contributors and maintainers follow
the recent api stability policy by allowing one to check the state,
update the state (using the git tags for versioning info) and update
only the generated markdown doc.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 02:02:08 +00:00
John Mulligan
fc3ffc95e4 entrypoint: support executing only implements tool
The implements tool just does static code (ast) analysis. Support
running it in the container, but on its own in the case you only
want the implements tool output.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 02:02:08 +00:00
John Mulligan
689ee58bf8 contrib: have apiage fail if no source data is available
It is kind of pointless to let the tool run if no source data is
present, so treat empty/missing source as an error.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 02:02:08 +00:00
John Mulligan
0d5ae4da1f contrib: add support for using the most recent tag for basing updates
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 02:02:08 +00:00
John Mulligan
5985d410ce rados: merge test case into standard tests file, removing luminous tag
We no longer support ceph luminous, and have not for a while. This
test case was kept separately from the others because it didn't function
correctly when tested against luminous clusters. As part of the effort
to remove the unsupported build tags, there's no longer even a reason
to keep this as it's own file with the tags removed, so merge it
together.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 01:24:01 +00:00
John Mulligan
cc9f4d6b39 rbd: remove luminous and mimic build tags
Luminous and mimic have not been supported for a few releases now.
There's no need to keep these build tags any more.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 01:24:01 +00:00
John Mulligan
e79f1d786f cephfs: remove luminous and mimic build tags
Luminous and mimic have not been supported for a few releases now.
There's no need to keep these build tags any more.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-09 01:24:01 +00:00
John Mulligan
c0852d43d0 cephfs admin: add sleeps after mgr module is enabled (workaround)
This is a workaround for the common test flake:
```
=== RUN   TestMirroring
    mirror_workflow_test.go:63:
            Error Trace:    mirror_workflow_test.go:63
            Error:          Received unexpected error:
                            rados: ret=-95, Operation not supported:
"Module 'mirroring' is not enabled (required by command 'fs snapshot
mirror enable'): use `ceph mgr module enable mirroring` to enable it"
            Test:           TestMirroring
```
at even though we've certainly requested the mode be enabled the mgr
has apparently not fully processed the request and the module is
not yet available. We add a half-second sleep after each call
to hopefully give the mgr time enough to completely enable the module.

A future improvement would be to poll the mgr until we know it is ready to
use the cephfs mirroring module, but that would take some research and
(probably) new API calls. So this is a temporary workaround just
to try and reduce the number of test flakes sooner rather than later.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-11-01 15:45:03 +00:00
Sébastien Han
e23ab127c0 rgw/admin: promote add/remove caps to stable
Promoting the API.AddUserCap and API.RemoveUserCap calls to stable so
they can be release in 0.13.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-29 12:49:23 +00:00
John Mulligan
2ef8713fc5 readme: document v0.12.0 and the ceph versions it supports
Also, change the hint regarding build tags to use "pacific" as it
a fully supported ceph version.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-10-19 13:52:10 -04:00
Sébastien Han
67c57bd965 rgw/admin: ability to retrieve user by access key
We can now get an s3 user from the rgw admin ops API with its access
key. No validation on the key is performed other than not being empty.

Closes: https://github.com/ceph/go-ceph/issues/600
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-10-18 14:28:21 +00:00
Sven Anderson
87f4563118 format: run gofmt on all files
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-10-04 18:58:35 +00:00
Sven Anderson
26fd846da1 docs: update comments of preview and deprecated APIs
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-10-04 18:58:35 +00:00
Sven Anderson
cee047149f tools: update implements tool to new deprecated/preview style
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-10-04 18:58:35 +00:00
Sven Anderson
ac4494e707 docs: use Go convention for deprectated APIs
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-10-04 18:58:35 +00:00
Sven Anderson
97630486ee contrib: implements tool prints stderr if castxml fails
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-10-04 15:49:43 +00:00
Sven Anderson
3210885d21 ptrguard: simplify pointer size assert
Signed-off-by: Sven Anderson <sven@redhat.com>
2021-10-04 06:58:23 +00:00
John Mulligan
a451da9e8e github: require explicit "no-API" label for merge on 1 review
It's too easy to forget to triage a PR with the API label, and then
if the PR looks good and is approved the mergify system will merge
it. Move to using an explicit "no-API" label for marking the PR as truly
not having API changes and not requiring a 2nd review.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-09-30 09:49:24 -04:00
John Mulligan
3fef124e9d docs: add new rbd admin functions to api-status (post rebase)
While working on this patch series new APIs were added to the rbd/admin
package. This patch includes them in the initial set of apis being
tracked.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-09-30 13:27:01 +00:00
John Mulligan
3f32efcf56 docs: add initial copies of the api-status.json & markdown doc
The file api-status.json is designed to track changes to the go-ceph
APIs, especially the 'deprecated' and 'preview' apis. It also stores
lists of stable apis so that we can see if something new but not
explicitly stable appears.

The api-status.md file is actually meant to be read by users of go-ceph
so to help make decisions about the use of new preview apis or
deprecated apis. It is generated from api-status.json.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-09-30 13:27:01 +00:00
John Mulligan
7ce34854e1 workflows: experiment with apiage check in the ci
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2021-09-30 13:27:01 +00:00