ubicloud/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 Absorb leaf into reap 2025-06-26 03:49:53 +09:00
aws Pick random AZ for AWS subnets 2025-07-10 21:16:16 +03:00
dns_zone Change rubocop TargetRubyVersion to 3.4 2025-04-26 06:51:19 +09:00
github Allow 100GB of free cache storage if premium runners are enabled 2025-06-21 11:18:22 +03:00
kubernetes Add new semaphore for full mesh connectivity between k8s worker nodes 2025-07-15 10:57:25 +02:00
minio Absorb leaf into reap 2025-06-26 03:49:53 +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 Pass JIT config via file to runner script 2025-07-08 14:06:34 +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.rb Use FOR NO KEY UPDATE instead of FOR UPDATE 2025-07-04 09:26:06 +09:00
bootstrap_rhizome.rb Terminate SSH sessions promptly and their processes 2025-02-13 15:15:25 -08:00
check_usage_alerts.rb Add usage alerting based on the total consumption 2024-04-22 16:00:57 +02:00
download_boot_image.rb Use a constant for the boot image hash 2025-07-15 01:50:09 +09:00
download_cloud_hypervisor.rb Replace CloudHypervisor 45.0 hashes with 46.0 in Prog::DownloadCloudHypervisor 2025-07-11 05:14:41 +09:00
download_firmware.rb Add Prog to download firmware from control plane 2024-05-24 15:32:00 +02:00
expire_project_invitations.rb Change rubocop TargetRubyVersion to 3.4 2025-04-26 06:51:19 +09:00
heartbeat.rb Add missing service logging to heartbeat 2024-03-29 11:15:53 -07:00
install_dnsmasq.rb Absorb leaf into reap 2025-06-26 03:49:53 +09:00
install_rhizome.rb Change rubocop TargetRubyVersion to 3.4 2025-04-26 06:51:19 +09:00
learn_cpu.rb Fix learning total_dies in arm64. 2024-11-22 12:08:50 -08:00
learn_memory.rb Add an identifier to all Prog label methods 2023-08-23 12:09:57 +03:00
learn_network.rb Increase the IPv6 prefix min length to 112 bits 2024-09-27 11:21:33 +02:00
learn_os.rb Save OS version for VmHost 2024-11-21 11:50:30 -08:00
learn_pci.rb Learn about PCI devices of a host 2024-05-07 16:10:05 +02:00
learn_storage.rb Store device id instead of device name for StorageDevices 2025-02-28 13:58:51 +01:00
log_vm_host_utilizations.rb Update rubocop version 2025-04-24 08:16:51 +03:00
page_nexus.rb Change rubocop TargetRubyVersion to 3.4 2025-04-26 06:51:19 +09:00
redeliver_github_failures.rb Increase the frequency of redeliveries for failed GitHub webhook events 2025-03-25 14:16:06 +03:00
remove_boot_image.rb Program to remove a boot image. 2024-05-16 09:32:05 -07:00
resolve_globally_blocked_dnsnames.rb Better NetAddr/Sequel integration 2025-06-12 07:32:57 +09:00
rotate_ssh_key.rb Add an identifier to all Prog label methods 2023-08-23 12:09:57 +03:00
rotate_storage_kek.rb Remove unnecessary transactions in progs 2025-02-11 10:05:55 +03:00
setup_grafana.rb Absorb leaf into reap 2025-06-26 03:49:53 +09:00
setup_hugepages.rb Change the hugepages arithmetic. 2024-02-27 11:34:14 -08:00
setup_nftables.rb Change rubocop TargetRubyVersion to 3.4 2025-04-26 06:51:19 +09:00
setup_node_exporter.rb Add node_exporter installation prog to VmHost 2025-06-25 10:59:23 +02:00
setup_sysstat.rb Install Sysstat. 2023-11-10 12:54:43 -08:00
test.rb Combine donate into reap 2025-06-27 01:40:47 +09:00
validate_vat.rb Send an email if the validated VAT is invalid 2025-03-19 09:46:45 +03:00