You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@continuum.apache.org by "Paolo Scapin (JIRA)" <ji...@codehaus.org> on 2010/10/18 10:45:32 UTC

[jira] Created: (CONTINUUM-2573) Distributed builds are not distributed: they are always scheduled to the last agent defined

Distributed builds are not distributed: they are always scheduled to the last agent defined
-------------------------------------------------------------------------------------------

                 Key: CONTINUUM-2573
                 URL: http://jira.codehaus.org/browse/CONTINUUM-2573
             Project: Continuum
          Issue Type: Bug
          Components: Distributed Builds
    Affects Versions: 1.3.6
            Reporter: Paolo Scapin
            Priority: Critical


When more than one agent are available for distributed build, every build is queued to the last one defined.
This way distributed builds are useless.

The issue is caused by a small bug in class org.apache.continuum.builder.distributed.manager.DefaultDistributedBuildManager, in method getOverallDistributedBuildQueueByAgentGroup, where the index "idx" ios never incremented

line 916:

int idx = 0;

then idx is checked to  assign the first queue

line 932:
if ( idx == 0 )
{
   whereToBeQueued = distributedBuildQueue;
   size = agentBuildSize;
}

but is never incremented.

idx should be incremented at line 953, inside the for cycle.

A similar cycle in the next method (getOverallDistributedBuildQueue) is implemented correctly

Please can anybody insert a fix in the next release?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CONTINUUM-2573) Distributed builds are not distributed: they are always scheduled to the last agent defined

Posted by "Wendy Smoak (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-2573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=246580#action_246580 ] 

Wendy Smoak commented on CONTINUUM-2573:
----------------------------------------

A build will 'prefer' the last agent it was built on, because there's a good chance that the working copy is already available there.  This will save server resources checking it out again.

However, if that agent is busy, the build should go to the next available agent.

I'm reasonably sure I've seen this work correctly in 1.3.6, but as you've pointed out an issue in the code I'll leave this open for one of the devs to review.

Can you describe your configuration in more detail?  How many agents did you configure, are they in one or more agent groups, etc.  If you could record a Selenium test to reproduce it, that would be great.

> Distributed builds are not distributed: they are always scheduled to the last agent defined
> -------------------------------------------------------------------------------------------
>
>                 Key: CONTINUUM-2573
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-2573
>             Project: Continuum
>          Issue Type: Bug
>          Components: Distributed Builds
>    Affects Versions: 1.3.6
>            Reporter: Paolo Scapin
>            Priority: Critical
>             Fix For: 1.4.2 (Beta)
>
>
> When more than one agent are available for distributed build, every build is queued to the last one defined.
> This way distributed builds are useless.
> The issue is caused by a small bug in class org.apache.continuum.builder.distributed.manager.DefaultDistributedBuildManager, in method getOverallDistributedBuildQueueByAgentGroup, where the index "idx" ios never incremented
> line 916:
> int idx = 0;
> then idx is checked to  assign the first queue
> line 932:
> if ( idx == 0 )
> {
>    whereToBeQueued = distributedBuildQueue;
>    size = agentBuildSize;
> }
> but is never incremented.
> idx should be incremented at line 953, inside the for cycle.
> A similar cycle in the next method (getOverallDistributedBuildQueue) is implemented correctly
> Please can anybody insert a fix in the next release?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CONTINUUM-2573) Distributed builds are not distributed: they are always scheduled to the last agent defined

Posted by "Luca (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-2573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240067#action_240067 ] 

Luca commented on CONTINUUM-2573:
---------------------------------

I have installed the distributed build, but only one agent is used.
Maybe this is the cause!


> Distributed builds are not distributed: they are always scheduled to the last agent defined
> -------------------------------------------------------------------------------------------
>
>                 Key: CONTINUUM-2573
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-2573
>             Project: Continuum
>          Issue Type: Bug
>          Components: Distributed Builds
>    Affects Versions: 1.3.6
>            Reporter: Paolo Scapin
>            Priority: Critical
>
> When more than one agent are available for distributed build, every build is queued to the last one defined.
> This way distributed builds are useless.
> The issue is caused by a small bug in class org.apache.continuum.builder.distributed.manager.DefaultDistributedBuildManager, in method getOverallDistributedBuildQueueByAgentGroup, where the index "idx" ios never incremented
> line 916:
> int idx = 0;
> then idx is checked to  assign the first queue
> line 932:
> if ( idx == 0 )
> {
>    whereToBeQueued = distributedBuildQueue;
>    size = agentBuildSize;
> }
> but is never incremented.
> idx should be incremented at line 953, inside the for cycle.
> A similar cycle in the next method (getOverallDistributedBuildQueue) is implemented correctly
> Please can anybody insert a fix in the next release?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CONTINUUM-2573) Distributed builds are not distributed: they are always scheduled to the last agent defined

Posted by "Paolo Scapin (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-2573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=246582#action_246582 ] 

Paolo Scapin commented on CONTINUUM-2573:
-----------------------------------------

Builds are not sent to the last agent they were built on: they are always sent to the last agent that is defined. This is why i pointed out that there is point in defining more than one agent.
We patched the code locally and now the patched version works as expected.
I am not sure how this was working for you before.
Configuration: we defined one group with 4 agents, 2 win and 2 linux machines.


> Distributed builds are not distributed: they are always scheduled to the last agent defined
> -------------------------------------------------------------------------------------------
>
>                 Key: CONTINUUM-2573
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-2573
>             Project: Continuum
>          Issue Type: Bug
>          Components: Distributed Builds
>    Affects Versions: 1.3.6
>            Reporter: Paolo Scapin
>            Priority: Critical
>             Fix For: 1.4.2 (Beta)
>
>
> When more than one agent are available for distributed build, every build is queued to the last one defined.
> This way distributed builds are useless.
> The issue is caused by a small bug in class org.apache.continuum.builder.distributed.manager.DefaultDistributedBuildManager, in method getOverallDistributedBuildQueueByAgentGroup, where the index "idx" ios never incremented
> line 916:
> int idx = 0;
> then idx is checked to  assign the first queue
> line 932:
> if ( idx == 0 )
> {
>    whereToBeQueued = distributedBuildQueue;
>    size = agentBuildSize;
> }
> but is never incremented.
> idx should be incremented at line 953, inside the for cycle.
> A similar cycle in the next method (getOverallDistributedBuildQueue) is implemented correctly
> Please can anybody insert a fix in the next release?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (CONTINUUM-2573) Distributed builds are not distributed: they are always scheduled to the last agent defined

Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/CONTINUUM-2573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brett Porter updated CONTINUUM-2573:
------------------------------------

    Fix Version/s: 1.4.2 (Beta)

> Distributed builds are not distributed: they are always scheduled to the last agent defined
> -------------------------------------------------------------------------------------------
>
>                 Key: CONTINUUM-2573
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-2573
>             Project: Continuum
>          Issue Type: Bug
>          Components: Distributed Builds
>    Affects Versions: 1.3.6
>            Reporter: Paolo Scapin
>            Priority: Critical
>             Fix For: 1.4.2 (Beta)
>
>
> When more than one agent are available for distributed build, every build is queued to the last one defined.
> This way distributed builds are useless.
> The issue is caused by a small bug in class org.apache.continuum.builder.distributed.manager.DefaultDistributedBuildManager, in method getOverallDistributedBuildQueueByAgentGroup, where the index "idx" ios never incremented
> line 916:
> int idx = 0;
> then idx is checked to  assign the first queue
> line 932:
> if ( idx == 0 )
> {
>    whereToBeQueued = distributedBuildQueue;
>    size = agentBuildSize;
> }
> but is never incremented.
> idx should be incremented at line 953, inside the for cycle.
> A similar cycle in the next method (getOverallDistributedBuildQueue) is implemented correctly
> Please can anybody insert a fix in the next release?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (CONTINUUM-2573) Distributed builds are not distributed: they are always scheduled to the last agent defined

Posted by "Maria Catherine Tan (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/CONTINUUM-2573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=246819#action_246819 ] 

Maria Catherine Tan commented on CONTINUUM-2573:
------------------------------------------------

I think this is already fixed in 1.4.0.

Can you try it using that version.

Thanks!

> Distributed builds are not distributed: they are always scheduled to the last agent defined
> -------------------------------------------------------------------------------------------
>
>                 Key: CONTINUUM-2573
>                 URL: http://jira.codehaus.org/browse/CONTINUUM-2573
>             Project: Continuum
>          Issue Type: Bug
>          Components: Distributed Builds
>    Affects Versions: 1.3.6
>            Reporter: Paolo Scapin
>            Priority: Critical
>             Fix For: 1.4.2 (Beta)
>
>
> When more than one agent are available for distributed build, every build is queued to the last one defined.
> This way distributed builds are useless.
> The issue is caused by a small bug in class org.apache.continuum.builder.distributed.manager.DefaultDistributedBuildManager, in method getOverallDistributedBuildQueueByAgentGroup, where the index "idx" ios never incremented
> line 916:
> int idx = 0;
> then idx is checked to  assign the first queue
> line 932:
> if ( idx == 0 )
> {
>    whereToBeQueued = distributedBuildQueue;
>    size = agentBuildSize;
> }
> but is never incremented.
> idx should be incremented at line 953, inside the for cycle.
> A similar cycle in the next method (getOverallDistributedBuildQueue) is implemented correctly
> Please can anybody insert a fix in the next release?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (CONTINUUM-2573) Distributed builds are not distributed: they are always scheduled to the last agent defined

Posted by "Wendy Smoak (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/CONTINUUM-2573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Wendy Smoak closed CONTINUUM-2573.
----------------------------------

       Resolution: Incomplete
    Fix Version/s:     (was: 1.4.2 (Beta))

Marica says it was fixed in 1.4.0 and I've seen it work correctly as well.  Closing as incomplete since I never saw the reported behavior and I'm not sure exactly when it was fixed.  If you can reproduce it in a recent version, please reopen it with more info.

> Distributed builds are not distributed: they are always scheduled to the last agent defined
> -------------------------------------------------------------------------------------------
>
>                 Key: CONTINUUM-2573
>                 URL: https://jira.codehaus.org/browse/CONTINUUM-2573
>             Project: Continuum
>          Issue Type: Bug
>          Components: Distributed Builds
>    Affects Versions: 1.3.6
>            Reporter: Paolo Scapin
>            Priority: Critical
>
> When more than one agent are available for distributed build, every build is queued to the last one defined.
> This way distributed builds are useless.
> The issue is caused by a small bug in class org.apache.continuum.builder.distributed.manager.DefaultDistributedBuildManager, in method getOverallDistributedBuildQueueByAgentGroup, where the index "idx" ios never incremented
> line 916:
> int idx = 0;
> then idx is checked to  assign the first queue
> line 932:
> if ( idx == 0 )
> {
>    whereToBeQueued = distributedBuildQueue;
>    size = agentBuildSize;
> }
> but is never incremented.
> idx should be incremented at line 953, inside the for cycle.
> A similar cycle in the next method (getOverallDistributedBuildQueue) is implemented correctly
> Please can anybody insert a fix in the next release?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira