vmware-archive / prometheus-on-PCF

This is a how-to for deploying https://github.com/cloudfoundry-community/prometheus-boshrelease to monitor Pivotal Cloud Foundry.
Apache License 2.0
20 stars 35 forks source link

create-uaa-creds job in pipeline fails if another deployed product matches cf- #14

Closed eamonryan closed 7 years ago

eamonryan commented 7 years ago

Found an issue where create-uaa-creds fails to extract the UAA credentials from opsman when another product includes the text cf-

In this case we had Hazelcast tile installed which shows up as hazelcast-pcf-abcde12345

As a result this line https://github.com/pivotal-cf/prometheus-on-PCF/blob/master/pipeline/tasks/create-uaa-creds.sh#L10

Returns: cf-abcde12345 hazelcast-pcf-abcde12345

It then tries to query for UAA Admin credentials using the above as $cf_id which of course fails.

Query should be improved to account for Hazelcast (and any other tile involving cf in the name).

mkuratczyk commented 7 years ago

Thanks Éamon! I've implemented a partial fix for now - should work in your case and most other I guess. Technically still not perfect but I'm not sure a perfect fix is possible (I guess a regex would be better but still potentially someone can deploy another cf-XXXXXXXX alongside actual PCF ERT deployment).