Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xing-yang committed Feb 24, 2020
1 parent 2d701d9 commit dca1151
Show file tree
Hide file tree
Showing 3 changed files with 329 additions and 336 deletions.
41 changes: 19 additions & 22 deletions csi.proto
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ message GetVolumeResponse {
// volume_health shows error conditions reported by the SP.
// This field MUST be specified if the
// VOLUME_HEALTH controller capability is supported.
VolumeHealth volume_health = 1 [(alpha_field) = true];
VolumeHealth volume_health = 1;
}

// This field is REQUIRED
Expand Down Expand Up @@ -1299,7 +1299,7 @@ message NodeGetVolumeStatsResponse {
// This field is OPTIONAL.
repeated VolumeUsage usage = 1;
// This field is OPTIONAL.
VolumeHealth volume_health = 2 [(alpha_field) = true];
VolumeHealth volume_health = 2;
}

message VolumeUsage {
Expand Down Expand Up @@ -1328,32 +1328,40 @@ message VolumeHealth {
option (alpha_message) = true;

enum Condition {
// Volume health condition is unknown; If this is the initial
// report of volume health, treat it as healthy. If there was
// already a condition reported previously, treat unknown as
// unchanged from the previous condition.
// Volume health condition is unknown.
UNKNOWN = 0;
// Volume is accessible and no problems are detected.
HEALTHY = 1;
// Volume is not accessible currently, but there's no reason to
// expect data loss. Examples: power outage, network outage,
// maintenance.
TEMPORARY_INACCESSIBLE = 2;
TEMPORARY_INACCESSIBLE = 10;
// Volume is accessible currently, but is degraded. Data loss
// is unlikely as the storage system is rebuilding to fix the
// is unlikely as the storage system may be rebuilding to fix the
// problem automatically. For example, a replica is lost on
// the storage system but a spare is configured, and the storage
// system is resyncing/reconstructing.
TEMPORARY_DEGRADED = 3;
TEMPORARY_DEGRADED = 20;
// Volume is accessible currently, but a problem is detected that
// could lead to eventual data loss. Examples: recoverable hardware
// failure (i.e. the disk needs to be manually replaced by a human),
// cooling failure, equipment significantly past end of life.
FAILURE_LIKELY = 4;
FAILURE_LIKELY = 30;
// Volume is not accessible currently, and there is reason to
// believe the outage may be permanent. Examples: unrecoverable
// hardware failure, natural disasters, damage to equipment.
FATAL = 5;
FATAL = 40;
}

message VolumeHealthError {
// The code describing the health condition of the volume.
// This is an opaque field to CO.
// This field is OPTIONAL.
string code = 1;

// The error message associated with the above error code.
// This field is REQUIRED.
string message = 2;
}

// The level of the health condition of the volume.
Expand All @@ -1364,17 +1372,6 @@ message VolumeHealth {
// the volume. This field is REQUIRED.
repeated VolumeHealthError error = 2;
}

message VolumeHealthError {
// The error code describing the health condition of the volume.
// This is an opaque field to CO.
// This field is REQUIRED.
string error_code = 1;

// The error message associated with the above error code.
// This field is OPTIONAL.
string message = 2;
}
message NodeGetCapabilitiesRequest {
// Intentionally empty.
}
Expand Down
Loading

0 comments on commit dca1151

Please sign in to comment.