Why would Bamboo spontaneously go into a Paused state?
Asked by Justin McCamish:

Our Bamboo instance appears to be going into a Paused state by itself. Anyone seen this before and have an idea as to why?

I caught it in the act via the Audit Log. Snippet reproduced below.

Note:

* the user 'bsqui' had legitimately paused Bamboo to deploy a new plugin but re-enabled it thereafter.
* No jobs were running at the time the SYSTEM decided to change to PAUSED).

Thanks.

|----------------------|-------------------------------------------------------------------|---|---|---|
| 7:55 PM, Tue, 2 Jul  | SYSTEM                                                            | Server state changed to 'PAUSED' from 'RUNNING' |||
| 06:11 PM, Tue, 2 Jul | [bsqui](http://msdmasd2.domain.internal/bamboo/browse/user/bsqui) | Server state changed to 'RUNNING' from 'PAUSING' |||
| 06:11 PM, Tue, 2 Jul | [bsqui](http://msdmasd2.domain.internal/bamboo/browse/user/bsqui) | Server state changed to 'PAUSING' from 'RUNNING' |||


Answers:
author: PiotrA
body: Automatic Backups perhaps? Bamboo -\> Admin -\> System -\> Scheduled Backups

I'm thinking that Bamboo pauses itself when performing scheduled (or manual) Backup...

comments: author: Justin McCamish
body: BTW, we're on version 4.2.0 build 3211.


author: Justin McCamish
body: Hi Piotr. Thanks for the suggestion. We checked that but ruled it out as it is scheduled for Saturdays (see below from our Admin settings).

<br />

Backup file name example bamboo_backup_2013_07_02.zip  
Schedule Each Saturday at 12:00 pm  
Next Scheduled Run 06 Jul 2013, 12:00:00 PM


author: PiotrA
body: I see... But you \*do\* use Scheduled backups feature, right? And you're running 4.2.0 version, which together brings me a memory of a bug in the scheduled backups... Here it is: <https://jira.atlassian.com/browse/BAM-12759> - perhaps you're affected too? I reckon that particular bug was introduced in version 4.4, but maybe something similar was introduced even before?

Hm... my hyphothesis:

You are sometimes pausing the Bamboo server ('RUNNING' -\> 'PAUSING') while you have still running plans and you manually unpause the server ('PAUSING' -\> 'RUNNING') before all the plans have finished (or stopped). Later, when your server have no running plans, the above bug kicks-in and stops your Bamboo server ('RUNNING' -\> 'PAUSED').

How does it sound? Probable, improbable?  
Can you check your logs whether your Bamboo server finishes pausing (so its state is changed from 'PAUSING' to 'PAUSED') before anyone unpauses it?

regards,


author: Justin McCamish
body: The guys and I are thinking your hypothesis is right on the money.

Checking the logs again, it looks to be exhibiting exactly that behavior. We're upgrading Bamboo (along with Crowd, Jira, Greenhopper, Confluence and Stash) to the latest stable versions next weekend, so it'll be interesting to see whether or not we can replicate the issue after that.

In the meantime, we've been able to keep ourselves out of trouble by being extra careful to only pause and resume when no plans are running and checking the Audit Logs between those actions to make sure SYSTEM has actually done its thing. A bit tricky given the CI test/standards compliance plans that kick off with every commit but worth it to keep things smooth for the users :).

Will report back in this thread on post-upgrade results.

In the meantime, thanks for attention you've given to this.


Tags: bamboo-administration