Skip to content

Commit 9cbdaea

Browse files
committed
Add individual failure states for before/after lease hooks, switch to status polling
1 parent 3e1918b commit 9cbdaea

File tree

2 files changed

+12
-24
lines changed

2 files changed

+12
-24
lines changed

proto/jumpstarter/v1/common.proto

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ package jumpstarter.v1;
88

99
// Exporter status information
1010
enum ExporterStatus {
11-
EXPORTER_STATUS_UNSPECIFIED = 0; // Unspecified exporter status
12-
EXPORTER_STATUS_OFFLINE = 1; // Exporter is offline
13-
EXPORTER_STATUS_AVAILABLE = 2; // Exporter is available to be leased
14-
EXPORTER_STATUS_BEFORE_LEASE_HOOK = 3; // Exporter is executing before lease hook(s)
15-
EXPORTER_STATUS_LEASE_READY = 4; // Exporter is leased and ready to accept commands
16-
EXPORTER_STATUS_AFTER_LEASE_HOOK = 5; // Exporter is executing after lease hook(s)
17-
EXPORTER_STATUS_ERROR = 6; // Exporter is in an error state and cannot accept leases
11+
EXPORTER_STATUS_UNSPECIFIED = 0; // Unspecified exporter status
12+
EXPORTER_STATUS_OFFLINE = 1; // Exporter is offline
13+
EXPORTER_STATUS_AVAILABLE = 2; // Exporter is available to be leased
14+
EXPORTER_STATUS_BEFORE_LEASE_HOOK = 3; // Exporter is executing before lease hook(s)
15+
EXPORTER_STATUS_LEASE_READY = 4; // Exporter is leased and ready to accept commands
16+
EXPORTER_STATUS_AFTER_LEASE_HOOK = 5; // Exporter is executing after lease hook(s)
17+
EXPORTER_STATUS_BEFORE_LEASE_HOOK_FAILED = 6; // Exporter before lease hook failed
18+
EXPORTER_STATUS_AFTER_LEASE_HOOK_FAILED = 7; // Exporter after lease hook failed
1819
}
1920

2021
// Source of log stream messages

proto/jumpstarter/v1/jumpstarter.proto

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ service ControllerService {
2323
rpc Unregister(UnregisterRequest) returns (UnregisterResponse);
2424

2525
// Exporter status report
26-
// Allows exporters to report their own status
26+
// Allows exporters to report their own status to the controller
2727
rpc ReportStatus(ReportStatusRequest) returns (ReportStatusResponse);
2828

2929
// Exporter listening
@@ -116,7 +116,7 @@ message AuditStreamRequest {
116116

117117
message ReportStatusRequest {
118118
ExporterStatus status = 1;
119-
optional string status_message = 2; // Optional human-readable status detail
119+
optional string message = 2; // Optional human-readable status message
120120
}
121121

122122
message ReportStatusResponse {}
@@ -130,12 +130,7 @@ service ExporterService {
130130
rpc StreamingDriverCall(StreamingDriverCallRequest) returns (stream StreamingDriverCallResponse);
131131
rpc LogStream(google.protobuf.Empty) returns (stream LogStreamResponse);
132132
rpc Reset(ResetRequest) returns (ResetResponse);
133-
134-
// Get current exporter status
135133
rpc GetStatus(GetStatusRequest) returns (GetStatusResponse);
136-
137-
// Stream status updates
138-
rpc StatusStream(StatusStreamRequest) returns (stream StatusStreamResponse);
139134
}
140135

141136
message GetReportResponse {
@@ -225,13 +220,5 @@ message GetStatusRequest {}
225220

226221
message GetStatusResponse {
227222
ExporterStatus status = 1;
228-
optional string status_message = 2;
229-
}
230-
231-
message StatusStreamRequest {}
232-
233-
message StatusStreamResponse {
234-
ExporterStatus status = 1;
235-
optional string status_message = 2;
236-
optional google.protobuf.Timestamp timestamp = 3;
237-
}
223+
optional string message = 2;
224+
}

0 commit comments

Comments
 (0)