Controlling the execution of multiple plans and jobs that can't run at the same time.

Chris Williams March 1, 2012

Here is an example of a simplified version of my problem. I have 4 builds that need to run. Let's call them OracleA, OracleB, MySQLA, and MySQLB. Neither of the Oracle builds can run at the same time and neither of the MySQL builds can run at the same time. This is easy enough to do by creating one Oracle agent and one MySQL agent.

The problem we're having is the added restriction that neither of the "xxxB" builds can be allowed to run at the same time either because the "xxxB" builds use common resources. Since we're already using the dependencies to control the Oracle and MySQL agents, we can't use an agent to control this third dependency.

At this point I've solved the problem by getting rid of the Oracle and MySQL agents so I could introduce an agent to make sure no "xxxB" builds run at the same time. I then made the OracleA and OracleB builds tasks in separate jobs that run in two phases of the same plan. This makes sure OracleA doesn't run at the same time as OracleB.

This will work in the short term. In the long term, though, we may need to add more Oracle plans (with Oracle2A and Oracle2B jobs, for instance) that share the Oracle resources with the first Oracle plan so we don't want them to run at the same time as the plan that contains the Oracle1A and Oracle1B jobs. Is there a better way to do this?

Note: Yes, we can separate out the schemas that are in use and have one for each plan but that requires more coordination with DBAs and variable substitution than we want to get into. We can do this but hopefully it's our backup plan..

3 answers

0 votes
Chris Williams March 1, 2012

@Renjith V, No, I do not want the MySQL builds to run in parallel. I basically have the need to be able to assign two agents to a build: one for the DBMS type so no builds that use the same DBMS are allowed to run concurrently and another to assign to all of the "xxxB" stage builds so that none of them run concurrently.

0 votes
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 1, 2012

Are you finally saying that you don't need any of the MySQL and Oracle stuff to run in parallel. I am a bit lost understanding the scenario. If that is the case a single agent (as you have done now) is the solution.

0 votes
Adam Guyot March 1, 2012

Yup, this is rather painful at the moment

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events