Closed agrare closed 1 month ago
Okay I ran a live test on a master appliance build with this applied and I enable the embedded_terraform role first then set the container_image later and confirmed the failed workers are marked stopped and later deleted and then after the container_image setting is set properly the next time the worker starts up it pulls the correct image. Taking out of WIP
Backported to radjabov
in commit e6e6c81e8cceafbbb2be8ee4852c8aaf8bf23867.
commit e6e6c81e8cceafbbb2be8ee4852c8aaf8bf23867
Author: Jason Frey <fryguy9@gmail.com>
Date: Fri Sep 27 16:04:07 2024 -0400
Merge pull request #23182 from agrare/mark_workers_for_failed_units_stopped
Mark workers associated with failed systemd units as stopped
(cherry picked from commit de72e9e6b5d67e724113fd6852ec31867fada811)
If we start a systemd unit and it fails this can leave the miq_worker record associated with it in "creating" without ever being cleaned up.
When we stop and cleanup any failed systemd units we should also mark any associated miq-worker records as stopped so that they can be cleaned up by the
clean_worker_records
method.TODO
Fixes https://github.com/ManageIQ/manageiq-providers-embedded_terraform/issues/59