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

TRITON-2435 Preserve internal_metadata_namespaces property when migrating VMs. #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marsell
Copy link

@marsell marsell commented Apr 2, 2024

If a VM is using internal_metadata_namespaces, and is then migrated, the internal_metadata_namespaces field is lost. Hilarity ensues.

Example VM before transfer:

[root@e4-43-4b-86-72-c8 (ro-1) ~]# vmadm get 486b163c-81a1-4dba-b22e-5315f3943242 | json internal_metadata internal_metadata_namespaces
{
  "foo:bar": "baz"
}
[
  "foo"
]

Example VM metadata in VMAPI before transfer:

[root@headnode (ro-1) ~]# sdc-vmapi /vms/486b163c-81a1-4dba-b22e-5315f3943242 | json -H internal_metadata internal_metadata_namespaces
{
  "foo:bar": "baz"
}
[
  "foo"
]

Performing the transfer:

[root@headnode (ro-1) ~]# sdc-migrate migrate -n 44454c4c-4400-105a-8037-c3c04f513033 486b163c-81a1-4dba-b22e-5315f3943242
# Migration begin running in job 6e583311-07bf-4da9-a1cc-60f624c4e8a3
 - reserving instance
 - syncing data
 - syncing data
  - running: 100%  1.1kB/s  (ETA 4s)
 - stopping the instance
 - syncing data
 - switching instances
 - filesytem sync finished, switching instances
 - reserving the IP addresses for the instance
 - setting up the target filesystem
 - hiding the original instance
 - promoting the migrated instance
 - removing sync snapshots
OK - switch was successful

Example VM after transfer:

[root@24-6e-96-2e-fa-54 (ro-1) ~]# vmadm get 486b163c-81a1-4dba-b22e-5315f3943242 | json internal_metadata internal_metadata_namespaces
{
  "foo:bar": "baz"
}

Example VM metadata in VMAPI after transfer:

[root@headnode (ro-1) ~]# sdc-vmapi /vms/486b163c-81a1-4dba-b22e-5315f3943242 | json -H internal_metadata internal_metadata_namespaces
{
  "foo:bar": "baz"
}

After this patch, the sdc-migration (in this case back to e4-43-4b-86-72-c8) preserves internal_metadata_namespaces:

[root@e4-43-4b-86-72-c8 (ro-1) ~]# vmadm get 486b163c-81a1-4dba-b22e-5315f3943242 | json internal_metadata internal_metadata_namespaces
{
  "foo:bar": "baz"
}
[
  "foo"
]
[root@headnode (ro-1) ~]# sdc-vmapi /vms/486b163c-81a1-4dba-b22e-5315f3943242 | json -H internal_metadata internal_metadata_namespaces
{
  "foo:bar": "baz"
}
[
  "foo"
]

@bahamat bahamat changed the title TRITON-XXXX Preserve internal_metadata_namespaces when migrating VMs. TRITON-2435 Preserve internal_metadata_namespaces property when migrating VMs. Apr 2, 2024
@bahamat
Copy link
Member

bahamat commented Apr 2, 2024

Filed internally: https://smartos.org/bugview/TRITON-2435

@bahamat
Copy link
Member

bahamat commented Apr 3, 2024

This is currently blocked by #94, and will need to be rebased after that's merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants