Project

General

Profile

Actions

Bug #29962

closed

Known hosts key removal may fail hard, preventing host from being provisioned

Added by Adam Ruzicka about 5 years ago. Updated about 4 years ago.

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

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1841143

Description of problem:
One of the cases is when provisioning a host on a compute resource. It may happen that the host has no ip, the orchestration is triggered and we schedule a task to remove ssh key where target is nil. This causes the step to fail due to Nil to String conversion error and everything halts.

Version-Release number of selected component (if applicable):
satellite
tfm-rubygem-foreman_remote_execution-3.2.1-1.el7sat.noarch
tfm-rubygem-smart_proxy_remote_execution_ssh-0.3.0-2.fm2_1.el7sat.noarch
foreman-2.1.0-0.21.rc1.el7sat.noarch
satellite-6.8.0-0.3.beta.el7sat.noarch

How reproducible:

Steps to Reproduce:
1. Try provision vm on azure

Actual results:
Orchestration fails with
2020-05-28T07:55:55 [W|app|8a383ac1] Rolling back due to a problem: [#<Orchestration::Task:0x00007f246d043c90 @name="Remove SSH known hosts for jane-cardosa.vms.sat.rdu2.redhat.com", @id="ssh_remove_known_hosts_interface__1", @status="failed", @priority=200, @action=[#<Nic::Managed id: nil, mac: nil, ip: "20.185.225.245", type: "Nic::Managed", name: "jane-cardosa.vms.sat.rdu2.redhat.com", host_id: nil, subnet_id: nil, domain_id: 1, attrs: {}, created_at: nil, updated_at: nil, provider: nil, username: nil, password: nil, virtual: false, link: true, identifier: "", tag: "", attached_to: "", managed: true, mode: "balance-rr", attached_devices: "", bond_options: "", primary: true, provision: true, compute_attributes: {"network"=>"/subscriptions/c9e72ccc-b20e-48bd-a0c8-879c6dbcbfbb/resourceGroups/SATQE/providers/Microsoft.Network/virtualNetworks/SATQE-vnet/subnets/default", "public_ip"=>"Dynamic", "private_ip"=>"false"}, execution: true, ip6: "", subnet6_id: nil>, :drop_from_known_hosts, [1, nil]], @created=1590666780.343922, @timestamp=2020-05-28 11:55:55 UTC>]

Expected results:
VM is provisioned

Additional info:

Actions #1

Updated by The Foreman Bot about 5 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/501 added
Actions #2

Updated by The Foreman Bot about 5 years ago

  • Fixed in Releases foreman_remote_execution 3.3.1 added
Actions #3

Updated by Adam Ruzicka about 5 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Adam Ruzicka almost 5 years ago

  • Subject changed from Known hosts key removal may fail hard, preventing host from being provisioned to Known hosts key removal may fail hard, preventing host from being provisioned
  • Fixed in Releases foreman_remote_execution 3.2.2 added
Actions #5

Updated by Tomer Brisker about 4 years ago

  • Bugzilla link changed from 1841143 to 1942366
Actions #6

Updated by Tomer Brisker about 4 years ago

  • Bugzilla link changed from 1942366 to 1841143
Actions

Also available in: Atom PDF