-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to delete host after disabling foreman_puppet (after using it) #331
Comments
Looks like the DB structures are not deleted correctly after the foreman_puppet plugin was in use for some time and the table fills up with data. |
Puppet was enabled by default when we installed F/K. After a few years I disabled the plugin and ran the command
according to the documentation. Also ran
to make sure all is cleaned out. However, I still find this in the Postgres DB:
And apparently an entry in that table prevents a host from being deleted, as the Puppet code (which I assume normally takes care of the cascaded delete) is no longer run. |
Which initial version of Foreman/Katello did you install? |
Ohhh... that was a long time ago, I think F 2.x and K 3.1? |
Ah, okay. Then the data was already there in the old Foreman and was ported to the plugin once you upgraded Foreman to 3.0. |
I had a look at the issue but it is somehow difficult to reproduce. Host and hostgroups are being deleted without any errors on my test system. What I found is that (for some reason I could NOT find), the foreman-maintain command that removes the puppet tables from the database (https://github.com/theforeman/foreman_maintain/blob/v1.0.x/definitions/procedures/puppet/remove_puppet.rb#L15) does not drop the tables for |
@ronnybremer Did you try to remove the I am not sure if we can reproduce your issue that easily. Do you remember which Foreman version you were on when removing Puppet? |
No, I only removed the offending records for the one host I tried to remove. The rest is still untouched. Furthermore, I only had a dependency issue with the host_puppet_facets table, but I also didn't try to delete a host group. |
I think it should be safe to remove the puppet facets tables. If you don't use Puppet and the rest of the plugin is gone anyways, they are no good. Could you check whether there are other artifacts from foreman_puppet that were not removed? Or you can simply post a list of the tables that are available in your setup if that is okay for you. |
@stejskalleos Could you find someone to test this issue? We could not reproduce. From my perspective, this seems to be a one-time issue with an older system that has used Puppet before transitioning to the foreman_puppet plugin but I'd like someone to double-check. |
https://community.theforeman.org/t/unable-to-delete-host-after-disabling-puppet/32112/8
The text was updated successfully, but these errors were encountered: