cloudfoundry / postgres-release

BOSH release for PostgreSQL
Apache License 2.0
14 stars 36 forks source link

How do I run PGATS on bosh-lite? #41

Closed jandubois closed 6 years ago

jandubois commented 6 years ago

I've been trying to get the tests to pass for a while now, but simply can't get it to work:

The SSL tests require a config server to generate the certificates, so I configured bosh-lite with credhub and uaa. But the bosh-cli version used by PGATS to talk to the director doesn't seem to support oauth authentication via uaa to the director.

I've then switched the director back to using local user_management, but then there seems to be a problem generating the credentials:

Task 71 | 18:10:02 | Preparing deployment: Preparing deployment (00:00:01)
                   L Error: Config Server failed to generate value for '/Bosh-Lite-Director/pgats-fresh-cbd4b17c-29a1-9dd3-891d-94a7a8a220b4/certuser_matching_certs' with type 'certificate'. HTTP Code '404', Error: 'The request could not be completed because the credential does not exist or you do not have sufficient authorization.'

Looking at credhub.log I see

2018-04-20T18:10:03.231Z [https-jsse-nio-8844-exec-8] .... ERROR --- ExceptionHandlers: The request could not be completed because the credential does not exist or you do not have sufficient authorization.
2018-04-20T18:10:03.359Z [https-jsse-nio-8844-exec-8] ....  INFO --- CREDHUB_SECURITY_EVENTS: CEF:0|cloud_foundry|credhub|1.6.5|POST /api/v1/data|POST /api/v1/data|0|rt=1524247803253 suser=null suid=uaa-client:director_to_credhub cs1Label=userAuthenticationMechanism cs1=oauth-access-token request=/api/v1/data requestMethod=POST cs3Label=result cs3=clientError cs4Label=httpStatusCode cs4=404 src=192.168.50.6 dst=192.168.50.6

I don't know if this is related to the director using local users. I tried to add the credhub accounts with identical passwords as local users as well, but that doesn't make any difference (credhub probably wants a UAA token and not a password anyways).

Could you please provide some documentation on how to run the tests successfully?

cf-gitbot commented 6 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/156960926

The labels on this github issue will be updated when the story is started.

valeriap commented 6 years ago

@jandubois Thanks for reporting it. We have identified an issue in the pgats code and we are addressing it. I will update when the fix is available.

valeriap commented 6 years ago

@jandubois The develop branch contains the fix to the issue. We have regressed it with a standard bosh-lite installation. Please may you confirm that it works fine in your environment too?

jandubois commented 6 years ago

Thank you!

All tests passed for me (and don't seem to require credhub/uaa at all).