Files
ubicloud/migrate/20250117_vm_host_slice.rb
Maciek Sarnowicz b7d5bf9cb6 Migrations for VmHostSlice.
We'll put VMs in systemd slices. This change adds the migrations to
enable that.

Each slice reserves a subset of host's cpus & part of its memory. Then,
VMs can be allocated into the slice. `allowed_cpus` column maps directly
to the `AllowedCPUs` property of the corresponding systemd slice.

`total_memory_gib` & `used_memory_gib` are used to make sure that we
will have enough memory in the host for the VMs that'll be added to the
slice in future. When a VmHostSlice record is allocated, it will reserve
`total_memory_gib` from the host.

Each slice can be either be `dedicated` or `shared`, as specified in the
`type` column. We will use `shared` slices to host burstable instances.
2025-01-13 00:23:07 -08:00

1.3 KiB