Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Add option to run migrations in parallel or sequentially #42

Merged

Conversation

gyptazy
Copy link
Owner

@gyptazy gyptazy commented Aug 3, 2024

feature: Add option to run migrations in parallel or sequentially

The newly introduced option parameter parallel_migrations (default: 1 [True] == enabled) provides the possibility to define if migrations should be performed in parallel. If this is set to 0, migration will be performed sequentially. During this, the API will be queried until the job is completed for the migration before starting the next migration.

Test:

<6> ProxLB: Info: [rebalancing-executor]: Rebalancing VM test09-fat02 from node virt01 to node virt03.
<6> ProxLB: Info: [rebalancing-executor]: Rebalancing will be performed sequentially.
<6> ProxLB: Info: [job-status-getter]: Getting job status for job UPID:virt01:0009E042:00E90932:66AF1E6C:qmigrate:108:root@pam:.
<6> ProxLB: Info: [job-status-getter]: {'pid': 647234, 'pstart': 15272242, 'id': '108', 'starttime': 1722752620, 'upid': 'UPID:virt01:0009E042:00E90932:66AF1E6C:qmigrate:108:root@pam:', 'type': 'qmigrate', 'status': 'running', 'node': 'virt01', 'user': 'root@pam'}
<6> ProxLB: Info: [job-status-getter]: Validating job UPID:virt01:0009E042:00E90932:66AF1E6C:qmigrate:108:root@pam: for the 1 run.
<6> ProxLB: Info: [job-status-getter]: Revalidating job UPID:virt01:0009E042:00E90932:66AF1E6C:qmigrate:108:root@pam: in a next run.
<6> ProxLB: Info: [job-status-getter]: Getting job status for job UPID:virt01:0009E042:00E90932:66AF1E6C:qmigrate:108:root@pam:.
<6> ProxLB: Info: [job-status-getter]: {'id': '108', 'starttime': 1722752620, 'pid': 647234, 'pstart': 15272242, 'user': 'root@pam', 'upid': 'UPID:virt01:0009E042:00E90932:66AF1E6C:qmigrate:108:root@pam:', 'type': 'qmigrate', 'status': 'running', 'node': 'virt01'}
<6> ProxLB: Info: [job-status-getter]: Validating job UPID:virt01:0009E042:00E90932:66AF1E6C:qmigrate:108:root@pam: for the 2 run.
<6> ProxLB: Info: [job-status-getter]: Revalidating job UPID:virt01:0009E042:00E90932:66AF1E6C:qmigrate:108:root@pam: in a next run.
<6> ProxLB: Info: [job-status-getter]: Getting job status for job UPID:virt01:0009E042:00E90932:66AF1E6C:qmigrate:108:root@pam:.
<6> ProxLB: Info: [job-status-getter]: {'id': '108', 'starttime': 1722752620, 'pid': 647234, 'pstart': 15272242, 'exitstatus': 'OK', 'user': 'root@pam', 'type': 'qmigrate', 'upid': 'UPID:virt01:0009E042:00E90932:66AF1E6C:qmigrate:108:root@pam:', 'node': 'virt01', 'status': 'stopped'}
<6> ProxLB: Info: [job-status-getter]: Job UPID:virt01:0009E042:00E90932:66AF1E6C:qmigrate:108:root@pam: for migration from virt01 terminiated succesfully.
<6> ProxLB: Info: [job-status-getter]: Job UPID:virt01:0009E042:00E90932:66AF1E6C:qmigrate:108:root@pam: for migration from virt01 terminiated succesfully.
<6> ProxLB: Info: [job-status-getter]: Job UPID:virt01:0009E042:00E90932:66AF1E6C:qmigrate:108:root@pam: for migration from virt01 terminiated succesfully.
<6> ProxLB: Info: [rebalancing-executor]: Rebalancing VM test06-gyptazy01 from node virt02 to node virt03.
<6> ProxLB: Info: [rebalancing-executor]: Rebalancing will be performed sequentially.
<6> ProxLB: Info: [job-status-getter]: Getting job status for job UPID:virt02:00034E73:0046C495:66AF1E76:qmigrate:105:root@pam:.
<6> ProxLB: Info: [job-status-getter]: {'upid': 'UPID:virt02:00034E73:0046C495:66AF1E76:qmigrate:105:root@pam:', 'status': 'running', 'starttime': 1722752630, 'pstart': 4637845, 'id': '105', 'type': 'qmigrate', 'pid': 216691, 'node': 'virt02', 'user': 'root@pam'}
<6> ProxLB: Info: [job-status-getter]: Validating job UPID:virt02:00034E73:0046C495:66AF1E76:qmigrate:105:root@pam: for the 1 run.
<6> ProxLB: Info: [job-status-getter]: Revalidating job UPID:virt02:00034E73:0046C495:66AF1E76:qmigrate:105:root@pam: in a next run.
<6> ProxLB: Info: [job-status-getter]: Getting job status for job UPID:virt02:00034E73:0046C495:66AF1E76:qmigrate:105:root@pam:.
<6> ProxLB: Info: [job-status-getter]: {'upid': 'UPID:virt02:00034E73:0046C495:66AF1E76:qmigrate:105:root@pam:', 'starttime': 1722752630, 'status': 'running', 'id': '105', 'pstart': 4637845, 'node': 'virt02', 'user': 'root@pam', 'pid': 216691, 'type': 'qmigrate'}
<6> ProxLB: Info: [job-status-getter]: Validating job UPID:virt02:00034E73:0046C495:66AF1E76:qmigrate:105:root@pam: for the 2 run.
<6> ProxLB: Info: [job-status-getter]: Revalidating job UPID:virt02:00034E73:0046C495:66AF1E76:qmigrate:105:root@pam: in a next run.
<6> ProxLB: Info: [job-status-getter]: Getting job status for job UPID:virt02:00034E73:0046C495:66AF1E76:qmigrate:105:root@pam:.
<6> ProxLB: Info: [job-status-getter]: {'id': '105', 'pstart': 4637845, 'status': 'stopped', 'starttime': 1722752630, 'upid': 'UPID:virt02:00034E73:0046C495:66AF1E76:qmigrate:105:root@pam:', 'exitstatus': 'OK', 'node': 'virt02', 'user': 'root@pam', 'pid': 216691, 'type': 'qmigrate'}
<6> ProxLB: Info: [job-status-getter]: Job UPID:virt02:00034E73:0046C495:66AF1E76:qmigrate:105:root@pam: for migration from virt02 terminiated succesfully.
<6> ProxLB: Info: [job-status-getter]: Job UPID:virt02:00034E73:0046C495:66AF1E76:qmigrate:105:root@pam: for migration from virt02 terminiated succesfully.
<6> ProxLB: Info: [job-status-getter]: Job UPID:virt02:00034E73:0046C495:66AF1E76:qmigrate:105:root@pam: for migration from virt02 terminiated succesfully.

Fixes: #41

@gyptazy gyptazy added the feature label Aug 3, 2024
@gyptazy gyptazy added this to the Release 1.1.0 milestone Aug 3, 2024
@gyptazy gyptazy self-assigned this Aug 3, 2024
@gyptazy gyptazy force-pushed the feature/41-add-option-run-migration-parallel-or-serial branch from 44b8c73 to ed06485 Compare August 3, 2024 18:21
@gyptazy gyptazy force-pushed the feature/41-add-option-run-migration-parallel-or-serial branch from ed06485 to 28be8b8 Compare August 4, 2024 06:25
@gyptazy gyptazy merged commit adc476e into main Aug 4, 2024
1 check passed
@gyptazy gyptazy modified the milestones: Release 1.1.0, Release 1.0.2 Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: Option to enable migrations in parallel or serially
1 participant