sanrajbandre commented on PR #4050:
URL: https://github.com/apache/ambari/pull/4050#issuecomment-3270209965

   ### JIRA ISSUE
   ---
   **Project:** AMBARI
   **Issue Type:** Bug
   **Summary:** Rolling restart batches intermittently fail to chain; Ambari 
API response body not parsed in ExecutionScheduleManager
   **Affects Version/s:** 3.1.0.0 (server)
   **Environment:** Rocky Linux 9; Ambari Server 3.1.0.0; JDK 17 (also 
reproducible with JDK 11); Jakarta/Jersey client
   
   **Description:**
   > When Ambari schedules a rolling restart via ExecutionScheduleManager, the 
chaining from one batch to the next may stall. Root cause: 
convertToBatchRequestResponse() was using Response#getEntity() to read the HTTP 
body. With Jakarta/Jersey, getEntity() often returns null / unreadable content 
after providers intercept the stream, so "Requests.id" and "request_status" are 
not parsed and the chain halts.
   
   
   **Steps to Reproduce:**
   1. Trigger a rolling restart for a multi-host service (e.g., Kafka, HDFS) 
using Ambari UI or the API.
   2. Observe server logs while batches advance.
   3. Intermittently, the first batch completes but the next batch never 
starts; no request id is recorded for the subsequent batch.
   
   **Expected Result:**
   Each completed batch yields a valid Ambari request id and status parsed from 
the response, and the scheduler proceeds to the next batch.
   
   **Actual Result:**
   Scheduler fails to parse the response; request id/status are null, and 
chaining stops.
   
   **Logs/Indicators:**
   - ambari-server.log shows batch completion without a subsequent valid 
"Requests.id".
   - Debug logs around ExecutionScheduleManager.convertToBatchRequestResponse() 
show response.getEntity() as null.
   
   **Proposed Fix:**
   Use Response#readEntity(String.class) to reliably read the HTTP body. This 
works across Jakarta/Jersey versions and avoids the empty entity edge case.
   
   **Risk / Impact:** Low. The change is a single-line read method swap; 
behavior is otherwise unchanged.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to