process_manager
drunc.grpc_testing_tools.process_manager
Manager Service Implementation
Provides the gRPC servicer implementation for the Manager service, which acts as the top-level coordinator in the system hierarchy. Supports booting remote servers via SSH and managing their lifecycle.
Classes
ManagerServiceImpl(lifetime_manager_type=ProcessManagerTypes.SSH_PARAMIKO)
Bases: ManagerServiceServicer
Implementation of Manager gRPC service compatible with druncschema components.
The Manager service acts as the top-level coordinator and uses SSHProcessLifetimeManager for SSH-based process execution.
Initialise the Manager service implementation.
Source code in drunc/grpc_testing_tools/process_manager.py
Functions
Kill(request, context)
Handle graceful shutdown requests for the Manager service.
First sends Kill gRPC requests to all booted child servers, waits for their termination, then shuts down the Manager itself.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
KillRequest
|
KillRequest containing shutdown parameters |
required |
context
|
gRPC context object |
required |
Returns:
| Type | Description |
|---|---|
KillResponse
|
KillResponse indicating shutdown status |
Source code in drunc/grpc_testing_tools/process_manager.py
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 | |
MakeRequest(request, context)
Handle incoming connectivity test requests.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
DummyRequest containing message and timestamp |
required | |
context
|
gRPC context object |
required |
Returns:
| Type | Description |
|---|---|
|
DummyResponse with echoed message confirming Manager is responsive |
Source code in drunc/grpc_testing_tools/process_manager.py
boot(request, context)
Boot a new gRPC server process via SSH using BootRequest.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
request
|
BootRequest
|
BootRequest containing ProcessDescription and restrictions |
required |
context
|
gRPC context object |
required |
Returns:
| Type | Description |
|---|---|
ProcessInstanceList
|
ProcessInstanceList indicating success/failure and providing server details |