[ 
https://issues.apache.org/jira/browse/HDDS-17115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Siyao Meng updated HDDS-17115:
------------------------------
    Description: 
* Add {{BaseHttpServer#addServiceServlet}} and {{setServiceReady()}}. Until the 
service is ready, those servlets return 503 with Retry-After, and the real 
servlet is not created or initialized, so it never sees partially constructed 
service state.
* Add {{StartupProgress.Step#setDone}} for progress read from existing counters 
(applied Raft index, safe mode rule counts).
* Move the datanode Startup Progress page (HDDS-17107) into the shared web 
assets so OM and SCM can reuse it.

h3. Implementation notes
The gate is a wrapper servlet, not a filter: Jetty initializes a servlet before 
the filters in front of it run, so a filter could not keep the real servlet 
from initializing early. The wrapper creates the real servlet on the first 
request after {{setServiceReady()}}. Authentication filters still run first, so 
unauthenticated requests are rejected as before.

h3. Dependencies
*Depends on HDDS-17107.* HDDS-17115.001.diff applies on top of the HDDS-17107 
change (https://github.com/apache/ozone/pull/11611), not on plain master. This 
change on its own only adds the gate; HDDS-17116 (SCM) and HDDS-17117 (OM) use 
it.

Testing: TestBaseHttpServer (new serviceServletAnswers503UntilReady), 
TestStartupProgress (new setDone); manual check of the datanode overview banner 
and Startup Progress page with Playwright.


  was:
* Add {{BaseHttpServer#addServiceServlet}} and {{setServiceReady()}}. A filter 
mapped to those servlets returns 503 with Retry-After until the service is 
ready, so the servlets are not initialized against partially constructed 
service state.
* Add {{StartupProgress.Step#setDone}} and a per-step baseline for the 
remaining time estimate, for progress read from existing counters (applied Raft 
index, safe mode rule counts).
* Move the datanode Startup Progress page (HDDS-17107) into the shared web 
assets so OM and SCM can reuse it.


> Add readiness gate for service servlets and shared startup progress page
> ------------------------------------------------------------------------
>
>                 Key: HDDS-17115
>                 URL: https://issues.apache.org/jira/browse/HDDS-17115
>             Project: Apache Ozone
>          Issue Type: Sub-task
>          Components: server-framework
>            Reporter: Siyao Meng
>            Priority: Major
>         Attachments: HDDS-17115.001.diff
>
>
> * Add {{BaseHttpServer#addServiceServlet}} and {{setServiceReady()}}. Until 
> the service is ready, those servlets return 503 with Retry-After, and the 
> real servlet is not created or initialized, so it never sees partially 
> constructed service state.
> * Add {{StartupProgress.Step#setDone}} for progress read from existing 
> counters (applied Raft index, safe mode rule counts).
> * Move the datanode Startup Progress page (HDDS-17107) into the shared web 
> assets so OM and SCM can reuse it.
> h3. Implementation notes
> The gate is a wrapper servlet, not a filter: Jetty initializes a servlet 
> before the filters in front of it run, so a filter could not keep the real 
> servlet from initializing early. The wrapper creates the real servlet on the 
> first request after {{setServiceReady()}}. Authentication filters still run 
> first, so unauthenticated requests are rejected as before.
> h3. Dependencies
> *Depends on HDDS-17107.* HDDS-17115.001.diff applies on top of the HDDS-17107 
> change (https://github.com/apache/ozone/pull/11611), not on plain master. 
> This change on its own only adds the gate; HDDS-17116 (SCM) and HDDS-17117 
> (OM) use it.
> Testing: TestBaseHttpServer (new serviceServletAnswers503UntilReady), 
> TestStartupProgress (new setDone); manual check of the datanode overview 
> banner and Startup Progress page with Playwright.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to