Bug 951121

Summary: Login screen is presented to user before system is capable of signing in
Product: [JBoss] JBoss Operations Network Reporter: Alan Santos <asantos>
Component: UIAssignee: John Mazzitelli <mazz>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: high    
Version: JON 3.2CC: ahovsepy, ccrouch, kejohnso, mazz, myarboro
Target Milestone: DR09   
Target Release: JON 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
login error message when server is still starting up none

Description Alan Santos 2013-04-11 14:01:48 UTC
Description of problem:

When launching the server the login form is available and enabled before the system is capable of logging in with the account.  Entering valid credentials results in an erroneous error message indicating invalid credentials.

Version-Release number of selected component (if applicable):


How reproducible:
every time. 

Steps to Reproduce:
1. Launch server
2. Open UI
3. Login
  

Additional info:

A 'please wait' message of some sort and not displaying a login form until the system is capable of doing so would be nice.

Comment 1 John Mazzitelli 2013-04-29 21:04:56 UTC
Created attachment 741677 [details]
login error message when server is still starting up

This one is more difficult than it appears. The issue is we want to trap when the server is still booting up, and not yet ready to accept login requests. But if the user attempts to log in before the EJB layer is even started, there's no RHQ code for us to call to ask if its still initializing (by this time, its not enough to know the web layer is accepting requests - because the web layer will accept requests well before RHQ's application code is ready). We also have to take into account the time when the server initially starts, but then is asked to reload once our startup service is asked to deploy the EAR - if you ask to login prior to the reload, the EAR isn't even deployed yet.

So, here's what I did. If you attempt to log in, and we find the RHQ app has not fully initialized or we failed to call the EJB layer entirely, we'll put a message in the login screen that says "The server is currently starting up. Please wait for it to fully initialize before attempting to log in." (see attached screenshot). This was doable without having to change much of the login code, thus wasn't as risky as some other potential solutions.

So we are now able to tell the user the server is starting and to wait before attempting to log in again. While not quite as nice as simply not showing the login screen until such time as when the user will be able to can successfully log in, it does inform the user that the server is still booting and it does this without introducing too much churn in the code which hopefully minimizes the risk to breaking the authentication/login code.

git commit to master: ca17805

Comment 2 Simeon Pinder 2013-07-02 20:33:39 UTC
This bz is available for testing with the latest 3.2.x brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=280316

Comment 3 Armine Hovsepyan 2013-08-20 12:52:21 UTC
login layer is visible only after server has finished installation and RHQ -${version} (build ${id}) Server started is logged.