Commit Graph

1226 Commits

Author SHA1 Message Date
Sanford Miller 133e675c8d rbd: refactor GetImageNames to use a for loop instead of recursion
This is done because using a for loop is more idiomatic in Go code.

Signed-off-by: Sanford Miller <smiller@digitalocean.com>
2022-06-14 16:33:29 +00:00
Sanford Miller 36d5c4498e rbd: don't cap the buffer size used in GetImageNames
This removes the limit on the max buffer size GetImageNames is willing to pass
to rbd_list2, which is somewhat arbitrary and is too small for large clusters.
GetImageNames will continue to start with a small buffer size and retry with a
larger buffer if rbd_list2 returns ERANGE (just without a cap on the max buffer
size it's willing to go to).

Signed-off-by: Sanford Miller <smiller@digitalocean.com>
2022-06-14 16:33:29 +00:00
John Mulligan 863d71caa5 rados: various readop & writeop apis are now stable
These apis are now stable as per the stability plan.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-06-14 16:01:43 +00:00
John Mulligan ec0b9a1455 rados: watcher apis are now stable
Watcher apis are now stable as per the stability plan.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-06-14 16:01:43 +00:00
John Mulligan 096745e86b readme: note v0.16.0 has preliminary quincy support
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-06-14 13:41:11 +00:00
John Mulligan d31582cf06 cephfs admin: remove deprecated EnableModule, DisableModule funcs
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-06-14 13:10:09 +00:00
John Mulligan 0722af5375 rbd admin: enable TestMirrorSnapshotScheduleStatus on quincy
The issue has (probably) been fixed in ceph v17.2.0 images.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-06-14 12:39:59 +00:00
Prasanna Kumar Kalever ec40a6c6c3 cephfs: add subvolume snapshot metadata APIs
Exports below APIs:
SetSnapshotMetadata(),
GetSnapshotMetadata(),
RemoveSnapshotMetadata(),
ForceRemoveSnapshotMetadata() and
ListSnapshotMetadata()

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2022-06-13 15:16:36 +00:00
Prasanna Kumar Kalever 7d224905ca cephfs: add subvolume metadata APIs
Exports below APIs:
SetMetadata(),
GetMetadata(),
RemoveMetadata(),
ForceRemoveMetadata() and
ListMetadata()

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2022-06-13 10:44:05 -04:00
Niels de Vos e8c006b3af cephfs/admin: add CloneStatus.GetFailure()
In case cloning failed, Ceph Mgr returns an additional attribute in the
response. The "failed" attribute contains an errno (as string?!) and a
description. It is useful for applications using go-ceph to report the
error back to the user.

As the CloneStatus is on the same level as the CloneFailure object in
the response, keeping strictly to the CephFS Mgr API would break
compatibility. Instead, a new CloneStatus.GetFailure() method has been
introduced, returning a CloneFailure type (or nil) object with details
about the failure.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
2022-06-09 19:47:04 +00:00
John Mulligan 9ac8b86285 docs: add API statuses for nfs admin api
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-06-09 16:24:31 +00:00
John Mulligan af64f12c62 nfs admin: remove untested build tag
The latest ceph pacific should include the mgr changes needed to test
the NFS apis. We should be able to treat nfs like a normal preview api.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-06-09 16:24:31 +00:00
dependabot[bot] a12919353c rebase: bump github.com/stretchr/testify from 1.7.1 to 1.7.2
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-09 14:35:27 +00:00
dependabot[bot] 8d2970ff5a rebase: bump github.com/aws/aws-sdk-go from 1.44.24 to 1.44.28
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.24 to 1.44.28.
- [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.44.24...v1.44.28)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-09 14:05:18 +00:00
Sven Anderson f4fb583252 docs: remove all PREVIEW comments
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-06-06 14:42:04 +00:00
Sven Anderson 9f55b65d17 docs: replace references to PREVIEW comment
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-06-06 14:42:04 +00:00
Sven Anderson 423c7ca899 implements: use ceph_preview tag instead of PREVIEW comment
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-06-06 14:42:04 +00:00
dependabot[bot] 40f3799e02 rebase: bump github.com/aws/aws-sdk-go from 1.44.10 to 1.44.24
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.10 to 1.44.24.
- [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.44.10...v1.44.24)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-06 14:07:16 +00:00
Sven Anderson 005aa73667 rgw/admin: fix tests for quincy
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-05-19 14:09:21 +00:00
Sanford Miller 68ebb0520a rbd: expose rbd_snap_rename to Go clients
This implements the following method:
	(snapshot *Snapshot) Rename(destName string) error

Signed-off-by: Sanford Miller <smiller@digitalocean.com>
2022-05-17 14:40:07 +00:00
dependabot[bot] fc91a0661f rebase: bump github.com/aws/aws-sdk-go from 1.44.5 to 1.44.10
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.5 to 1.44.10.
- [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.44.5...v1.44.10)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-13 13:58:54 +00:00
John Mulligan 40f1fa47d9 containers: update the go version used in the CI container
The Go 1.18 release was done in march 2022 and so we should
continue to use the older of the two supported releases which
is now Go 1.17.x.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-11 16:05:23 +00:00
dependabot[bot] e48b72c98e rebase: bump github.com/aws/aws-sdk-go from 1.44.3 to 1.44.5
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.3 to 1.44.5.
- [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.44.3...v1.44.5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-09 18:01:44 +00:00
John Mulligan 57bbe83bef rgw admin: disable TestBucket on qunicy
Mysteriously fails without a useful error.  Will need to be properly
debugged later.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
John Mulligan 68eff5d9e4 rbd admin: disable TestMirrorSnapshotScheduleStatus on qunicy
Will need to be properly debugged later.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
John Mulligan e0369cdf88 cephfs admin: disable test TestCancelClone on quincy
This test feels very flaky, only passing 2-3 times out of ten (by
my vague guesstimate). This needs investigation.
However I don't want to block all of CI against quincy for this this
now.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
John Mulligan 37ba163aae makefile: allow testing with unreleased quincy containers
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
John Mulligan 13bdb3e26c cephfs admin: remove explicit subvol delete from snap retention test
On ceph quincy, removing the subvolume explicitly (even with --force)
triggered an error. Due to the discussion in
https://tracker.ceph.com/issues/54625
I was informed that the explicit delete was not necessary, and while
the error on quincy was not correct, even on previous versions the
call is basically a no-op.

Rather than wait for this to be changed back to a no-op on quincy,
we remove the unneeded call. While we're at it, change the polling
loop to use the assert lib's Eventually call which is much nicer
to read and expires based on a duration avoiding the need to
think about loop iterations. :-)

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
John Mulligan ae44f69791 cephfs admin: flexibly decode the MDSVersion field in volume status
It appears the JSON being returned from `ceph fs status` has changed.
The field returning the mds version was previously "just" a string.
Now its a more complex thing. This of course breaks the old version
of the go code which is statically typed to expect a string.

In order not to break backwards compatibility we replace the object
used for parsing the JSON with a private object that has a custom
unmarshaller function for the mds version field. If it sees the string
it uses the string. Otherwise, it looks for this new structure and,
if possible, extracts the version string from the first item.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
John Mulligan ac1401b4e2 cephfs admin: add quincy to valid server editions
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-05-02 14:14:25 +00:00
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