Bug #18562

Updated by Ward Vandewege 6 months ago

The RailsAPI changes applies the default config value for the preemptible flag whenever a container record is loaded. This causes problems when the config value is changed after a container record has been created and before it is done.

Case in point, if a-d-c tries to cancel (sends State=Cancelled) a container that was created when the config said `UsePreemptible: true` and meanwhile the config is changed to `UsePreemptible: false`, RailsAPI fails validation and returns a 422 on the cancel request.

RailsAPI should only set/change the `Preemptible` flag in one place, maybe when the container is created or when it is committed.

Back