Skip to content

Commit

Permalink
Retry when server refuse connection during restart on SNO (openshift#…
Browse files Browse the repository at this point in the history
  • Loading branch information
liangxia authored Feb 23, 2022
1 parent 2abb7b8 commit 6d694a6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/openshift/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def exists?(user: nil, result: {}, quiet: false)
elsif result[:response] =~ /Unable to connect to the server/
logger.info(result[:response])
return false
elsif result[:response] =~ /connection to the server \S+ was refused - did you specify the right host or port/ && env.nodes.length == 1
logger.info(result[:response])
return false
else
# e.g. when called by user without rights to list Resource
raise "error getting #{self.class.name} '#{name}' existence: #{result[:response]}"
Expand Down

0 comments on commit 6d694a6

Please sign in to comment.