Skip to content

integration: Adds Minion pools tests#426

Merged
Dany9966 merged 2 commits into
cloudbase:masterfrom
claudiubelu:minion-pools-integration-tests
May 13, 2026
Merged

integration: Adds Minion pools tests#426
Dany9966 merged 2 commits into
cloudbase:masterfrom
claudiubelu:minion-pools-integration-tests

Conversation

@claudiubelu
Copy link
Copy Markdown
Member

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.

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.

@claudiubelu claudiubelu force-pushed the minion-pools-integration-tests branch from 44156df to 031c441 Compare May 11, 2026 09:41
…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.
@claudiubelu claudiubelu force-pushed the minion-pools-integration-tests branch from 031c441 to 2e28919 Compare May 12, 2026 11:57
super().setUp()

patcher = mock.patch("psutil.Process.send_signal")
to_patch = [
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ouch, can't wait to get rid of those mocks once we switch to external services.

Comment thread coriolis/tests/integration/base.py Outdated
try:
self._client.minion_pools.delete(pool_id)
except Exception:
pass
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we ignoring pool deletion failures? At the very least I'd log the suppressed exceptions.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. Not catching those exceptions anymore. If it fails, we'll see it in the fact that the test failed.

Comment thread coriolis/tests/integration/utils.py Outdated
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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit ugly, the caller may simply request a larger chunk size. At the moment the helper makes assumptions about the test logic.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
@claudiubelu claudiubelu force-pushed the minion-pools-integration-tests branch from 2e28919 to 15ea851 Compare May 12, 2026 13:31
@Dany9966 Dany9966 merged commit 2548dd4 into cloudbase:master May 13, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants