**Description:**
Added the uid member to the usage type.
We don't need to handle the uid here, as the ceph funtion handles it in the backend.
Fixes: #758
Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
Add unit and simplistic functional tests for new JSON/status description
extraction functions. Because these are preview functions we also add a
stub file to add a no-op function to be built on non-preview builds.
This avoids having to reimplement large parts of the existing mirroring
tests just to validate this small aspect of the SiteMirrorImageStatus
struct.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add UnmarshalDescriptionJSON method to SiteMirrorImageStatus
Add DescriptionReplayStatus method to SiteMirrorImageStatus
Both these functions are meant to help extract the JSON object that is
some times appended to the Description field in the
SiteMirrorImageStatus struct. I have only seen the JSON appear after
"replaying, " but there's little docs for this and I skimmed to code to
even find out what fields the JSON might include. As such, the
UnmarshalDescriptionJSON tries to unmarshal the appended JSON into an
object the caller provides in case skimming the code was insufficient or
the caller has other needs. For most cases, DescriptionReplayStatus can
be used to parse the JSON into a struct containing known fields.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Previously, commit 102616b158 tried to
expose GOPROXY env var from developer environment by specifying it as
environment variable or build argument to container build process. But
using --build-arg to container build command would require the same to
be referenced inside Dockerfile/Containerfile so that the following
warning can be avoided:
[Warning] one or more build args were not consumed: [GOPROXY]
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
This bumps the Go version of the test container to 1.19.5, which is
the oldest supported Go version as of now.
The go.mod file (including an upgrade of its dependencies) and the
revive environment is bumped to 1.19 as well.
Signed-off-by: Sven Anderson <sven@redhat.com>
This change executes `make api-fix-versions` in order to convert the
placeholder versions into real version numbers.
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
As noted in the status on github:
```
The configuration uses the deprecated rebase_fallback attribute of the
queue action.
A brownout is planned on February 13th, 2023.
This option will be removed on March 13th, 2023.
For more information: https://docs.mergify.com/actions/queue/
```
Therefore we'll simply drop this attribute.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
If the ceph cluster we're testing against supports more then one
fs our tests shouldn't fail. Update the tests to ensure a cephfs
exists as expected but don't assume it's the only one (or that
it's the first one returned).
Signed-off-by: John Mulligan <jmulligan@redhat.com>
These tests are all scoped within a test function that will only run if
the alternate fs name is supplied through the environment. This way the
tests can be run by hand on older versions if need be.
The tests verify the use of the SelectFilesystem function and that the
file systems are distinct namespaces.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add SelectFileystem implementing ceph_select_filesystem which can be
used to select a cephfs by name, prior to calling mount, when the ceph
cluster hosts more than one cephfs file system.
Fixes: #262Fixes: #818
Original-Version-By: "Arvid E. Picciani" <arvid@kraud.cloud>
Original-PR-URL: https://github.com/ceph/go-ceph/pull/819
Signed-off-by: John Mulligan <jmulligan@redhat.com>
With micro-osd.sh supporting a 2nd alternate fs we add basic support to
entrypoint.sh to help the tests find and use that alternate fs.
The command line option is flexible, you can supply it with a literal fs
name or, when prefixed with an `@`, it will read the name from a file.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add a function to bring up a 2nd cephfs file system. Execute it on
ceph versions pacific and later.
While the API exists on nautilus and octopus those versions are already
deprecated in go-ceph. Additionally, the ceph docs for "multifs" state,
"Beginning with the Pacific release, multiple file system support is
stable and ready to use." [1] Therefore we won't bother running our test
automation on anything earlier.
1 - https://docs.ceph.com/en/latest/cephfs/multifs/#multiple-ceph-file-systems
Signed-off-by: John Mulligan <jmulligan@redhat.com>
The linebreaks within the 2 bottom paragraphs look fine in an editor
such as vim, but look odd when viewed as part of the PR on github.
Improve the visuals and make it more readable in the github UI by
removing linebreaks.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Fixes: #815
When updates to the NFS mgr API were recently merged on Ceph main branch
the go-ceph test started failing. This occurred because go-ceph was
unintentionally relying on invalid JSON (an empty string) returned from
the API call for an invalid export pseudo path. On ceph main it now
returns an empty JSON object. This change treats both empty string
and empty JSON object as an error explicitly.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Use the GOARCH variable to define to proper version of go binaries to
download. Without this, the end result image can not run properly on
local host machine.
Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Pass GOARCH as explicit argument when building container image. Use
local host machine to define desired architecture.
Signed-off-by: Shachar Sharon <ssharon@redhat.com>
Following APIs are being added as preview APIs:
FSAdmin.GetMetadata
FSAdmin.SetMetadata
FSAdmin.RemoveMetadata
FSAdmin.ForceRemoveMetadata
FSAdmin.ListMetadata
FSAdmin.GetSnapshotMetadata
FSAdmin.SetSnapshotMetadata
FSAdmin.RemoveSnapshotMetadata
FSAdmin.ForceRemoveSnapshotMetadata
FSAdmin.ListSnapshotMetadata
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
As of d6bf51115d we've tried to make API
stability less burdensome on contributors by putting in placeholder
values in the status files. However, we haven't used it much yet. This
change executes `make api-fix-versions` in order to convert
the placeholder versions into real version numbers - both for the
real reason of tracking the values and also for a more real world test
of the apiage feature.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
It now reports "No Preview/Deprecated APIs found. All APIs are
considered stable." rather than leaving a blank section.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
When generating the human-readable api-status.md document from the
JSON, the logic used to determine if a package had no Preview/Deprecated
APIs was incorrect. This change fixes and simplifies that condition.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Add a new checklist item reminding contributors to run `make
api-update` to track new APIs. Add two short paragraphs that
cover some of the common things I copy and paste or need to look up
when working with contributors' PRs.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Adds a info and a warning function that currently just wraps print.
In the future these classified print statements could be customized
for output specific to the message type.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Previously, apiage.py just print out a problem count when it found
an unexpected stable api in the new apis file. Now the output displays
something like this:
```
found new unexpected stable apis: API.LeakyBucket
error: 1 problems detected
```
Signed-off-by: John Mulligan <jmulligan@redhat.com>