Issue Summary
After upgrading to 7.+ trying to upgrade/upload a plugin freezes at the installing step. Other users trying to do the same after one upload is already blocked will be met with a warning about long running tasks.
This is caused by a background upgrade in the docker plugin which blocks UPM. It runs through every docker task and encrypts passwords it finds. On instances with large counts of docker tasks this can take some time.
Steps to Reproduce
- Create many docker tasks on an instance pre 7.+
- Upgrade to 7.+
- Upload a plugin or try and upgrade a plugin
Expected Results
Plugin successfully upgrades/installs
Actual Results
Upgrade/install gets stuck at the installing step. Other users are not able to perform upgrades or installs due to a "long running task"
The below entry will be found in the bamboo log file after starting up:
Upgrading plugin com.atlassian.bamboo.plugins.bamboo-docker-plugin
but there is no matching "upgraded" line that matches:
Upgraded plugin com.atlassian.bamboo.plugins.bamboo-docker-plugin
Also thread dumps reveal a UpmAsynchronousTaskManager thread blocked by an AtlassianEvent thread performing the docker upgrade task:
... com.atlassian.bamboo.plugins.docker.upgrade.EncryptSecureFieldsUpgradeTask.doUpgrade ...
Workaround
- Wait for the docker upgrade to complete in the background. This can be determined by finding the following line in the bamboo logs:
Upgraded plugin com.atlassian.bamboo.plugins.bamboo-docker-plugin
- Manually place plugins to upgrade in the <Bamboo-home/plugins folder, replacing older versions. Then restart Bamboo
The issue refers to an upgrade to an unsupported version from an even older version.