Instance updates from clients that still send the deprecated InstanceNetworkConfig.auto field should keep working when Core already has the instance's auto_config. Today the allocation path translates that legacy field but the update path does not, so Core can mistake an omitted replacement field for a request to change immutable network configuration.
What this involves
- Teach
update_instance_config to preserve the stored auto_config only for a legacy auto=true request that omits auto_config, before the RPC request is converted into InstanceConfig.
- Use the instance's existing configuration as the source of truth instead of looking the VPC back up through its
HostInband network segment; Flat segments are allowed to be unbound.
- Keep explicit requests and the existing immutability checks authoritative -- don't overwrite a supplied
auto_config, enable automatic networking on a non-auto instance, or accept explicit interfaces alongside legacy automatic networking.
- Add regression coverage for the compatible update and rejection cases, including an instance whose Flat segment has no VPC binding.
Instance updates from clients that still send the deprecated
InstanceNetworkConfig.autofield should keep working when Core already has the instance'sauto_config. Today the allocation path translates that legacy field but the update path does not, so Core can mistake an omitted replacement field for a request to change immutable network configuration.What this involves
update_instance_configto preserve the storedauto_configonly for a legacyauto=truerequest that omitsauto_config, before the RPC request is converted intoInstanceConfig.HostInbandnetwork segment; Flat segments are allowed to be unbound.auto_config, enable automatic networking on a non-auto instance, or accept explicit interfaces alongside legacy automatic networking.