Skip to content

Commit

Permalink
feat: expose nexus rebuild fix
Browse files Browse the repository at this point in the history
This is useful to ensure nexus rebuild is done correctly, copying all
the clusters from an existing replica.

Signed-off-by: Tiago Castro <[email protected]>
  • Loading branch information
tiagolobocastro committed Jun 10, 2024
1 parent 8c977cb commit 7cd6a20
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 10 deletions.
14 changes: 14 additions & 0 deletions apis/io-engine/protobuf/v1/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,17 @@ enum ShareProtocol {
NVMF = 1; // NVMe over Fabrics (TCP)
ISCSI = 2; // iSCSI
}

message MayastorFeatures {
// NVMe ANA enablement status.
bool asymmetricNamespaceAccess = 1;
// LVM backend presence and enablement status.
optional bool logicalVolumeManager = 2;
// SnapshotRebuild presence and enablement status.
optional bool snapshotRebuild = 3;
}

message MayastorBugFixes {
// Nexus rebuilds both the clusters allocated to the replica and its ancestors clusters
bool nexusRebuildReplicaAncestry = 1;
}
9 changes: 4 additions & 5 deletions apis/io-engine/protobuf/v1/host.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@ service HostRpc {
rpc StatNvmeController (StatNvmeControllerRequest) returns (StatNvmeControllerResponse) {}
}

message MayastorFeatures {
message BackCompatMayastorFeatures {
// NVMe ANA enablement status.
bool asymmetricNamespaceAccess = 1;
bool logicalVolumeManager = 2;
bool snapshotRebuild = 3;
}

message MayastorInfoResponse {
string version = 1;
MayastorFeatures supportedFeatures = 2;
RegisterRequest registration_info = 3;
BackCompatMayastorFeatures previous_features = 2;
RegisterRequest registration_info = 3;
}

message BlockDevice {
Expand Down
7 changes: 7 additions & 0 deletions apis/io-engine/protobuf/v1/registration.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";

import "google/protobuf/empty.proto";
import "google/protobuf/wrappers.proto";
import "common.proto";

package mayastor.v1;

Expand All @@ -17,6 +18,12 @@ message RegisterRequest {
repeated APIVersion api_version = 4;
// nvme initiator hostnqn used by this instance
google.protobuf.StringValue hostnqn = 5;
// Mayastor features.
optional MayastorFeatures features = 6;
// Mayastor bugfixes.
optional MayastorBugFixes bugfixes = 7;
// Version of mayastor.
optional string version = 8;
}

// api version supported by the dataplane
Expand Down
14 changes: 9 additions & 5 deletions apis/io-engine/src/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,21 @@ pub mod snapshot {
};
}
pub mod registration {
pub use super::pb::{registration_client, ApiVersion, DeregisterRequest, RegisterRequest};
pub use super::pb::{
registration_client, ApiVersion, DeregisterRequest, MayastorBugFixes, MayastorFeatures,
RegisterRequest,
};
}
pub mod host {
pub use super::pb::{
block_device::{Filesystem, Partition},
host_rpc_client::HostRpcClient,
host_rpc_server::{HostRpc, HostRpcServer},
BlockDevice, GetMayastorResourceUsageResponse, ListBlockDevicesRequest,
ListBlockDevicesResponse, ListNvmeControllersResponse, MayastorFeatures,
MayastorInfoResponse, NvmeController, NvmeControllerIoStats, NvmeControllerState,
ResourceUsage, StatNvmeControllerRequest, StatNvmeControllerResponse,
BackCompatMayastorFeatures, BlockDevice, GetMayastorResourceUsageResponse,
ListBlockDevicesRequest, ListBlockDevicesResponse, ListNvmeControllersResponse,
MayastorBugFixes, MayastorFeatures, MayastorInfoResponse, NvmeController,
NvmeControllerIoStats, NvmeControllerState, ResourceUsage, StatNvmeControllerRequest,
StatNvmeControllerResponse,
};
}

Expand Down

0 comments on commit 7cd6a20

Please sign in to comment.