1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2026-11-09 03:36:48 +00:00
webvirtcloud/computes/migrations/0004_compute_migration_address.py
catborise 5a523befbd feat(computes): a compute names the address migrations reach it on
Migration is client-driven: libvirt sends the VM's memory to the
destination's own host name unless a migration URI is given, and the
app never gave one. Where the hosts cannot resolve each other's names
(or the names point at a management network) every migration failed
with "Unable to resolve address '<host name>' service '49152'".

A compute now has an optional migration address (an IP address or a
host name, no scheme or port), editable in the compute form and the
API. A VM migrating to that compute is sent to tcp://<address>
(bracketed for IPv6). Empty, the default for existing computes, keeps
the previous behavior. The compute's host name is not reused, because
for SSH computes it can be an ssh_config alias.

The migration log entry names the address when one is set.
2026-10-06 15:05:40 +03:00

26 lines
799 B
Python

# Generated by Django 5.2.17 on 2026-10-06 08:53
import computes.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("computes", "0003_auto_20200615_0637"),
]
operations = [
migrations.AddField(
model_name="compute",
name="migration_address",
field=models.CharField(
blank=True,
default="",
help_text="IP address or host name the other hosts send migrating VMs to; empty: the host's own host name, which they must be able to resolve",
max_length=64,
validators=[computes.validators.validate_migration_address],
verbose_name="migration address",
),
),
]