Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release preparations for v0.23.0 #912

Merged
merged 4 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ go test -tags pacific ....

| go-ceph version | Supported Ceph Versions | Deprecated Ceph Versions |
| --------------- | ------------------------| -------------------------|
| v0.23.0 | pacific, quincy, reef | nautilus, octopus |
| v0.22.0 | pacific, quincy | nautilus, octopus |
| v0.21.0 | pacific, quincy | nautilus, octopus |
| v0.20.0 | pacific, quincy | nautilus, octopus |
Expand Down
4 changes: 2 additions & 2 deletions cephfs/admin/pin.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !nautilus && ceph_preview
// +build !nautilus,ceph_preview
//go:build !nautilus
// +build !nautilus

package admin

Expand Down
4 changes: 2 additions & 2 deletions cephfs/admin/pin_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !nautilus && ceph_preview
// +build !nautilus,ceph_preview
//go:build !nautilus
// +build !nautilus

package admin

Expand Down
4 changes: 2 additions & 2 deletions cephfs/admin/volume_info.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !(nautilus || octopus) && ceph_preview
// +build !nautilus,!octopus,ceph_preview
//go:build !(nautilus || octopus)
// +build !nautilus,!octopus

package admin

Expand Down
4 changes: 2 additions & 2 deletions cephfs/admin/volume_info_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !(nautilus || octopus) && ceph_preview
// +build !nautilus,!octopus,ceph_preview
//go:build !(nautilus || octopus)
// +build !nautilus,!octopus

package admin

Expand Down
3 changes: 0 additions & 3 deletions cephfs/makedirs.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build ceph_preview
// +build ceph_preview

package cephfs

/*
Expand Down
5 changes: 1 addition & 4 deletions cephfs/makedirs_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
//go:build ceph_preview
// +build ceph_preview

package cephfs

import (
Expand All @@ -14,7 +11,7 @@ func TestMakeDirs(t *testing.T) {
defer fsDisconnect(t, mount)

dir1 := "/base/sub/way"
err := mount.MakeDirs(dir1, 0755)
err := mount.MakeDirs(dir1, 0o755)
assert.NoError(t, err)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing your IDE did this? Not an issue, I'm just curious.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, my IDE runs gofmt when I save. So maybe that changed?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seem like that's the case :-)

defer func() {
assert.NoError(t, mount.RemoveDir("/base/sub/way"))
Expand Down
89 changes: 44 additions & 45 deletions docs/api-status.json
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,15 @@
"comment": "SelectFilesystem selects a file system to be mounted. If the ceph cluster\nsupports more than one cephfs this optional function selects which one to\nuse. Can only be called prior to calling Mount. The name of the file system\nis not validated by this call - if the supplied file system name is not\nvalid then only the subsequent mount call will fail.\n\nImplements:\n\n\tint ceph_select_filesystem(struct ceph_mount_info *cmount, const char *fs_name);\n",
"added_in_version": "v0.20.0",
"became_stable_version": "v0.22.0"
}
],
"preview_api": [
},
{
"name": "MountInfo.MakeDirs",
"comment": "MakeDirs creates multiple directories at once.\n\nImplements:\n\n\tint ceph_mkdirs(struct ceph_mount_info *cmount, const char *path, mode_t mode);\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
},
"became_stable_version": "v0.23.0"
}
],
"preview_api": [
{
"name": "MountInfo.Mknod",
"comment": "Mknod creates a regular, block or character special file.\n\nImplements:\n\n\tint ceph_mknod(struct ceph_mount_info *cmount, const char *path, mode_t mode,\n\t\t\t\t dev_t rdev);\n",
Expand Down Expand Up @@ -594,36 +594,35 @@
"comment": "ListSnapshotMetadata lists custom metadata (key-value pairs) set on the subvolume\nsnapshot in a volume belonging to an optional subvolume group.\n\nSimilar To:\n\n\tceph fs subvolume snapshot metadata ls <vol_name> <sub_name> <snap_name> [--group_name <subvol_group_name>]\n",
"added_in_version": "v0.20.0",
"became_stable_version": "v0.22.0"
}
],
"deprecated_api": [
{
"name": "New",
"comment": "New creates an FSAdmin automatically based on the default ceph\nconfiguration file. If more customization is needed, create a\n*rados.Conn as you see fit and use NewFromConn to use that\nconnection with these administrative functions.\n\nDeprecated: Use NewFromConn instead of New. The New function does not expose\nthe rados connection and therefore can not be deterministically cleaned up.\n",
"deprecated_in_version": "v0.21.0",
"expected_remove_version": "v0.24.0"
}
],
"preview_api": [
},
{
"name": "FSAdmin.PinSubVolume",
"comment": "PinSubVolume pins subvolume to ranks according to policies. A valid pin\nsetting value depends on the type of pin as described in the docs from\nhttps://docs.ceph.com/en/latest/cephfs/multimds/#cephfs-pinning and\nhttps://docs.ceph.com/en/latest/cephfs/multimds/#setting-subtree-partitioning-policies\n\nSimilar To:\n\n\tceph fs subvolume pin <vol_name> <sub_name> <pin_type> <pin_setting>\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
"became_stable_version": "v0.23.0"
},
{
"name": "FSAdmin.PinSubVolumeGroup",
"comment": "PinSubVolumeGroup pins subvolume to ranks according to policies. A valid pin\nsetting value depends on the type of pin as described in the docs from\nhttps://docs.ceph.com/en/latest/cephfs/multimds/#cephfs-pinning and\nhttps://docs.ceph.com/en/latest/cephfs/multimds/#setting-subtree-partitioning-policies\n\nSimilar To:\n\n\tceph fs subvolumegroup pin <vol_name> <group_name> <pin_type> <pin_setting>\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
"became_stable_version": "v0.23.0"
},
{
"name": "FSAdmin.FetchVolumeInfo",
"comment": "FetchVolumeInfo fetches the information of a CephFS volume.\n\nSimilar To:\n\n\tceph fs volume info <vol_name>\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
"became_stable_version": "v0.23.0"
}
]
],
"deprecated_api": [
{
"name": "New",
"comment": "New creates an FSAdmin automatically based on the default ceph\nconfiguration file. If more customization is needed, create a\n*rados.Conn as you see fit and use NewFromConn to use that\nconnection with these administrative functions.\n\nDeprecated: Use NewFromConn instead of New. The New function does not expose\nthe rados connection and therefore can not be deterministically cleaned up.\n",
"deprecated_in_version": "v0.21.0",
"expected_remove_version": "v0.24.0"
}
],
"preview_api": []
},
"rados": {
"stable_api": [
Expand Down Expand Up @@ -1829,75 +1828,75 @@
"comment": "MigrationStatus retrieve status of a live migration\nfor the specified image.\n\nImplements:\n\n\tint rbd_migration_status(rados_ioctx_t ioctx,\n\t const char *image_name,\n\t rbd_image_migration_status_t *status,\n\t size_t status_size);\n",
"added_in_version": "v0.20.0",
"became_stable_version": "v0.22.0"
}
],
"preview_api": [
},
{
"name": "SiteMirrorImageStatus.UnmarshalDescriptionJSON",
"comment": "UnmarshalDescriptionJSON parses an embedded JSON string that may be found in\nthe description of the SiteMirrorImageStatus. It will store the result in\nthe value pointed to by v. If no embedded JSON string is found an\nErrNotExist error is returned. An error may also be returned if the contents\ncan not be parsed.\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
"became_stable_version": "v0.23.0"
},
{
"name": "SiteMirrorImageStatus.DescriptionReplayStatus",
"comment": "DescriptionReplayStatus parses a MirrorDescriptionReplayStatus result out of\nthe image status description field if available. If the embedded status JSON\nis not found or fails to parse and error will be returned.\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
"became_stable_version": "v0.23.0"
},
{
"name": "AddMirrorPeerSite",
"comment": "AddMirrorPeerSite adds a peer site to the list of existing sites.\n",
"comment": "AddMirrorPeerSite adds a peer site to the list of existing sites\n\nImplements:\n\n\tint rbd_mirror_peer_site_add(rados_ioctx_t p, char *uuid, size_t uuid_max_length,\n\t\t\t\t\t\t\t\t rbd_mirror_peer_direction_t direction,\n\t\t\t\t\t\t\t\t const char *site_name,\n\t\t\t\t\t\t\t\t const char *client_name);\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
"became_stable_version": "v0.23.0"
},
{
"name": "RemoveMirrorPeerSite",
"comment": "RemoveMirrorPeerSite removes the site with the provided uuid.\n",
"comment": "RemoveMirrorPeerSite removes the site with the provided uuid\n\nImplements:\n\n\tint rbd_mirror_peer_site_remove(rados_ioctx_t p, const char *uuid)\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
"became_stable_version": "v0.23.0"
},
{
"name": "GetAttributesMirrorPeerSite",
"comment": "GetAttributesMirrorPeerSite fetches the list of key,value pair of attributes of a peer site.\n",
"comment": "GetAttributesMirrorPeerSite fetches the list of key,value pair of attributes of a peer site\n\nImplements:\n\n\tint rbd_mirror_peer_site_get_attributes(rados_ioctx_t p, const char *uuid, char *keys,\n\t\t\t\t\t\t\t\t\t\t\tsize_t *max_key_len, char *values, size_t *max_val_len,\n\t\t\t\t\t\t\t\t\t\t\tsize_t *key_value_count);\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
"became_stable_version": "v0.23.0"
},
{
"name": "SetAttributesMirrorPeerSite",
"comment": "SetAttributesMirrorPeerSite sets the attributes for the site with the given uuid.\n",
"comment": "SetAttributesMirrorPeerSite sets the attributes for the site with the given uuid\n\nImplements:\n\n\tint rbd_mirror_peer_site_set_attributes(rados_ioctx_t p, const char *uuid,\n\t\t\t\t\t\t\t\t\t\t\tconst char *keys, const char *values,\n\t\t\t\t\t\t\t\t\t\t\tsize_t count) ;\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
"became_stable_version": "v0.23.0"
},
{
"name": "ListMirrorPeerSite",
"comment": "ListMirrorPeerSite returns the list of peer sites.\n",
"comment": "ListMirrorPeerSite returns the list of peer sites\n\nImplements:\n\n\tint rbd_mirror_peer_site_list(rados_ioctx_t p, rbd_mirror_peer_site_t *peers, int *max_peers)\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
"became_stable_version": "v0.23.0"
},
{
"name": "SetMirrorPeerSiteClientName",
"comment": "SetMirrorPeerSiteClientName sets the client name of a mirror peer site.\n",
"comment": "SetMirrorPeerSiteClientName sets the client name for a mirror peer site\n\nImplements:\n\n\tint rbd_mirror_peer_site_set_client_name(rados_ioctx_t p, const char *uuid,\n\t\t\t\t\t\t\t\t\t\t\t const char *client_name);\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
"became_stable_version": "v0.23.0"
},
{
"name": "SetMirrorPeerSiteName",
"comment": "SetMirrorPeerSiteName sets the site name of a mirror peer site.\n",
"name": "SetMirrorPeerSiteDirection",
"comment": "SetMirrorPeerSiteDirection sets the direction of a mirror peer site\n\nImplements:\n\n\tint rbd_mirror_peer_site_set_direction(rados_ioctx_t p, const char *uuid,\n\t\t\t\t\t\t\t\t\t\t rbd_mirror_peer_direction_t direction);\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
"became_stable_version": "v0.23.0"
},
{
"name": "SetMirrorPeerSiteDirection",
"comment": "SetMirrorPeerSiteDirection sets the direction of a mirror peer site.\n",
"name": "SetMirrorPeerSiteName",
"comment": "SetMirrorPeerSiteName sets the name of a mirror peer site\n\nImplements:\n\n\tint rbd_mirror_peer_site_set_name(rados_ioctx_t p, const char *uuid,\n\t\t\t\t\t\t\t\t\t const char *site_name);\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
"became_stable_version": "v0.23.0"
},
{
"name": "Image.SparsifyWithProgress",
"comment": "SparsifyWithProgress makes an image sparse by deallocating runs of zeros.\nThe sparseSize value will be used to find runs of zeros and must be\na power of two no less than 4096 and no larger than the image size.\nThe given progress callback will be called to report on the progress\nof sparse. The operation will be aborted if the progress callback returns\na non-zero value.\n\nImplements:\n\n\tint rbd_sparsify_with_progress(rbd_image_t image, size_t sparse_size,\n\t\t\t\t\t\t\t\t librbd_progress_fn_t cb, void *cbdata);\n",
"added_in_version": "v0.21.0",
"expected_stable_version": "v0.23.0"
},
"became_stable_version": "v0.23.0"
}
],
"preview_api": [
{
"name": "Image.LockAcquire",
"comment": "LockAcquire takes a lock on the given image as per the provided lock_mode.\n\nImplements:\n\n\tint rbd_lock_acquire(rbd_image_t image, rbd_lock_mode_t lock_mode);\n",
Expand Down
20 changes: 0 additions & 20 deletions docs/api-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,13 @@

Name | Added in Version | Expected Stable Version |
---- | ---------------- | ----------------------- |
MountInfo.MakeDirs | v0.21.0 | v0.23.0 |
MountInfo.Mknod | v0.22.0 | v0.24.0 |
MountInfo.Futime | v0.22.0 | v0.24.0 |
MountInfo.Futimens | v0.22.0 | v0.24.0 |
MountInfo.Futimes | v0.22.0 | v0.24.0 |

## Package: cephfs/admin

### Preview APIs

Name | Added in Version | Expected Stable Version |
---- | ---------------- | ----------------------- |
FSAdmin.PinSubVolume | v0.21.0 | v0.23.0 |
FSAdmin.PinSubVolumeGroup | v0.21.0 | v0.23.0 |
FSAdmin.FetchVolumeInfo | v0.21.0 | v0.23.0 |

### Deprecated APIs

Name | Deprecated in Version | Expected Removal Version |
Expand All @@ -40,17 +31,6 @@ No Preview/Deprecated APIs found. All APIs are considered stable.

Name | Added in Version | Expected Stable Version |
---- | ---------------- | ----------------------- |
SiteMirrorImageStatus.UnmarshalDescriptionJSON | v0.21.0 | v0.23.0 |
SiteMirrorImageStatus.DescriptionReplayStatus | v0.21.0 | v0.23.0 |
AddMirrorPeerSite | v0.21.0 | v0.23.0 |
RemoveMirrorPeerSite | v0.21.0 | v0.23.0 |
GetAttributesMirrorPeerSite | v0.21.0 | v0.23.0 |
SetAttributesMirrorPeerSite | v0.21.0 | v0.23.0 |
ListMirrorPeerSite | v0.21.0 | v0.23.0 |
SetMirrorPeerSiteClientName | v0.21.0 | v0.23.0 |
SetMirrorPeerSiteName | v0.21.0 | v0.23.0 |
SetMirrorPeerSiteDirection | v0.21.0 | v0.23.0 |
Image.SparsifyWithProgress | v0.21.0 | v0.23.0 |
Image.LockAcquire | v0.22.0 | v0.24.0 |
Image.LockBreak | v0.22.0 | v0.24.0 |
Image.LockGetOwners | v0.22.0 | v0.24.0 |
Expand Down
7 changes: 4 additions & 3 deletions rbd/mirror_desc_status.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !nautilus && ceph_preview
// +build !nautilus,ceph_preview
//go:build !nautilus
// +build !nautilus

package rbd

Expand Down Expand Up @@ -61,7 +61,8 @@ func (s *SiteMirrorImageStatus) UnmarshalDescriptionJSON(v interface{}) error {
// the image status description field if available. If the embedded status JSON
// is not found or fails to parse and error will be returned.
func (s *SiteMirrorImageStatus) DescriptionReplayStatus() (
*MirrorDescriptionReplayStatus, error) {
*MirrorDescriptionReplayStatus, error,
) {
// ---
mdrs := MirrorDescriptionReplayStatus{}
if err := s.UnmarshalDescriptionJSON(&mdrs); err != nil {
Expand Down
7 changes: 2 additions & 5 deletions rbd/mirror_desc_status_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
//go:build !nautilus && ceph_preview
// +build !nautilus,ceph_preview

// IMPORTANT - when removing ceph_preview from this file also delete
// rbd/mirror_stub_test.go as it will no longer serve a purpose.
//go:build !nautilus
// +build !nautilus

package rbd

Expand Down
9 changes: 4 additions & 5 deletions rbd/mirror_peer_site.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !nautilus && ceph_preview
// +build !nautilus,ceph_preview
//go:build !nautilus
// +build !nautilus

package rbd

Expand All @@ -26,8 +26,8 @@ import (
// const char *site_name,
// const char *client_name);
func AddMirrorPeerSite(ioctx *rados.IOContext, siteName string, clientName string,
direction MirrorPeerDirection) (string, error) {

direction MirrorPeerDirection,
) (string, error) {
var (
err error
buf []byte
Expand Down Expand Up @@ -78,7 +78,6 @@ func RemoveMirrorPeerSite(ioctx *rados.IOContext, uuid string) error {
// size_t *max_key_len, char *values, size_t *max_val_len,
// size_t *key_value_count);
func GetAttributesMirrorPeerSite(ioctx *rados.IOContext, uuid string) (map[string]string, error) {

var (
err error
keys []byte
Expand Down
4 changes: 2 additions & 2 deletions rbd/mirror_peer_site_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !nautilus && ceph_preview
// +build !nautilus,ceph_preview
//go:build !nautilus
// +build !nautilus

package rbd

Expand Down
14 changes: 0 additions & 14 deletions rbd/mirror_stub_test.go

This file was deleted.

11 changes: 6 additions & 5 deletions rbd/sparsify.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !nautilus && ceph_preview
// +build !nautilus,ceph_preview
//go:build !nautilus
// +build !nautilus

package rbd

Expand Down Expand Up @@ -56,7 +56,8 @@ type sparsifyCallbackCtx struct {
// int rbd_sparsify_with_progress(rbd_image_t image, size_t sparse_size,
// librbd_progress_fn_t cb, void *cbdata);
func (image *Image) SparsifyWithProgress(
sparseSize uint, cb SparsifyCallback, data interface{}) error {
sparseSize uint, cb SparsifyCallback, data interface{},
) error {
// the provided callback must be a real function
if cb == nil {
return rbdError(C.EINVAL)
Expand All @@ -80,8 +81,8 @@ func (image *Image) SparsifyWithProgress(

//export sparsifyCallback
func sparsifyCallback(
offset, total C.uint64_t, index uintptr) C.int {

offset, total C.uint64_t, index uintptr,
) C.int {
v := sparsifyCallbacks.Lookup(index)
ctx := v.(sparsifyCallbackCtx)
return C.int(ctx.callback(uint64(offset), uint64(total), ctx.data))
Expand Down
4 changes: 2 additions & 2 deletions rbd/sparsify_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//go:build !nautilus && ceph_preview
// +build !nautilus,ceph_preview
//go:build !nautilus
// +build !nautilus

package rbd

Expand Down
Loading