[ 
https://issues.apache.org/jira/browse/ACE-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13828886#comment-13828886
 ] 

J.W. Janssen commented on ACE-433:
----------------------------------

After investigation, I've found out that there are two issues here:

# our {{DeploymentServlet}} does not properly send the {{Content-Length}} 
header in all situations, making the agent unaware of how many bytes to expect;
# the {{DefaultController}}, when running in "non-streaming/download-first" 
mode, starts a download job asynchronously and polls at regular intervals if 
this download is complete. When it it is finished, chances are that this 
happens when the controller is not running, so the installation needs to wait 
until the next time the controller is ran. This is why you need at least two 
cycles for a DP to be installed.

The first finding should be solved in a different issue, which I'll create. The 
second issue needs some thought, as we need a clear signal that a download is 
complete to make sure we can install it correctly...



> New deployment needs two check cycles to download and to install a new DP
> -------------------------------------------------------------------------
>
>                 Key: ACE-433
>                 URL: https://issues.apache.org/jira/browse/ACE-433
>             Project: ACE
>          Issue Type: Bug
>          Components: Management Agent
>    Affects Versions: 1.0.0
>            Reporter: Wilfried Sibla
>            Priority: Critical
>         Attachments: AgentError.log
>
>
> I tested the new agent implementation but I observed a little bit curious 
> behavior:
> * At first check, the agent detects and downloads the update DP
> * Then it stops with log entry: [DEBUG] 21:50:31 (downloads) Download stopped 
> early: 926530 of -1 bytes downloaded... (0)
> * on the next check: [DEBUG] 21:50:39 (controller) Checking for deployment 
> updates..
> * new DP is detected: [DEBUG] 21:50:39 (controller) Need to install update: 
> newer deployment version available!
> * Download is resumed: [INFO] 21:50:39 (controller) Download of deployment 
> update is STOPPED. Resuming download...
> * and completed: [DEBUG] 21:51:00 (downloads) Download completed: 926530 
> bytes downloaded...
> This indicates that it needs to cycles to download and really install a DP.
> In DownloadCallableImpl.call():
> * is.getContentSize() return -1 during download
> * afterwards downloadComplete==false (line 100) and stoppedEarly==true (line 
> 101) indicates that the download seems to be stopped (DownloadState.STOPPED 
> in DownloadResult).
> Or is this behaviour (installing a downloaded DP during the next check cycle) 
> intended?



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to