We want to be able to identify a SQ instance amongst any other instance. Currently, we have 2 identifiers for this purpose:
- a property called "sonar.core.id": it is generated during the startup of the server and is based on the startup time. The problem is that at every restart, this property is updated so this property is mutable and can't identify a server over time.
- the "server ID": it is used for the licensing mechanism and is supposed to be unique because it's based on the IP of the machine and the name of the company. The problem is that this operation is manual (can't be done automatically because it enter the name of the company).
"sonar.core.id" was used in SQ < 5.2 to make sure that the scanners would not query a server ("sonar.host.url") that:
- was not running on the DB identified by the JDBC connection
- was not the last server started on this DB (because clustering is not supported due to the startup operations)
But now that with SQ 5.2+ the scanners don't connect any longer to the DB, we can turn this "sonar.core.id" property into an immutable one - i.e. it should not be updated at every startup time.
This implies the following changes:
- This property must now:
- be a UUID and not a timestamp
- be impossible to change/update once it has been created
- On a fresh install: generate the property
- On existing instances: run a migration script to replace the timestamp format by a UUID format