ssh_process_manager
drunc.process_manager.ssh_process_manager
Classes
SSHProcessManager(configuration, LifetimeManagerClass, **kwargs)
Bases: ProcessManager
Source code in drunc/process_manager/ssh_process_manager.py
Functions
__boot(boot_request, uuid)
Boot a remote process via SSH on an available host.
Attempts to start the process on each allowed host in sequence until successful. Updates boot request with the actual hostname used and returns process status information.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
boot_request
|
BootRequest
|
BootRequest containing process configuration and restrictions |
required |
uuid
|
str
|
Unique identifier for this process |
required |
Returns:
| Type | Description |
|---|---|
ProcessInstance
|
ProcessInstance containing process status and metadata |
Raises:
| Type | Description |
|---|---|
DruncCommandException
|
If no allowed hosts provided or process already exists |
Source code in drunc/process_manager/ssh_process_manager.py
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 | |
kill_processes(uuids)
Terminate processes by their UUIDs.
Iterates through the provided UUID list and terminates each process via the SSH connection manager. Collects process status information for each terminated process.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
uuids
|
list
|
List of process UUIDs to terminate |
required |
Returns:
| Type | Description |
|---|---|
ProcessInstanceList
|
ProcessInstanceList containing status of terminated processes |