sassoftware / viya4-deployment

This project contains Ansible code that creates a baseline in an existing Kubernetes environment for use with the SAS Viya Platform, generates the manifest for an order, and then can also deploy that order into the Kubernetes environment specified.
Apache License 2.0
71 stars 66 forks source link

Connection failed to postgres created by viya4-iac-aws. #555

Closed nbattala closed 5 months ago

nbattala commented 6 months ago

Viya4 Deployment Version Details

Using latest 6.20.0

Ansible Variable File Details

postgres part commented to let dac read postgres properties from aws iac.

## Postgres - commented to let deployment pick external postgres info from iac terraform state 
#V4_CFG_POSTGRES_SERVERS:

Here is how terraform.tfvars look like on aws iac for postgres

postgres_servers = {
  default = {
    adminstrator_user = "pgadmin"
    administrator_password  = "xxxxx"
  },
}

Steps to Reproduce

Run viya4-iac-aws iac with postgres properties as shown above and then run viya4-deployment with postgres properties commented as shown above.

Expected Behavior

viya deployed by viya4-deployment should trust the postgres RDS CA for the postgres created by viya4-iac-aws.

Actual Behavior

INFO  2024-05-24 22:53:14.722 +0000 [sas-readiness] - The check "sas-database-ready" failed - Postgres database connection is configured. Connection failed: failed to connect to `host=sfdpoc-default-pgsql.cjqcsc4eccuf.us-east-1.rds.amazonaws.com user=pgadmin database=SharedServices`: failed to write startup message (write failed: tls: failed to verify certificate: x509: certificate signed by unknown authority)
INFO  2024-05-24 22:53:14.722 +0000 [sas-readiness] - The check "sas-oauth-provider-ready" failed - No sas-logon-app pod is available yet.
ERROR 2024-05-24 22:53:44.766 +0000 [sas-readiness] - failed to initialize database, got error %v

Additional Context

No response

References

No response

Code of Conduct

nbattala commented 5 months ago

Found the answer in the documentation that I have to set v4_cfg_tls_trusted_ca_certs if the AWS IAC was used.