I will start out with we probably screwed up somewhere on the way to here so looking for some advice.
We recently completed a migration from 1.22 to 3.3 and are going through retesting all of our work flows. When upgrading to 1.24 we hit an issue with tfm-proxy + the “hosts” page. Looking back my notes could have been better.
It started with Node.rb failing to find node after upgrade to 1.24.3 - #5 by SugoiTamago . At the time, we had tried to get remote execution working previously but had not finished (internal auth stuff) and a decision was made to just remove the plugin and get things working. This decision came from following links to Bug #27746: remove taxonomy enabled checks - Foreman Remote Execution - Foreman and Remote execution error "" 1: Failed to initialize: NoMethodError - undefined method `enabled_taxonomies' for #<Class:0x000000000a1a89c0> 2: Did you mean? enable_auditing - #3 by Felipe_Aguiar2 .
This made things happy with the installer, but had an issue with the “hosts” page presenting “The single-table inheritance mechanism failed to locate the subclass: HostStatus::ExecutionStatus”. To clean this up and keep things running we opted to run delete from host_status where type = 'HostStatus::ExecutionStatus';
.
From here things went okay upgrading the rest of the way to 3.3. However we don’t delete hosts often and knowing we had to step several versions decided not to exercise all workflows until the end. This brings us to being unable to delete hosts and lines up with the issues described in Error when try to delete a host via GUI or foreman-rake console - #4 by infomatico .
So the question is how do we “recover” from this mis-step. Trying to reinstall the plugin via the installer throws issues with migrations. My quick thought is to manually review/apply migrations starting from Aug 2019 to present at which point we should be able to have the installer successfully re-install the plugin (desired end state).
Output from migrate and error on delete attached.
tfm-rex.txt.log (23.5 KB)
OS: CentOS 7.9 (started at 7.6)
TFM: 3.3.0 (started at 1.22.2)