cloudbreak
cloudbreak copied to clipboard
CB-18180 Postgresql 11 alternatives should be set when external db is…
… used
For postgres command like pg_dump to work, these should point to the actual version of the database. This is true also when the cluster is launched with external db.
From now on the postgres_version value in the postgres.sls pillar is defined whenever the db version is set in the Stack entity.
Also the alternatives has been moved to a separate state and included in case of external db.
On datalake side whenever the external db version is present in SdxCluster entity, it's propagated through StackV4Request when creating the cluster in the core.
In this case the DatabaseAvailabilityType is set to NONE in the request, which means usually embedded. This is necssary as the request this field can't be null,
but null would be resolved to NONE in the core anyway. So this way the core wouldn't create an external db, but it would have the db engine version stored with the stack.
The core knows about the external db as the Cluster entity's databaseServerCrn field is set.
See detailed description in the commit message.