Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #4875 ## Problem After the IP pools migrations on the dogfood rack, the `default` pool was not marked `is_default=true` for the `oxide` silo when it should have been. ## Diagnosis When checking for silo-scoped default pools overriding a fleet-scoped default, I neglected to require that the silo-scoped defaults in question were non-deleted. This means that if there was a deleted pool with `silo_id=<oxide silo id>` and `is_default=true`, that would be considered an overriding default and leave us with `is_default=false` on the `default` pool. Well, I can't check `silo_id` and `is_default` on the pools because those columns have been dropped, but there is a deleted pool called `oxide-default` that says in the description it was meant as the default pool for only the `oxide` silo. ``` oot@[fd00:1122:3344:105::3]:32221/omicron> select * from omicron.public.ip_pool; id | name | description | time_created | time_modified | time_deleted | rcgen ---------------------------------------+--------------------+--------------------------------+-------------------------------+-------------------------------+-------------------------------+-------- 1efa49a2-3f3a-43ab-97ac-d38658069c39 | oxide-default | oxide silo-only pool - default | 2023-08-31 05:33:00.11079+00 | 2023-08-31 05:33:00.11079+00 | 2023-08-31 06:03:22.426488+00 | 1 ``` I think we can be pretty confident this is what got us. ## Fix Add `AND time_deleted IS NULL` to the subquery. ## Mitigation in existing systems Already done. Dogfood is the only long-running system where the bad migration ran, and all I had to do there was use the API to set `is_default=true` for the (`default` pool, `oxide` silo) link.
- Loading branch information