MigratorManager#
- class nublado.controller.services.migrator.MigratorManager(*, config, lab_builder, migrator_storage, slack_client, logger)#
Bases:
objectManage filesystem migrator.
This singleton manages the migrator environment and maintains a cache for particular user migrations.
- Parameters:
config (
Config) – Nublado configuration (used for home volume and timeout).lab_builder (
LabBuilder) – Lab builder (used for home volume).migrator_storage (
MigratorStorage) – Shared storage driver for migrator K8s objects.slack_client (
Optional[SlackWebhookClient]) – Optional Slack webhook client for alerts.logger (
BoundLogger) – Logger to use.
Methods Summary
create(old_user, new_user)Ensure the migrator environment exists.
get_status(old_user, new_user)Return the status for the migrator container for a particular user pair, or None if no migration has been attempted.
Methods Documentation
- async create(old_user, new_user)#
Ensure the migrator environment exists.
If we don’t have a migration environment for this user pair, create it. If we do, just return. This gets called by the handler when someone POSTs to the
/migrator/v1/serviceingress.- Returns:
Status for the created pod.
- Return type:
- Raises:
controller.exceptions.ControllerTimeoutError – Raised if the migrator environment could not be created within its creation timeout.
KubernetesError – Raised if there is some failure in a Kubernetes API call.
- Parameters:
- async get_status(old_user, new_user)#
Return the status for the migrator container for a particular user pair, or None if no migration has been attempted.
- Raises:
controller.exceptions.ControllerTimeoutError – Raised if the fsadmin environment could not be queried within its query timeout.
KubernetesError – Raised if there is some failure in a Kubernetes API call.
- Parameters:
- Return type: