How to reset Bamboo plugins state through database
目的
Disabling apparently unusable plugins may seem a good idea, but it can lead to bad consequences. Plugins have dependencies and when their dependences are not loaded they are not able to load themselves. This could be catastrophic in case you disable a system plugin. These plugins are usually root dependencies for many other plugins and it could affect main Bamboo features.
The following query will help you to identify if there are any plugins with state manually changed (not in their default state)
SELECT * FROM bandana WHERE bandana_key='bamboo.plugin.state';
In case there are add-ons manually disabled their state will be visible in the serialized_data column as observed in the following example:
bandana_id | build_id | bandana_key | serialized_data
------------+----------+---------------------+-------------------------------------------------------------------
131113 | 0 | bamboo.plugin.state | <com.atlassian.plugin.manager.DefaultPluginPersistentState> +
| | | <map class="java.util.Collections$UnmodifiableMap"> +
| | | <m> +
| | | <entry> +
| | | <string>com.atlassian.analytics.analytics-client</string>+
| | | <boolean>false</boolean> +
| | | </entry> +
| | | <entry> +
| | | <string>com.atlassian.streams</string> +
| | | <boolean>false</boolean> +
| | | </entry> +
| | | </m> +
| | | </map> +
| | | </com.atlassian.plugin.manager.DefaultPluginPersistentState>
The above results show that both com.atlassian.analytics.analytics-client and com.atlassian.streams plugins are disabled.
ソリューション
- Stop Bamboo
- Backup your database to perform the next change
Run the following query against Bamboo database:
DELETE FROM bandana WHERE bandana_key='bamboo.plugin.state';
- Start Bamboo
データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。