Skip to content

Commit 27825f7

Browse files
Madhu-1mergify[bot]
authored andcommitted
fence: add RPC to get the client address
Adding a RPC to get the local client details which includes the id and the local ip addresses for fencing. The ID can be anything that can be used as an identifier about the client address. For example the ID can be the cephcluster UUID and the ip addressed/cidr is the local client addresses used to connect to the ceph cluster, The ceph is an example/representation here. Signed-off-by: Madhu Rajanna <[email protected]>
1 parent 46916ee commit 27825f7

File tree

4 files changed

+406
-48
lines changed

4 files changed

+406
-48
lines changed

fence/README.md

+39
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ service FenceController {
6666
// ListClusterFence RPC call to provide a list of blocklisted/fenced clients.
6767
rpc ListClusterFence(ListClusterFenceRequest)
6868
returns (ListClusterFenceResponse){}
69+
70+
// GetFenceClients RPC calls to get the client information to use in a
71+
// FenceClusterNetwork or UnfenceClusterNetwork RPC.
72+
rpc GetFenceClients(GetFenceClientsRequest)
73+
returns (GetFenceClientsResponse){}
6974
}
7075
```
7176

@@ -145,6 +150,40 @@ message CIDR {
145150
}
146151
```
147152

153+
### GetFenceClients
154+
155+
```protobuf
156+
// GetFenceClientsRequest contains the necessary information to identify
157+
// the clients that need fencing.
158+
message GetFenceClientsRequest {
159+
// Plugin-specific parameters passed in as opaque key-value pairs.
160+
map<string, string> parameters = 1;
161+
// Secrets required by the plugin to complete the request.
162+
map<string, string> secrets = 2 [(csi.v1.csi_secret) = true];
163+
}
164+
165+
// GetFenceClientsResponse holds the information about clients that require
166+
// fencing.
167+
message GetFenceClientsResponse {
168+
// List of clients that need to be fenced.
169+
repeated ClientDetails clients = 1;
170+
}
171+
```
172+
173+
### ClientDetails
174+
175+
```protobuf
176+
// ClientDetails holds the information about the client that requires fencing.
177+
message ClientDetails {
178+
// id represents the unique identifier of the client.
179+
// Required field.
180+
string id = 1;
181+
// list of IP addresses that represent the client's local addresses.
182+
// Required field.
183+
repeated CIDR addresses = 2;
184+
}
185+
```
186+
148187
#### Error Scheme
149188

150189
| Condition | gRPC Code | Description | Recovery Behavior |

fence/fence.proto

+29
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ service FenceController {
2121
// ListClusterFence RPC call to provide a list of blocklisted/fenced clients.
2222
rpc ListClusterFence(ListClusterFenceRequest)
2323
returns (ListClusterFenceResponse){}
24+
25+
// GetFenceClients RPC calls to get the client information to use in a
26+
// FenceClusterNetwork or UnfenceClusterNetwork RPC.
27+
rpc GetFenceClients(GetFenceClientsRequest)
28+
returns (GetFenceClientsResponse){}
2429
}
2530
// FenceClusterNetworkRequest contains the information needed to identify
2631
// the storage cluster so that the appropriate fencing operation can be
@@ -78,3 +83,27 @@ message CIDR {
7883
// CIDR block
7984
string cidr = 1;
8085
}
86+
// GetFenceClientsRequest contains the necessary information to identify
87+
// the clients that need fencing.
88+
message GetFenceClientsRequest {
89+
// Plugin-specific parameters passed in as opaque key-value pairs.
90+
map<string, string> parameters = 1;
91+
// Secrets required by the plugin to complete the request.
92+
map<string, string> secrets = 2 [(csi.v1.csi_secret) = true];
93+
}
94+
95+
// GetFenceClientsResponse holds the information about clients that require
96+
// fencing.
97+
message GetFenceClientsResponse {
98+
// List of clients that need to be fenced.
99+
repeated ClientDetails clients = 1;
100+
}
101+
// ClientDetails holds the information about the client that requires fencing.
102+
message ClientDetails {
103+
// id represents the unique identifier of the client.
104+
// Required field.
105+
string id = 1;
106+
// list of IP addresses that represent the client's local addresses.
107+
// Required field.
108+
repeated CIDR addresses = 2;
109+
}

0 commit comments

Comments
 (0)