Description of problem: If I try to detect the undercloud from a new deployment, and the undercloud director's httpd service is down for some reason, then I get the error message: "Error: The Undercloud is not accessible. Please check that the address specified is your Undercloud's provisioning interface, you have logged in and run fusor-undercloud-installer on the Undercloud, and that it can be reached by your RHCI server." This error message is given *after* the fusor server has *successfully* ssh'ed to the undercloud, but it then fails to connect to port 80 on the undercloud. This error message should specify that connectivity to httpd is the problem. Version-Release number of selected component (if applicable): QCI-1.1-RHEL-7-20160428.t.0 How reproducible: 100% Steps to Reproduce: 1.) Stop httpd service on undercloud. 2.) Verify ssh connectivity from fusor to undercloud. 3.) See unhelpful error message when trying to detect undercloud from new deployment. Actual results: Error message suggests steps that have all been done. Expected results: Error message specifies that SSH was successful, but pinging TCP port 80 failed. Additional info: Relevant code is in: ./fusor_server-0.0.1/app/controllers/fusor/api/openstack/underclouds_controller.rb: def create underhost = params[:underhost] underuser = params[:underuser] underpass = params[:underpass] ssh = Egon::Undercloud::SSHConnection.new(underhost, underuser, underpass) io = StringIO.new ssh.execute("sudo hiera admin_password", io) admin = io.string.strip if admin.include?('failed') || admin.include?('error') || admin.include?('fingerprint') render json: {errors: admin}, status: 422 else io = StringIO.new ssh.execute("sudo hiera controller_host", io) ip_addr = io.string.strip # This is deplorable, but the undercloud services only listen on the # provisioning network, which may or may not be accessible from here. # See if it is, and if not then throw an error saying so and suggesting # a possible workaround. # See bug https://bugzilla.redhat.com/show_bug.cgi?id=1255412 routable = tcp_pingable?(ip_addr) if !routable render(json: {errors: "Error: The Undercloud is not accessible. Please check that the address specified"\ " is your Undercloud's provisioning interface, you have logged in and run fusor-undercloud-installer"\ " on the Undercloud, and that it can be reached by your RHCI server."}, status: 422) #system('sudo route add ' + ip_addr + ' via ' + underhost) [...] def tcp_pingable?(ip) # This code is from net-ping, and stripped down for use here # We don't need all the ldap dependencies net-ping brings in @service_check = true @port = 80 @timeout = 1 @exception = nil bool = false tcp = nil begin Timeout.timeout(@timeout) do begin tcp = TCPSocket.new(ip, @port) rescue Errno::ECONNREFUSED => err if @service_check bool = false else @exception = err end rescue StandardError => err @exception = err else bool = true end end rescue Timeout::Error => err @exception = err ensure tcp.close if tcp end bool end end end end end
QCI has sunset. Closing the BZ's