modules/mu/cloud.rb in cloud-mu-3.0.0 vs modules/mu/cloud.rb in cloud-mu-3.0.1

- old
+ new

@@ -1140,10 +1140,34 @@ end # Remove all metadata and cloud resources associated with this object def destroy + if self.class.cfg_name == "server" + begin + ip = canonicalIP + MU::MommaCat.removeIPFromSSHKnownHosts(ip) if ip + if @deploy and @deploy.deployment and + @deploy.deployment['servers'] and @config['name'] and + me = @deploy.deployment['servers'][@config['name']][@mu_name] + if me + ["private_ip_address", "public_ip_address"].each { |field| + if me[field] + MU::MommaCat.removeIPFromSSHKnownHosts(me[field]) + end + } + if me["private_ip_list"] + me["private_ip_list"].each { |ip| + MU::MommaCat.removeIPFromSSHKnownHosts(ip) + } + end + end + end + rescue MU::MuError => e + MU.log e.message, MU::WARN + end + end if !@cloudobj.nil? and !@cloudobj.groomer.nil? @cloudobj.groomer.cleanup elsif !@groomer.nil? @groomer.cleanup end @@ -1950,10 +1974,11 @@ :config => false, :keys_only => true, :keys => [ssh_keydir+"/"+nat_ssh_key, ssh_keydir+"/"+@deploy.ssh_key_name], :verify_host_key => false, # :verbose => :info, + :host_key => "ssh-rsa", :port => 22, :auth_methods => ['publickey'], :proxy => proxy ) else @@ -1965,9 +1990,10 @@ :config => false, :keys_only => true, :keys => [ssh_keydir+"/"+@deploy.ssh_key_name], :verify_host_key => false, # :verbose => :info, + :host_key => "ssh-rsa", :port => 22, :auth_methods => ['publickey'] ) end retries = 0