I tried to use the relocation mechanism on devcockpit license property. Purpose was to rename property key from devcockpit.license.secured to sonar.devcockpit.license.secured.
Problem: after first restart of the SQ server the use of devcockpit was no more possible.
In server logs:
ERROR web[devcockpit] No license for devcockpit
Caused by: com.sonarsource.devcockpit.F.A.B.A: Server ID is invalid. Please check settings.
Images intégrées 1
As you can see the licenseHash is empty.
After some investigation I think this is a lifecycle issue:
The component in license-api that is responsible for checking license at server startup and updating licenseHash (ServerLicenseObserver) is startable.
The component in sonar-server that is responsible for renaming deprecated properties at startup (org.sonar.server.startup.RenameDeprecatedPropertyKeys) is also startable.
I haven't checked if the two components are in the same pico but anyway I think the problem come from the fact that RenameDeprecatedPropertyKeys is executed after ServerLicenseObserver.
The workaround is very easy : just restart the server one more time.