ubicloud/spec/prog
Hadi Moshayedi cbd4c77cdf Make VmHostSlice.enabled mean "not scheduled for destroy".
Previously, `VmHostSlice.enabled` was overloaded to mean both:
- The slice was prepared
- The slice was not scheduled for destruction

In old times, we waited for slice to be prepared before preparing the VM
inside it. We removed the “prepared” check in 428d367, so tracking
preparedness in a vm_host_slice column is no longer needed. The
“prepared” state can still be inferred from the Strand’s label if
necessary.

A slice is allocatable immediately upon creation (we already allocate
the first VM at creation time). When `slice.is_shared=false`, 2nd
allocation couldn't happen. When `slice.is_shared=true`, we waited until
the slice is prepared to allow the 2nd allocation. This isn't necessary.

The other use of `enabled` is to prevent new VM allocations once a slice
is scheduled for destruction. A slice is marked for destroy when its
last VM begins teardown.

-------------

Dropping the “prepared” purpose of `enabled` clarifies its intent and
fixes an edge case where unprepared slices could be left behind after
their final VM was deleted. Previously, `Nexus::destroy_slice` relied on
an `enabled: true → false` transition that never fired for unprepared
slices, leaving them orphaned. This could happen for example in cases
when a VM was destroyed before its slice was prepared.

Theoretically, there were few other ways to solve this issue. But this
change makes the system less complex in addition to solving the issue.
2025-07-15 16:54:14 -07:00
..
ai Have last exiting child schedule parent strand 2025-06-28 03:30:43 +09:00
aws Improve VPC and NIC operations idempotency 2025-07-09 14:49:06 +02:00
dns_zone Fix missed query parameterization in specs 2025-05-02 08:25:31 +09:00
github Make cache entry clean up more explicit while destroying a repository 2025-06-18 10:19:00 +03:00
kubernetes Add new semaphore for full mesh connectivity between k8s worker nodes 2025-07-15 10:57:25 +02:00
minio Have last exiting child schedule parent strand 2025-06-28 03:30:43 +09:00
postgres Stop postgres in smart mode as part of fencing 2025-07-07 19:11:45 +03:00
storage Cleanup the daemon after setting up VhostBlockBackend. 2025-07-10 10:10:09 -07:00
test Rename E2E CI script and variable 2025-07-06 09:20:59 +03:00
victoria_metrics Use ip6 helper while creating certificates for VictoriaMetricsServer 2025-07-07 10:52:33 +03:00
vm Make VmHostSlice.enabled mean "not scheduled for destroy". 2025-07-15 16:54:14 -07:00
vnet Don't perform any work for subnet and nics in wait if aws? 2025-07-07 11:15:08 +02:00
base_spec.rb Combine donate into reap 2025-06-27 01:40:47 +09:00
bootstrap_rhizome_spec.rb Fix test spelling error 2025-02-13 15:15:25 -08:00
check_usage_alerts_spec.rb Remove all skip_if_frozen{_models} calls in the specs 2024-10-30 12:08:24 -07:00
download_boot_image_spec.rb Change rubocop TargetRubyVersion to 3.4 2025-04-26 06:51:19 +09:00
download_cloud_hypervisor_spec.rb Add create_vm_host spec helper 2025-02-03 08:34:22 +03:00
download_firmware_spec.rb Add create_vm_host spec helper 2025-02-03 08:34:22 +03:00
expire_project_invitations_spec.rb Expire project invitation after 7 days 2024-09-10 19:21:45 +03:00
heartbeat_spec.rb Call original Clog.emit message when mocking in the tests 2025-05-31 01:20:38 +09:00
install_dnsmasq_spec.rb Have last exiting child schedule parent strand 2025-06-28 03:30:43 +09:00
install_rhizome_spec.rb Re-enable Rhizome Validation 2024-11-04 13:53:55 +02:00
learn_cpu_spec.rb Fix learning total_dies in arm64. 2024-11-22 12:08:50 -08:00
learn_memory_spec.rb Clean up nap/hop/exit expectations in specs 2023-10-31 18:04:34 +03:00
learn_network_spec.rb Clean up nap/hop/exit expectations in specs 2023-10-31 18:04:34 +03:00
learn_os_spec.rb Save OS version for VmHost 2024-11-21 11:50:30 -08:00
learn_pci_spec.rb Change rubocop TargetRubyVersion to 3.4 2025-04-26 06:51:19 +09:00
learn_storage_spec.rb Change rubocop TargetRubyVersion to 3.4 2025-04-26 06:51:19 +09:00
log_vm_host_utilizations_spec.rb Update location references with foreign key in the controlplane 2025-03-23 15:48:19 +01:00
page_nexus_spec.rb Change rubocop TargetRubyVersion to 3.4 2025-04-26 06:51:19 +09:00
redeliver_github_failures_spec.rb Use Time.utc instead of Time.parse in tests 2025-04-30 16:44:32 +03:00
remove_boot_image_spec.rb Add create_vm_host spec helper 2025-02-03 08:34:22 +03:00
resolve_globally_blocked_dnsnames_spec.rb Remove all skip_if_frozen{_models} calls in the specs 2024-10-30 12:08:24 -07:00
rotate_ssh_key_spec.rb Add tests for Prog::RotateSshKey 2023-08-07 09:44:56 +03:00
rotate_storage_kek_spec.rb Change rubocop TargetRubyVersion to 3.4 2025-04-26 06:51:19 +09:00
setup_grafana_spec.rb Have last exiting child schedule parent strand 2025-06-28 03:30:43 +09:00
setup_hugepages_spec.rb Change the hugepages arithmetic. 2024-02-27 11:34:14 -08:00
setup_nftables_spec.rb Start using nftables at host to block unused ip addresses 2024-02-21 11:40:20 +01:00
setup_node_exporter_spec.rb Add node_exporter installation prog to VmHost 2025-06-25 10:59:23 +02:00
setup_sysstat_spec.rb Install Sysstat. 2023-11-10 12:54:43 -08:00
test_smoke_spec.rb Add respirate smoke test 2025-05-31 01:20:38 +09:00
validate_vat_spec.rb Send an email if the validated VAT is invalid 2025-03-19 09:46:45 +03:00