Project

General

Profile

Actions

Bug #30503

closed

Failed to perform rollback on Remove SSH known hosts

Added by Leos Stejskal over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Difficulty:
Triaged:
No
Found in Releases:

Description

Removing host with minimum information (only with name) ends with error:

Failed to perform rollback on Remove SSH known hosts for centos.example.com - Dont know how to rollback drop_from_known_hosts

Steps to reproduce:
  • Create host via api:
    curl -X POST http://foreman.devv:3000/api/hosts \
     -H 'Content-Type: application/json' --user admin:changeme \
     -d '{"build": "false", "managed": "false", "organization_id": "1", "location_id": "2", "name": "new-host23.example.com"}'
    
  • Try to delete it in UI

Log:

2020-07-28T13:09:39 [I|app|e1967a8a] Started DELETE "/hosts/ubuntu.example.com" for 127.0.0.1 at 2020-07-28 13:09:39 +0200
2020-07-28T13:09:39 [I|app|e1967a8a] Processing by HostsController#destroy as HTML
2020-07-28T13:09:39 [I|app|e1967a8a]   Parameters: {"authenticity_token"=>"dB+IMzwduogak7zQ1mPBxpSnpiVYC0oPTlv0jl9TctVaePLAzJKUGRmkXNxxGjPpQfqzGWP2Y3lH7nJhO7ayXA==", "id"=>"ubuntu.example.com"}
2020-07-28T13:09:39 [D|app|e1967a8a] Scheduling SSH known_hosts cleanup
2020-07-28T13:09:39 [D|app|e1967a8a] Enqueued task 'ssh_remove_known_hosts_interface__1' to 'Host::Managed Main' queue
2020-07-28T13:09:39 [D|app|e1967a8a] Processing task 'Remove SSH known hosts for ubuntu.example.com' from 'Host::Managed Main'
2020-07-28T13:09:39 [I|app|e1967a8a] Processed 1 tasks from queue 'Host::Managed Main', completed 1/1
2020-07-28T13:09:39 [D|app|e1967a8a] Task 'Remove SSH known hosts for ubuntu.example.com' *completed*
2020-07-28T13:09:39 [D|app|e1967a8a] Scheduling SSH known_hosts cleanup
2020-07-28T13:09:39 [D|app|e1967a8a] Enqueued task 'ssh_remove_known_hosts_host_ubuntu.example.com_1' to 'Host::Managed Main' queue
2020-07-28T13:09:39 [D|app|e1967a8a] Processing task 'Remove SSH known hosts for ubuntu.example.com' from 'Host::Managed Main'
2020-07-28T13:09:40 [W|app|e1967a8a] ERF12-6886 [ProxyAPI::ProxyException]: Unable to remove host from known hosts ([RestClient::NotFound]: 404 Not Found) for proxy http://localhost:8000/ssh
2020-07-28T13:09:40 [W|app|e1967a8a] Rolling back due to a problem: [#<Orchestration::Task:0x00007fdc14c47870 @name="Remove SSH known hosts for ubuntu.example.com", @id="ssh_remove_known_hosts_host_ubuntu.example.com_1", @status="failed", @priority=200, @action=[#<Host::Managed id: 1023, name: "ubuntu.example.com", last_compile: nil, last_report: nil, updated_at: "2020-07-27 07:48:50", created_at: "2020-07-27 07:48:50", root_pass: nil, architecture_id: nil, operatingsystem_id: nil, environment_id: nil, ptable_id: nil, medium_id: nil, build: false, comment: nil, disk: nil, installed_at: nil, model_id: nil, hostgroup_id: nil, owner_id: 4, owner_type: "User", enabled: true, puppet_ca_proxy_id: nil, managed: false, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: nil, puppet_proxy_id: nil, certname: nil, image_id: nil, organization_id: 1, location_id: nil, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: nil, grub_pass: "", global_status: 0, lookup_value_matcher: [FILTERED], pxe_loader: nil, initiated_at: nil, build_errors: nil>, :drop_from_known_hosts, 1], @created=1595934579.4660296, @timestamp=2020-07-28 11:09:40 UTC>]
2020-07-28T13:09:40 [W|app|e1967a8a] Failed to perform rollback on Remove SSH known hosts for ubuntu.example.com - Dont know how to rollback drop_from_known_hosts
2020-07-28T13:09:40 [I|app|e1967a8a] Backtrace for 'Failed to perform rollback on Remove SSH known hosts for ubuntu.example.com - Dont know how to rollback drop_from_known_hosts' error (RuntimeError): Dont know how to rollback drop_from_known_hosts
 e1967a8a | /home/lstejskal/Projects/foreman/app/models/concerns/orchestration.rb:221:in `execute'
 e1967a8a | /home/lstejskal/Projects/foreman/app/models/concerns/orchestration.rb:198:in `block in fail_queue'
 e1967a8a | /home/lstejskal/Projects/foreman/app/models/concerns/orchestration.rb:195:in `reverse_each'
 e1967a8a | /home/lstejskal/Projects/foreman/app/models/concerns/orchestration.rb:195:in `fail_queue'
 e1967a8a | /home/lstejskal/Projects/foreman/app/models/concerns/orchestration.rb:169:in `process'
 e1967a8a | /home/lstejskal/Projects/foreman/app/models/concerns/orchestration.rb:60:in `on_destroy'
 e1967a8a | /home/lstejskal/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:428:in `block in make_lambda'
 e1967a8a | /home/lstejskal/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:238:in `block in halting_and_conditional'
 e1967a8a | /home/lstejskal/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:517:in `block in invoke_after'
 e1967a8a | /home/lstejskal/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:517:in `each'
 e1967a8a | /home/lstejskal/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:517:in `invoke_after'
 e1967a8a | /home/lstejskal/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:136:in `run_callbacks'
 e1967a8a | /home/lstejskal/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activesupport-6.0.3.2/lib/active_support/callbacks.rb:825:in `_run_destroy_callbacks'
 e1967a8a | /home/lstejskal/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/callbacks.rb:309:in `destroy'
 e1967a8a | /home/lstejskal/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/transactions.rb:310:in `block in destroy'
 e1967a8a | /home/lstejskal/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/activerecord-6.0.3.2/lib/active_record/transactions.rb:375:in `block in with_transaction_returning_status'

Actions #1

Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Adam Ruzicka
  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/522 added
Actions #2

Updated by The Foreman Bot over 4 years ago

  • Fixed in Releases foreman_remote_execution 4.0.0 added
Actions #3

Updated by Adam Ruzicka over 4 years ago

  • Fixed in Releases foreman_remote_execution 3.3.5 added
Actions #4

Updated by Anonymous over 4 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF