integration: Adds Minion pools tests#426
Merged
Dany9966 merged 2 commits intoMay 13, 2026
Merged
Conversation
44156df to
031c441
Compare
…ider Adds BaseDestinationMinionPoolProvider to TestImportProvider and implements all abstract methods. The test provider now advertises the PROVIDER_TYPE_DESTINATION_MINION_POOL capability. TestImportProvider.create_minion() starts a coriolis-data-minion container, waits for SSH, deploys the HTTP backup writer, and returns real connection / writer info. start_minion / shutdown_minion / delete_minion map to docker start / stop / remove. attach_volumes_to_minion hotplugs block devices into the container's mount namespace via nsenter + mknod. healthcheck_minion opens an SSH connection to verify liveness.
031c441 to
2e28919
Compare
| super().setUp() | ||
|
|
||
| patcher = mock.patch("psutil.Process.send_signal") | ||
| to_patch = [ |
Member
There was a problem hiding this comment.
Ouch, can't wait to get rid of those mocks once we switch to external services.
| try: | ||
| self._client.minion_pools.delete(pool_id) | ||
| except Exception: | ||
| pass |
Member
There was a problem hiding this comment.
Why are we ignoring pool deletion failures? At the very least I'd log the suppressed exceptions.
Member
Author
There was a problem hiding this comment.
Fair enough. Not catching those exceptions anymore. If it fails, we'll see it in the fact that the test failed.
| Returns the pattern bytes so callers can verify the destination later. | ||
| The write is done with ``dd`` so it works on raw block devices. | ||
|
|
||
| Two chunks are written (offsets 0 and chunk_size) so that any residual |
Member
There was a problem hiding this comment.
A bit ugly, the caller may simply request a larger chunk size. At the moment the helper makes assumptions about the test logic.
Member
Author
There was a problem hiding this comment.
Done. Reverted, in base.py we now call this with chunk_size=8192.
- Adds _InProcessTaskflowRunner that runs pool task flows in daemon threads instead of child processes, keeping them inside the shared fake:// transport. - Add _InProcessMinionManagerServerEndpoint that uses the in-thread runner. - Start the MinionManagerServerEndpoint in the harness. - Patch coriolis.keystone.delete_trust globally (no real Keystone in tests). - Disable the automatic pool-refresh cron (period=0) to prevent Keystone calls during pool lifecycle tests. - Adds integration tests for minion pool lifecycle. Adds test for allocating / deallocating minion pools. - Adds transfer, transfer execution, and deployment tests using minion pools.
2e28919 to
15ea851
Compare
petrutlucian94
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
BaseDestinationMinionPoolProvidertoTestImportProviderand implements all abstract methods. The test provider now advertises thePROVIDER_TYPE_DESTINATION_MINION_POOLcapability.TestImportProvider.create_minion()starts acoriolis-data-minioncontainer, waits for SSH, deploys the HTTP backup writer, and returns real connection / writer info.start_minion/shutdown_minion/delete_minion mapto docker start / stop / remove.attach_volumes_to_minionhotplugs block devices into the container's mountnamespace via
nsenter+mknod.healthcheck_minion opens an SSH connection to verify liveness.
Adds
_InProcessTaskflowRunnerthat runs pool task flows in daemon threads instead of child processes, keeping them inside the sharedfake://transport.Add
_InProcessMinionManagerServerEndpointthat uses the in-thread runner.Start the
MinionManagerServerEndpointin the harness.Patch
coriolis.keystone.delete_trustglobally (no real Keystone in tests).Disable the automatic pool-refresh cron (period=0) to prevent Keystone calls during pool lifecycle tests.
Adds integration tests for minion pool lifecycle. Adds test for allocating / deallocating minion pools.
Adds transfer, transfer execution, and deployment tests using minion pools.