Passive mode and takeover in cluster

347 views
Skip to first unread message

alexis robert

unread,
Dec 22, 2015, 6:29:28 AM12/22/15
to rundeck-discuss
Hi, 

I'm running rundeck with 2 instances in cluster mode and have been experiencing a strange behaviour when performing a takeover.

My setup is as follows:

Server A is a rundeck server, where I have setup  Project_A with  Job_A running every minute
Server B is a rundeck server, where I have setup  Project_B with  Job_B running every minute

When both rundeck servers are in Active execution mode, I have no problem moving jobs from one instance to the other using the API:

curl -H "X-RunDeck-Auth-Token:my_token"  -H "Content-Type: application/xml" -d '<takeoverSchedule><server all="true"/><project name="Project_A"/></takeoverSchedule>' -X PUT http://rundeck-server-A.mycompany.com:4440/api/14/scheduler/takeover




If I set for example Server B in Passive execution mode, it works as intended: Job_B stops running, while Server A keeps executing Job_A (as expected). Good.

Now, if we start in a situation where Server A and Server B are both up and running, with Execution Mode set to Active on both instances.
If I move all jobs (Job_A and Job_B) to Server_A: 

curl -H "X-RunDeck-Auth-Token:my_token"  -H "Content-Type: application/xml" -d '<takeoverSchedule><server all="true"/></takeoverSchedule>' -X PUT http://rundeck-server-A.mycompany.com:4440/api/14/scheduler/takeover



Works fine, both Jobs will keep being executed.

Then, I set Server B to Passive execution mode:

curl -H "X-RunDeck-Auth-Token:my_token"  -H "Content-Type: application/xml" -d '<takeoverSchedule><executions executionMode="passive"/>' -X POST http://rundeck-server-B.mycompany.com:4440/api/14/system/executions/disable



When connected to the instance on my browser, it confirms this:

PASSIVE

No Jobs or Commands can be run.             



Now, Server A is running Job A and Job B fine, and Server B is set to Passive Execution Mode. So if I move Job B to Server B, it should NOT run because this server is set to Passive mode, right ?

curl -H "X-RunDeck-Auth-Token:my_token"  -H "Content-Type: application/xml" -d '<takeoverSchedule><server all="true"/><project name="Project_B"/></takeoverSchedule>' -X PUT http://rundeck-server-B.mycompany.com:4440/api/14/scheduler/takeover




Well, that's where I have an issue: it seems that after doing the takeover API call to move Job B to Server B, even if Server B is set to PASSIVE Execution Mode, it WILL keep running this job. Is this the intended behaviour ?








dagu...@simplifyops.com

unread,
Dec 23, 2015, 7:45:52 AM12/23/15
to rundeck-discuss
Hi,
We are going to try to replicate this problem, because it looks like a possible bug.

Best! 
Reply all
Reply to author
Forward
0 new messages