问题
We are currently running a production server at version 5.1.2 which we are planning to upgrade.
Tests have shown that upgrading to 5.3 works as expected.
However, upgrading from 5.1.2 -> 5.4 or 5.1.2 -> 5.3 -> 5.4 results in all quality profiles from the 5.1.2 instance becoming empty - no rules assigned at all.
Worse, backing up the rules and attempting to restore them fails silently.
Has anyone else experienced this? Is there a work-around?
Thanks in advance.
回答1:
The update instructions in the Administration view (System Upgrades) differ from the instructions here: Upgrading
I would change the first instructions as follows (in cursive text the changed/added lines) and I'd try to keep the Upgrading instructions in sync.
- Copy the list of installed plugins and stop your old SonarQube server.
- Download the new SonarQube version and start it on an empty DB (the bundled H2 DB for instance).
- Install (from the update center) the plugins you want.
- Install your custom plugins (if any).
- Update the conf/sonar.properties file to use the relevant configurations from your old instance, including the connection information for your production DB.
- Stop your new SonarQube server.
- Remove the following folders from the new SonarQube server:
data, temp
- Start the new SonarQube instance: you're done!
回答2:
I had the same problem today migrating from 4.5.6 to 5.4. I managed to bypass the problem by reverting back to 4.5.6 and then migrating in the old fashion, i.e ignoring the new upgrade instructions.
Environment was Windows10/Postgresql4.3
Further investigation showed that I had missed a step in the new instructions, namely the deletion of the data/es directory.
I have run the migration a number of times and if I run up the default H2 database in order to verify and update plugins but forget to delete the data/es directory prior to switching to postgresql, then the quality profiles end up with zero rules, but if I follow the instructions correctly then the profiles are migrated correctly.
Please check your procedures against http://docs.sonarqube.org/display/SONAR/Upgrading
Hope this helps
来源:https://stackoverflow.com/questions/36063174/all-quality-profiles-have-no-rules-when-sonarqube-is-upgraded-to-5-4