[
https://issues.jboss.org/browse/JBIDE-10676?page=com.atlassian.jira.plugi...
]
Andre Dietisheim commented on JBIDE-10676:
------------------------------------------
The bad part for us is that there's no way to query the app for its availability once
it is created. We are currently offering IApplication#waitForAccessible which is not
possible if the application object is created from application infos (which we get by
querying the user info).
OpenShift java client assumes that the app is available when it gets
404
------------------------------------------------------------------------
Key: JBIDE-10676
URL:
https://issues.jboss.org/browse/JBIDE-10676
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: openshift
Affects Versions: 3.3.0.M5
Reporter: Andre Dietisheim
Assignee: Andre Dietisheim
Fix For: 3.3.0.Beta1
The java client currently assumes that the app has become available as soon as it gets
accessible by its DNS-name.
OpenShiftService#waitForApplication:
{code}
while (response == null
&& System.currentTimeMillis() < startTime + timeout) {
try {
Thread.sleep(APPLICATION_WAIT_DELAY);
response = client.get();
} catch (InternalServerErrorException e) {
return true;
} catch (BadRequestException e) {
return true;
} catch (NotFoundException e) {
return true;
} catch (HttpClientException e) {
// not available yet
}
}
{code}
Talking to the guys on libra I found out that it's not. The rhc-tools also consider
the response code
(
https://github.com/openshift/os-client-tools/blob/master/express/lib/rhc-...):
{code}
begin
response = net_http.get_response(url)
rescue Exception => e
response = nil
end
if !response.nil? && response.code == "200" &&
response.body[0,1] == "1"
puts CLEAR_LINE + "Confirming application '#{app_name}' is
available: Success!"
puts ""
puts "#{app_name} published: http://#{fqdn}/"
puts "git url: #{git_url}"
if @mydebug
unless no_git
puts "To make changes to '#{app_name}', commit to
#{repo_dir}/."
else
puts <<LOOKSGOOD
To make changes to '#{app_name}', you must first clone it with:
git clone #{git_url}
LOOKSGOOD
puts "Then run 'git push' to update your OpenShift Express
space."
end
end
if result && !result.empty?
puts "#{result}"
end
return true
end
if !response.nil? && @mydebug
puts "Server responded with #{response.code}"
puts response.body unless response.code == '503'
end
puts " sleeping #{sleep_time} seconds" if @mydebug
sleep sleep_time
sleep_time = delay(sleep_time)
end
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira