[Katello 3.15] Cannot delete host

Recently upgraded to katello 3.15. With the exception of a fixed pulp issue, so far so good. But now I have a host that I simply can NOT delete. I try deleting it… it SAYS it’s deleting the host… but then, it’s still there.

The host is gone, so I’d really like it out of katello.! Any help appreciated, even if I need to manually wipe records out of postgres. I am unsure what log(s) to look for for any errrors.

Hello @caseybea,

Can you check to see if the task monitor page shows any errors related to the host deletion?

James

When I do a delete content-host— it says success. Also says so in the tasks.

When I delete the host itself… I get an error, “failed to delete host”. No errors in the tasks.

When I BULK DELETE it from the all hosts list, it says “success”.

No matter what I do the host still remains.

Can you post a paste of your production log of the failed delete?

Here you go, I finally see the error now.

2020-06-22T13:42:11 [W|app|b1fb64aa] ERF12-6886 [ProxyAPI::ProxyException]: Unable to remove host from known hosts ([TypeError]: no implicit convrsion of nil into String) for proxy https://katello.ctsi.mcw.edu:9090/ssh
2020-06-22T13:42:11 [W|app|b1fb64aa] Rolling back due to a problem: [#<Orchestration::Task:0x00007ff8232191c0 @name=“Remove SSH known hosts for hyes.rgd.mcw.edu”, @id=“ssh_remove_known_hosts_interface__1”, @status=“failed”, @priority=200, @action=[#<Nic::Bond id: 644, mac: “00:21:9b:a7:72:c”, ip: nil, type: “Nic::Bond”, name: “hayes.rgd.mcw.edu”, host_id: 158, subnet_id: nil, domain_id: nil, attrs: {}, created_at: “2020-05-28 14:5025”, updated_at: “2020-06-02 17:07:39”, provider: nil, username: nil, password: nil, virtual: true, link: true, identifier: “eno1”, tag: “”, attahed_to: “”, managed: true, mode: “balance-rr”, attached_devices: “”, bond_options: “”, primary: true, provision: true, compute_attributes: {}, ip: nil, subnet6_id: nil, execution: true>, :drop_from_known_hosts, [1, nil]], @created=1592851331.0785816, @timestamp=2020-06-22 18:42:11 UTC>]
2020-06-22T13:42:11 [W|app|b1fb64aa] Failed to perform rollback on Remove SSH known hosts for - Dont know how to rollback drop_from_known_hosts
2020-06-22T13:42:11 [I|app|b1fb64aa] Processed 1 tasks from queue ‘Host::Managed Main’, completed 0/2
2020-06-22T13:42:11 [E|app|b1fb64aa] Task 'Remove SSH known hosts for ’ rollbacked
2020-06-22T13:42:11 [E|app|b1fb64aa] Task ‘Remove SSH known hosts for hayes.rgd.mcw.edu’ failed
2020-06-22T13:42:11 [E|app|b1fb64aa] Failed to save:
2020-06-22T13:42:11 [I|app|b1fb64aa] Redirected to https://katello.ctsi.mcw.edu/hosts/hayes.rgd.mcw.edu
2020-06-22T13:42:11 [I|app|b1fb64aa] Completed 302 Found in 531ms (ActiveRecord: 50.0ms)
2020-06-22T13:42:11 [I|app|113fce66] Started GET “/hosts/hayes.rgd.mcw.edu” for 141.106.28.62 at 2020-06-22 13:42:11 -0500
2020-06-22T13:42:11 [I|app|113fce66] Processing by HostsController#show as HTML
2020-06-22T13:42:11 [I|app|113fce66] Parameters: {“id”=>“hayes.rgd.mcw.edu”}
2020-06-22T13:42:11 [I|app|113fce66] Rendering hosts/show.html.erb within layouts/application
2020-06-22T13:42:11 [I|app|113fce66] Rendered hosts/show.html.erb within layouts/application (20.5ms)
2020-06-22T13:42:11 [I|app|113fce66] Rendered layouts/_application_content.html.erb (0.5ms)
2020-06-22T13:42:11 [I|app|113fce66] Rendering layouts/base.html.erb
2020-06-22T13:42:11 [I|app|113fce66] Rendered layouts/base.html.erb (18.8ms)
2020-06-22T13:42:11 [I|app|113fce66] Completed 200 OK in 57ms (Views: 38.6ms | ActiveRecord: 5.8ms)
2020-06-22T13:42:11 [I|app|e07e6e0b] Started GET “/notification_recipients” for 141.106.28.62 at 2020-06-22 13:42:11 -0500
2020-06-22T13:42:11 [I|app|e07e6e0b] Processing by NotificationRecipientsController#index as JSON
2020-06-22T13:42:11 [I|app|e07e6e0b] Completed 200 OK in 12ms (Views: 0.1ms | ActiveRecord: 0.9ms)
2020-06-22T13:42:11 [I|app|a8799e43] Started GET “/hosts/hayes.rgd.mcw.edu/overview” for 141.106.28.62 at 2020-06-22 13:42:11 -0500
2020-06-22T13:42:11 [I|app|45794506] Started GET “/hosts/hayes.rgd.mcw.edu/nics” for 141.106.28.62 at 2020-06-22 13:42:11 -0500
2020-06-22T13:42:11 [I|app|8ae46ea6] Started GET “/hosts/hayes.rgd.mcw.edu/runtime?range=7” for 141.106.28.62 at 2020-06-22 13:42:11 -0500
2020-06-22T13:42:11 [I|app|a8799e43] Processing by HostsController#overview as HTML
2020-06-22T13:42:11 [I|app|a8799e43] Parameters: {“id”=>“hayes.rgd.mcw.edu”}
2020-06-22T13:42:11 [I|app|8ae46ea6] Processing by HostsController#runtime as HTML
2020-06-22T13:42:11 [I|app|8ae46ea6] Parameters: {“range”=>“7”, “id”=>“hayes.rgd.mcw.edu”}
2020-06-22T13:42:11 [I|app|45794506] Processing by HostsController#nics as HTML
2020-06-22T13:42:11 [I|app|45794506] Parameters: {“id”=>“hayes.rgd.mcw.edu”}
2020-06-22T13:42:11 [I|app|20657ab4] Started GET “/hosts/hayes.rgd.mcw.edu/resources?range=7” for 141.106.28.62 at 2020-06-22 13:42:11 -0500
2020-06-22T13:42:11 [I|app|8ae46ea6] Rendered hosts/_runtime.html.erb (1.5ms)
2020-06-22T13:42:11 [I|app|8ae46ea6] Completed 200 OK in 13ms (Views: 1.6ms | ActiveRecord: 2.4ms)
2020-06-22T13:42:11 [I|app|45794506] Rendered hosts/_nics.html.erb (2.7ms)
2020-06-22T13:42:11 [I|app|45794506] Completed 200 OK in 14ms (Views: 2.7ms | ActiveRecord: 2.9ms)
2020-06-22T13:42:11 [I|app|a8799e43] Rendered hosts/_overview.html.erb (13.4ms)
2020-06-22T13:42:11 [I|app|a8799e43] Completed 200 OK in 24ms (Views: 11.6ms | ActiveRecord: 4.3ms)
2020-06-22T13:42:11 [I|app|20657ab4] Processing by HostsController#resources as HTML
2020-06-22T13:42:11 [I|app|20657ab4] Parameters: {“range”=>“7”, “id”=>“hayes.rgd.mcw.edu”}
2020-06-22T13:42:11 [I|app|20657ab4] Rendered hosts/_resources.html.erb (4.1ms)
2020-06-22T13:42:11 [I|app|20657ab4] Completed 200 OK in 175ms (Views: 7.0ms | ActiveRecord: 11.8ms)
2020-06-22T13:42:21 [I|app|846e856b] Started GET “/notification_recipients” for 141.106.28.62 at 2020-06-22 13:42:21 -0500
2020-06-22T13:42:21 [I|app|846e856b] Processing by NotificationRecipientsController#index as JSON
2020-06-22T13:42:21 [I|app|846e856b] Completed 200 OK in 9ms (Views: 0.1ms | ActiveRecord: 1.0ms)
2020-06-22T13:42:31 [I|app|97e4b4dd] Started GET “/notification_recipients” for 141.106.28.62 at 2020-06-22 13:42:31 -0500
2020-06-22T13:42:31 [I|app|97e4b4dd] Processing by NotificationRecipientsController#index as JSON
2020-06-22T13:42:31 [I|app|97e4b4dd] Completed 200 OK in 6ms (Views: 0.1ms | ActiveRecord: 1.0ms)

@caseybea it looks like this is an issue recently observed and discussed at Unable to delete host from Foreman getting an error

The resolution is an update to Foreman remote execution 3.3.1, which should be available in the near future.

Any idea what upcoming katello version that might be rolled up into? Thank you so much, happy to know I’ll eventually be able to delete the bugger :slight_smile:

@caseybea I am checking with the foreman-dev IRC to figure out if there is a specific foreman/katello version that you should look for. As soon as I know, I’ll update here.

According to the foreman-dev IRC conversation from yesterday the foreman-remote-execution plugin isn’t tied to any particular version of foreman or katello. You can install version 3.3.1 alongside katello 3.15 AFAIK.

In a way we have this version connection. On https://yum.theforeman.org/ we have Foreman x.y and a plugins x.y. Katello requires Foreman x.y so that’s how you have the connection.

If a cherry pick is needed, https://github.com/theforeman/foreman-packaging is where we do so. There’s rpm/x.y you can pick to. Usually @aruzicka is quite active with this.

It’s discouraged to take RPMs from other repositories since there may be incompatibilities.

Sorry for the delay, here are the CPs for 2.0:

I am pleased to report that this issue is now resolved for me; the following RPM finally showed up in my regular yum updates (meaning, it’s now out there in the foreman public repos):

tfm-rubygem-foreman_remote_execution.noarch 0:3.2.2-1.fm2_0

After updating (and restarting services to be safe), I was finally able to delete the host that I could not remove earlier.