Commit Graph

1146 Commits

Author SHA1 Message Date
John Mulligan 0f29fdd510 micro-osd.sh: fix rgw connecting to mon without cephx
See also:
* https://tracker.ceph.com/issues/52103
* https://github.com/ceph/ceph/pull/42718

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
John Mulligan d01392853c micro-osd.sh: make rgw log location be consistent with every other daemon
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
John Mulligan 61826a4af5 micro-osd.sh: make shellcheck happier
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
John Mulligan 8deb9cf778 micro-osd.sh: break script up into discrete steps
The "CEPH_FEATURES" env var can now be used to exactly control what
steps will be run. If unset the steps will be derived from the
CEPH_VERSION env var.

Best viewed by ignoring whitespace.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
John Mulligan 52bc6e9158 containers: drop apache arrow workaround
This issue should no longer be present in the base containers.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
John Mulligan 1c4990606f workflows: add quincy to test matrix
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
John Mulligan 70c7197d39 makefile: initial support for ceph quincy
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
dependabot[bot] c6e3797e24 rebase: bump github.com/aws/aws-sdk-go from 1.35.24 to 1.44.3
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.35.24 to 1.44.3.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.35.24...v1.44.3)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 18:07:14 +00:00
dependabot[bot] 69c0b04471 rebase: bump github.com/gofrs/uuid
Bumps [github.com/gofrs/uuid](https://github.com/gofrs/uuid) from 3.2.0+incompatible to 4.2.0+incompatible.
- [Release notes](https://github.com/gofrs/uuid/releases)
- [Commits](https://github.com/gofrs/uuid/compare/v3.2.0...v4.2.0)

---
updated-dependencies:
- dependency-name: github.com/gofrs/uuid
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-29 13:56:32 +00:00
Sven Anderson 05b4e70014 cutil: enable PtrGuard by default
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-04-28 14:39:48 +00:00
John Mulligan a54c6e74e3 implements: a public function's type must be exported too
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-04-28 02:50:10 +00:00
Niels de Vos f33e35ef07 github: add Dependabot for managing versions in go.mod
Dependabot can automatically create PRs for packages that have have a
new release. By depending on recent versions of the consumed packages,
the result of the OpenSSF scorecard will improve.

See-also: https://deps.dev/go/github.com%2Fceph%2Fgo-ceph/
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-04-26 14:02:55 +00:00
John Mulligan 13b27690f8 go-ceph: require a newer version of testify
The older version has some bugs fixed in newer releases. These issues
were exposed on patches not yet merged. We can take this now and
rebase those more complex patch series afterwards.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-04-22 14:39:56 +00:00
Nick Janus e1f75a459d rados: adds null oid coverage to omap related tests
Previous changes added support for operating on omap keys that include
null characters (e.g. rados_omap_get_next2,
rados_write_op_omap_rm_keys2).  This change adds some basic test
coverage those operations' null character support.

Signed-off-by: Nick Janus <github@nondesignated.com>
2022-04-21 19:27:09 +00:00
Nick Janus 52182d0103 rados: adds support for listing oids with null chars
The previous `rados_nobjects_list_open` used for listing could not
return oids that included null characters. Although this isn't a common
case, having go-ceph able to list such objects is useful for bugs such
as https://tracker.ceph.com/issues/48874.

Signed-off-by: Nick Janus <github@nondesignated.com>
2022-04-21 19:27:09 +00:00
John Mulligan f635d5d57c docs: document release processes in greater detail
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-04-21 13:07:40 +00:00
Sven Anderson 4ef3865bb3 implements: analyze all but internal packages
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-04-12 17:53:06 +00:00
Sven Anderson 8c28840637 CI: disable fail-fast in test-suite
Because of the flaky tests sometimes the non-required test cancels the required one, which makes the flaky tests even more annoying.
2022-04-12 14:03:22 +00:00
Sven Anderson 61fd94254c Update README.md for release v0.15.0 2022-04-12 09:21:28 -04:00
Sven Anderson 065210ad21 common/log: add missing api-status entries
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-04-12 12:58:05 +00:00
John Mulligan 50f803daa4 micro-osd.sh: set a location for mgr logging
I found this useful when debugging the mock nfs configuration
pool and the nfs mgr module.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-04-06 17:56:33 +00:00
John Mulligan e74d868365 nfs admin: add mock configuration for test container
Our test container does not support an orchestrator to pre configure
the ".nfs" configuration pool for us. This is something that rook and
cephadm are expected to do before exports are created, etc.
So we support creating a minimal "mock" configuration in rados.
This option can be toggled on and off via the GO_CEPH_TEST_MOCK_NFS
env var. Turning it off can be useful if you want to run the live
suite against a "real" ceph cluster.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-04-06 17:56:33 +00:00
John Mulligan ece889e721 nfs admin: add unit and functional tests for nfs export functions
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-04-06 17:56:33 +00:00
John Mulligan 2d990c43d9 nfs admin: add APIs for basic NFS export management
* Add CreateCephFSExport method
* Add RemoveExport method
* Add ListDetailedExports method
* Add ExportInfo method

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-04-06 17:56:33 +00:00
John Mulligan 02da4437ab nfs admin: add the admin type for nfs
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-04-06 17:56:33 +00:00
John Mulligan 737dee7a4d makefile: add common/admin/nfs pkg to test bins
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-04-06 17:56:33 +00:00
John Mulligan b72dfce520 nfs: add a new common/admin/nfs subpackage
This will provide APIs for managing NFS exports via the Ceph NFS manager
module.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-04-06 17:56:33 +00:00
John Mulligan c3f2bc9932 makefile: add internal/commands pkg to list of test-bins
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-04-06 17:56:33 +00:00
John Mulligan 9c113070d2 commands: add test cases for FilterBodyPrefix
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-04-06 17:56:33 +00:00
John Mulligan fd126460a0 commands: add FilterBodyPrefix method to command type
This call is used for removing "routine" responses that get sent in
the body of a response rather than the status. Otherwise, it is the same
as the FilterPrefix function.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-04-06 17:56:33 +00:00
Sebastian Riese 6a4d7eb0bd rgw/admin: Tests for the subuser API calls
Some unit tests for the validation and integration tests.

Signed-off-by: Sebastian Riese <sebastian.riese@cloudandheat.com>
2022-03-17 17:47:25 +00:00
Sebastian Riese 951a89174e rgw/admin: Generate API documentation for the new methods 2022-03-17 17:47:25 +00:00
Sebastian Riese 71d9de36f8 rgw/admin: Add the subuser API calls
Signed-off-by: Sebastian Riese <sebastian.riese@cloudandheat.com>
2022-03-17 17:47:25 +00:00
Sebastian Riese 12d86cb849 rgw/admin: Extend the User data to parse Subuser data
THIS POTENTIALLY BREAKY DOWNSTREAM CODE (as it changes the types
of exported fields in an existing, exported struct).

The fields of the User structure representing the Subuser information
have been specified to parse this data strictly and typesafe.

The fields SwiftKeys and Subusers need the url:"-" annotation,
because otherwise url-keys in that substructure would clash with
those in the User structure.

Signed-off-by: Sebastian Riese <sebastian.riese@cloudandheat.com>
2022-03-17 17:47:25 +00:00
Sebastian Riese f8830413c0 rgw/admin: Extend the testing of buildQueryPath
Only one of the two code paths of buildQueryPath was tested so far.
This makes the test harness tight by testing the second one (where
the path already contains a query parameter).

Signed-off-by: Sebastian Riese <sebastian.riese@cloudandheat.com>
2022-03-17 17:47:25 +00:00
Sebastian Riese 1de6083536 rgw/admin: Clean up the parameter serialization
The following changes have been done:

* Up until now everything in the argument objects was serialized to
  the API calls. This was updated to restrict the serialization to
  the API call parameters that are parsed in the Ceph RGW source code.

  Parameters not yet supported by us are documented as comments.
  Note, that a superset of the documented parameters is supported.

  Documentation for the API:
  <https://docs.ceph.com/en/pacific/radosgw/adminops/>

  Link to the used source tree:
  <193895ffba/src/rgw>

  The argument parsing happens in the rgw_rest_*.cc files.

* The serialization code (valueToURLParams) has been updated to
  be more in line with other serialization methods:

  - A tag "-" causes the field to be ignored
  - Only the first item in a list of tag items is interpreted as
    name.
  - The handling of pointer and direct data types has been
    harmonized (the same rules for the names and value apply now).

* There is still room for improvement to make things more consistent:
  A pointer to a non-elementary data type will emit unexpected
  request parameters.

* Presence of required parameters is not validated by the library,
  this is left to the API.

Signed-off-by: Sebastian Riese <sebastian.riese@cloudandheat.com>
2022-03-17 17:47:25 +00:00
mergify-bot 98ec2e31d6 rgw/admin: add suport for link/unlink bucket (#646)
rgw/admin: add suport for link/unlink bucket

Signed-off-by: wanggangfeng <gfengwong@gmail.com>

* rgw/admin: add comment and update-api

Signed-off-by: wanggangfeng <gfengwong@gmail.com>

* rgw/admin: add ceph_preview

Signed-off-by: wanggangfeng <gfengwong@gmail.com>

* Merge branch 'master' into feature-645

* Merge branch 'master' into feature-645

* Merge branch 'master' into feature-645

* Merge branch 'master' into feature-645

* rgw/admin: bucketLink
1 update api doc
2 remove optional check
3 update test

Signed-off-by: wanggangfeng <gfengwong@gmail.com>

* Update rgw/admin/link_test.go

Co-authored-by: Jiffin Tony Thottan  <thottanjiffin@gmail.com>

* rgw/admin: improve parameters name

Signed-off-by: wanggangfeng <gfengwong@gmail.com>

* Merge branch 'master' into feature-645

* Merge branch 'master' into feature-645

* Merge branch 'master' into feature-645
2022-03-14 20:10:28 +00:00
Robert Vasek 3eba56ce60 rados: use rados_write_op_omap_rm_keys2()
WriteOp.RmOmapKeys now uses rados_write_op_omap_rm_keys2().

The entirety of removeOmapKeysStep struct was removed as it's not necessary for
it to own the various C-allocated values passed to
rados_write_op_omap_rm_keys2() as arguments. rados_write_op_omap_rm_keys2()
makes copies of all the string-based args [1], so it's sufficient for them to
be short lived.

[1] 2bd3dd512a/src/librados/librados_c.cc (L3888-L3902)
2022-03-09 14:02:56 +00:00
Robert Vasek 044c3733e9 rados: use rados_write_op_omap_set2()
WriteOp.SetOmap now uses rados_write_op_omap_set2().

The entirety of setOmapStep struct was removed as it's not necessary for it to
own the various C-allocated values passed to rados_write_op_omap_set2()
as arguments. rados_write_op_omap_set2() makes copies of all the string-based
args [1], so it's sufficient for them to be short lived.

[1] 2bd3dd512a/src/librados/librados_c.cc (L3852-L3871)
2022-03-09 14:02:56 +00:00
Robert Vasek 3f9bcf03cc rados: simplified GetOmapStep and ReadOp.GetOmapValues
C strings that are passed in to rados_read_op_omap_get_vals2() are copied by
the function, see [1][2] for its implementation. It's therefore not necessary for
them to be owned by GetOmapStep. It's enough to construct and destruct them
in ReadOp.GetOmapValues.

[1] 2bd3dd512a/src/librados/librados_c.cc (L4334-L4358)
[2] 2bd3dd512a/src/include/rados/librados.hpp (L572-L587)
2022-03-09 14:02:56 +00:00
Robert Vasek 8371a1377d rados: use rados_read_op_omap_get_vals_by_keys2()
ReadOp.GetOmapValuesByKeys() now uses rados_read_op_omap_get_vals_by_keys2().
2022-03-09 14:02:56 +00:00
Robert Vasek ecdb224b75 rados: use rados_omap_get_next2()
GetOmapSte.Next() and ReadOpOmapGetValsByKeysStep.Next() now use
rados_omap_get_next2().
2022-03-09 14:02:56 +00:00
Robert Vasek 74ca850366 cutil: added BufferGroup
BufferGroup is a helper structure that holds Go-allocated slices of
C-allocated strings and their respective lengths. Useful for C functions
that consume byte buffers with explicit length instead of null-terminated
strings.
2022-03-09 14:02:56 +00:00
mergify-bot a88702fb93 rados: add wrapper to set locator key on IOContext (#651)
add wrapper to set locator key on IOContext

Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>

* mark API as PREVIEW and update docs

Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>

* move new API call into own file to add preview build tag

Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>

* reset locater with nil instead of a empty string

Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>

* rename variables for naming consistency

Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>

* update release versions for new API call

Signed-off-by: Alexander Pücker <alexander.puecker@hetzner.com>
2022-03-05 15:43:02 +00:00
Sven Anderson d43f087ec4 rados: add warning logs to watcher callbacks
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-03-03 15:06:20 +00:00
John Mulligan bd0b093b7b readme: document v0.14.0 and the ceph versions it supports
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-03-01 21:54:30 +00:00
Sven Anderson 72493ed2f7 common: implement a common log package
This change adds two log packages.  One for the external go-ceph
consumers under common/log, and one for the internal use within the
go-ceph code under internal/log.  The external package exports two
functions for consumers, SetWarnf() and SetDebugf(), that set a
logger for warnings and debug messages respectively. They take a
log.Printf compatible function as argument.

The internal package exports these functions as Warnf() and Debugf(),
which can be used by the go-ceph code to log warnings and debug
messages.

Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-28 12:03:04 +00:00
Sven Anderson f6eeb68e33 contrib/implements: move into independent module
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-21 14:45:42 +00:00
Sven Anderson 397ea777b9 contrib/implements: minor meta fixes
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-21 14:45:42 +00:00
Sven Anderson 2ae01ab6bc CI: remove castxml from scripts and docs
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-02-21 14:45:42 +00:00