Commit Graph

1224 Commits

Author SHA1 Message Date
John Mulligan f8c4d2c5e9 revive: disable package-comments rule
A recent change in revive broke the package-comments rule when .go files
are input individually.
(see https://github.com/mgechev/revive/pull/694)

See the comment within for more info.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-08-12 05:53:33 +00:00
John Mulligan 7abe5a239a makefile: use placeholder versions for api-update rule
In order to simplify the workflow for contributors we'll continue to ask
people to run `make api-update` when contributing new APIs. This will
record the API in our api-status files. However, it will now use a
placeholder value without a real version number. If a PR is filed and
is not accepted before the next scheduled release the maintenance team
will not have to ask the contributor to update the API versions
to correct the numbers.

Instead, we need to run the new `make api-fix-versions` rule at least
once before a release to replace the placeholder versions with real
version numbers.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-08-08 10:35:43 +00:00
John Mulligan d6bf51115d contrib: add new fix-versions mode to apiage.py
Fixes: #718

This change adds a new "fix-versions" mode to apiage.py, as well as the
ability to set placeholder version values when adding a new API. The
fix-versions mode replaces placeholder versions with real version
numbers. When fixing versions, the --fix-filter-pkg & --fix-filter-func
options can be used to narrow down what APIs will be fixed in case not
all version placeholder should be fixed to the same values.

Note that the placeholders being with a '$' character and look a bit
like a shell variable. However, the text is simply a reminder - only the
'$' prefix is significant. This indicates that the field is a
placeholder.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-08-08 10:35:43 +00:00
dependabot[bot] aa0240aa56 go-ceph: bump github.com/aws/aws-sdk-go from 1.44.64 to 1.44.67
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.64 to 1.44.67.
- [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.64...v1.44.67)

---
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-08-03 14:54:48 +00:00
John Mulligan 9f22ac412d cephfs admin: remove unnecessary import C lines
All the C functions needed by cephfs/admin package come from
one of the other go-ceph packages (rados, cephfs, etc) there's
no good reason to have this unused import in these files.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-08-03 14:35:14 +00:00
Anoop C S 62b4a7323d cephfs/admin: Replace 'unstested' with pre-release tags
Now that we have support for testing APIs from pre-release Ceph
versions lets convert the current 'ceph_ci_untested' tag into
corresponding pre-release version tags.

Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-08-02 14:38:54 +00:00
Anoop C S 31b208ff55 cephfs/admin: Add 'main' to expected Ceph versions
When run against Ceph built out of 'main' development branch our
test-suite fails to find corresponding code name. Therefore we
include 'main' also to the expected list of versions.

Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-08-02 12:38:57 +00:00
Anoop C S f6c3f5e2d9 workflows: Add pre-release targets to ceph version matrix
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-08-02 12:38:57 +00:00
John Mulligan f5c9439f85 workflows: update archive action
When archiving, use the latest version of the archive action and use
it's ability to archive an entire directory.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-08-02 05:30:10 +00:00
Kharitonov Maksim Andreevich 5b42837d77 docs: Update API status 2022-08-01 18:13:46 +00:00
Kharitonov Maksim Andreevich 4ef5a9547e rgw/admin: List user's bucket support 2022-08-01 18:13:46 +00:00
Kharitonov Maksim Andreevich 3b66ca3c53 rgw/admin: Key create and delete api support 2022-08-01 18:13:46 +00:00
Kharitonov Maksim Andreevich 16df743c45 rgw/admin: Individual bucket quota support 2022-08-01 18:13:46 +00:00
Sven Anderson fde1e1b66b cephfs: add AtStatxDontSync and deprecate AtNoAttrSync
This change follows the upstream deprecation of AT_NO_ATTR_SYNC in
favor of the standard AT_STATX_DONT_SYNC.

Fixes: #741

Signed-off-by: Sven Anderson <sven@redhat.com>
2022-08-01 17:04:15 +00:00
dependabot[bot] f605c4713d go-ceph: bump github.com/aws/aws-sdk-go from 1.44.52 to 1.44.64
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.52 to 1.44.64.
- [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.52...v1.44.64)

---
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-08-01 14:09:10 +00:00
John Mulligan 70765d6189 github: update dependabot configuration to better match go-ceph style
Lower the frequency of updates. The monthly update is documented to
occur on the first of the month, which works better with our
every-other-month release cadence.
Automatically apply the "no-API" label. Do not add a rebase label, which
has not relevance to the go-ceph workflow.
Use the prefix "go-ceph:" which is what we normally use for changes only
to the go.mode, etc.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-07-28 07:45:38 +00:00
Daniel M. Lambea d7729cc9f9 doc: update API status docs
Update API status docs to reflect the new preview API calls: Alignment and RequiresAlignment

Signed-off-by: Daniel M. Lambea <dmlambea@tenerife.es>
2022-07-26 05:57:29 +00:00
Daniel M. Lambea f06baa43e5 rados: add support for retrieving the alignment (stripe size) for EC pools
Add support for getting the alignment (stripe size) in bytes for pools that require/support it.
Fixes #739

This commit adds two new API calls to IOContext, one to know if the pool requires alignment and
the second one to get the stripe size in bytes:

 RequiresAlignment() (bool, error)
 Alignment() (uint64, error)

Signed-off-by: Daniel M. Lambea <dmlambea@tenerife.es>
2022-07-26 05:57:29 +00:00
Sven Anderson fdd9853f0f go-ceph: add warn logs to finalizers.
Signed-off-by: Sven Anderson <sven@redhat.com>
2022-07-19 14:37:32 +00:00
John Mulligan f5d1adf26f makefile: add check-shell rule
The check-shell rule will use shellcheck to help ensure high quality
shell scripts.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-07-19 06:55:28 +00:00
John Mulligan 86802199f8 entrypoint: don't change the build tags variable
Don't change the build tags variable to include the -tags option at the
start. It's a bit confusing. Replace it with a function that returns
the option + the tags themselves for use on a go command line.
This fixes the remaining shellcheck errors in entrypoint.sh.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-07-19 06:55:28 +00:00
John Mulligan 8e8e24a81d entrypoint: treat pkgs as a bash array
Because the package name should be a proper "list" and is used in
multiple places, take shellcheck's warning to heart and replace it
with a proper bash array. Use a common function for generating said
array.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-07-19 06:55:28 +00:00
John Mulligan f2f2c5447b entrypoint: silence a shellcheck warning
For this one single case, it feels like overkill to use an array
or other fancy technique. Just silence shellcheck on this instance.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-07-19 06:55:28 +00:00
John Mulligan 24f02ecb2f entrypoint: quote various shell variables
Small and straightforward fixes for a bunch of items found by
shellcheck.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2022-07-19 06:55:28 +00:00
dependabot[bot] f04fac6159 rebase: bump github.com/aws/aws-sdk-go from 1.44.47 to 1.44.52
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.47 to 1.44.52.
- [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.47...v1.44.52)

---
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-07-18 14:02:58 +00:00
oneto1 57b50b3170 rgw/admin: add num_shards to bucket struct field and format code
This change add a new bucket struct field, so we can use rgw.admin.API.GetBucketInfo()
to get a bucket's num_shards.

Format bucket.go.

Signed-off-by: oneto1 <644739768@qq.com>
2022-07-18 13:40:56 +00:00
Anoop C S e5a1f5ea7e Makefile: Define pre-release tags for main dev branch
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-07-18 13:19:55 +00:00
Anoop C S 6703f3c997 Makefile: Define pre-release tags for pacific
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-07-18 13:19:55 +00:00
Anoop C S b4ef23bd6a Makefile: Define pre-release tags for quincy
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-07-18 13:19:55 +00:00
Anoop C S 5a197f13a6 Makefile: Pass BUILD_TAGS to test container image
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-07-18 13:19:55 +00:00
Anoop C S 9897bd034d entrypoint: Accept BUILD_TAGS from execution environment
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-07-18 13:19:55 +00:00
Sanford Miller 15d71fe192 rbd: add mirroring support for nautilus
The librbd API for mirroring-related operations changed substantially between
Nautilus and Octopus. Due to this, go-ceph had previously only implemented
mirroring functionality if built against Octopus client libraries. This patch
implements equivalent functionality for use with Nautilus clients.

Signed-off-by: Sanford Miller <smiller@digitalocean.com>
2022-07-13 13:00:48 +00:00
Sven Anderson a2cf1e7262 go-ceph: bump Go version of module to 1.17
Updates the Go version of the module with `go mod tidy -go 1.17`,
which also adds some explicit requirements in order to support lazy
module loading.

Signed-off-by: Sven Anderson <sven@redhat.com>
2022-07-11 16:21:44 +00:00
Anoop C S 6dad78e5af entrypoint: Store bootstrap token in variable
Following the mirroring setup there used to be a file named 'token'
holding the bootstrap token left out in sources. We could instead
provide the token via standard output and display it for any further
debugging purpose.

Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-07-10 15:06:12 +00:00
Anoop C S 0b06ef208d gitignore: Add vi/vim backup files
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-07-07 13:05:57 +00:00
Quentin Devos 5f38b5422e rados: Implement rados_set_alloc_hint2
Signed-off-by: Quentin Devos <4972091+Okhoshi@users.noreply.github.com>
2022-07-06 17:56:39 +00:00
dependabot[bot] 89899b3833 rebase: bump github.com/aws/aws-sdk-go from 1.44.43 to 1.44.47
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.43 to 1.44.47.
- [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.43...v1.44.47)

---
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-07-05 14:13:01 +00:00
Joshua Baergen 9e340d1e4e rados: Make sure Conn isn't GC'd while it has dependant IOContexts.
Because we have a finalizer configured for Conn that cleans up Ceph
resources, it's important that we don't let it get GC'd before anything
that depends on it has been cleaned up. Since clients are free to hold a
reference to an IOContext without maintaining a reference to the
underlying Conn, we hold such a Conn reference within the IOContext to
signal this dependency to the Go GC.

Signed-off-by: Joshua Baergen <jbaergen@digitalocean.com>
2022-07-01 15:30:18 +00:00
Anoop C S 1589706287 Makefile: Use ?= for initial variable definitions
:= is not capable of accepting values(for variables) from execution
environment. Therefore replace := with ?= for completeness.

Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-06-30 18:20:09 +00:00
Sven Anderson d647433121 CI: remove non-ptrguard tests
We will (most probably) remove non-ptrguard code before the next
release. Let's skip the tests already now, because they double the
likelihood of failing flaky tests.

Signed-off-by: Sven Anderson <sven@redhat.com>
2022-06-30 17:45:00 +00:00
Sven Anderson 517434f084 Add MacOS instructions to README
This is a replacement for #540.
2022-06-30 13:01:11 +00:00
Anoop C S db3a21808f cephfs/admin: Fix compile errors
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-06-30 08:58:01 +00:00
dependabot[bot] ee6bb0e6d1 rebase: bump github.com/stretchr/testify from 1.7.2 to 1.8.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.2 to 1.8.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.2...v1.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-30 08:13:23 +00:00
dependabot[bot] 18b5a072b9 rebase: bump github.com/aws/aws-sdk-go from 1.44.28 to 1.44.43
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.28 to 1.44.43.
- [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.28...v1.44.43)

---
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-30 07:39:46 +00:00
Sven Anderson 6c459dc039 CI: also disable TestCancelClone for pacific
The code causing this issue has been packported to pacific and blocks
the CI. We need to temporarily disable for pacific as well.

Signed-off-by: Sven Anderson <sven@redhat.com>
2022-06-29 13:57:41 +00:00
Anoop C S 146ee24547 Dockerfile: Remove an unused CEPH_TAG env variable
Ceph version is already available from CEPH_VERSION env variable.
CEPH_TAG on the other hand is only defined to determine the tag for
ceph base image and seems to be unused in the resulting go-ceph
container image.

Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-06-28 12:54:48 +00:00
riya-singhal31 eb651c28a4 fix: fixed few typos
Signed-off-by: riya-singhal31 <rsinghal@redhat.com>
2022-06-27 13:21:51 -04:00
Anoop C S 38862c0c7a makefile: use "pacific" as our default ceph version
"quincy" is already out which will then make "octopus" EOL very soon.
Therefore default to "pacific" instead.

Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2022-06-24 16:01:11 +00:00
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