mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 12:16:49 +00:00
The sync deleted the Instance of every VM missing from its compute, and its owners and rights went with it. A VM moved with virsh, or undefined and defined again, came back with no owner. Now, when a VM disappears from a compute: - if the same UUID is recorded on another compute, it moved: its owners and template flag go there; - otherwise they are kept in an InstanceTombstone and restored when the UUID appears again within INSTANCE_OWNERSHIP_RETENTION_DAYS (30). A UUID recorded on two computes at the same time is a copy and gets no owners. VMs deleted through WebVirtCloud leave no tombstone.
32 lines
992 B
Python
32 lines
992 B
Python
# Generated by Django 5.2.17 on 2026-10-03 19:44
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("instances", "0012_instance_unique_compute_uuid"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="InstanceTombstone",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("uuid", models.CharField(db_index=True, max_length=36)),
|
|
("name", models.CharField(max_length=120)),
|
|
("is_template", models.BooleanField(default=False)),
|
|
("owners", models.JSONField(default=list)),
|
|
("removed", models.DateTimeField(auto_now_add=True)),
|
|
],
|
|
),
|
|
]
|