feature: Add conntrack state aware migrations of VMs.

Fixes: #305
This commit is contained in:
Florian Paul Azim Hoberg
2025-09-15 06:59:41 +02:00
parent 7e5b72cfc7
commit bf393c6bbf
6 changed files with 14 additions and 1 deletions

View File

@@ -0,0 +1,2 @@
added:
- Add conntrack state aware migrations of VMs (@gyptazy). [#305]

View File

@@ -0,0 +1 @@
date: TBD

View File

@@ -267,6 +267,7 @@ The following options can be set in the configuration file `proxlb.yaml`:
| | parallel_jobs | | 5 | `Int` | The amount if parallel jobs when migrating guests. (default: `5`)|
| | live | | True | `Bool` | If guests should be moved live or shutdown.|
| | with_local_disks | | True | `Bool` | If balancing of guests should include local disks.|
| | with_conntrack_state | | True | `Bool` | If balancing of guests should including the conntrack state.|
| | balance_types | | ['vm', 'ct'] | `List` | Defined the types of guests that should be honored. [values: `vm`, `ct`]|
| | max_job_validation | | 1800 | `Int` | How long a job validation may take in seconds. (default: 1800) |
| | balanciness | | 10 | `Int` | The maximum delta of resource usage between node with highest and lowest usage. |
@@ -310,6 +311,7 @@ balancing:
parallel: False
live: True
with_local_disks: True
with_conntrack_state: True
balance_types: ['vm', 'ct']
max_job_validation: 1800
balanciness: 5

View File

@@ -25,6 +25,7 @@ balancing:
parallel_jobs: 1
live: True
with_local_disks: True
with_conntrack_state: True
balance_types: ['vm', 'ct']
max_job_validation: 1800
balanciness: 5

View File

@@ -43,6 +43,7 @@ configmap:
parallel_jobs: 1
live: True
with_local_disks: True
with_conntrack_state: True
balance_types: [ 'vm', 'ct' ]
max_job_validation: 1800
balanciness: 5

View File

@@ -154,10 +154,16 @@ class Balancing:
else:
with_local_disks = 0
if proxlb_data["meta"]["balancing"].get("with_conntrack_state", True):
with_conntrack_state = 1
else:
with_conntrack_state = 0
migration_options = {
'target': {guest_node_target},
'online': online_migration,
'with-local-disks': with_local_disks
'with-local-disks': with_local_disks,
'with-conntrack-state': with_conntrack_state,
}
try: