vmware-archive / pcf-pipelines

PCF Pipelines
Apache License 2.0
158 stars 283 forks source link

better shell stdout/stderr in functions/allow_only_patch_upgrades.sh #138

Closed alexvasseur closed 7 years ago

alexvasseur commented 7 years ago

I had my params.yml with a "https://" prefix

This ended up in error with

Successfully pulled czero/cflinuxfs2@sha256:c9a1021014fdcc1fc93a5f8a35d32855b932d74bd08121fc15a7af626e921c15.

Checking if you are applying an allowed patch upgrade @ https://ec2-xx.eu-west-1.compute.amazonaws.com
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.
You are trying to install version: 
cf-1.11.2-build.3.pivotal  metadata.json  metadata.yaml  version

Your currently deployed version is: 

Pivotal recommends that you only automate
...

and the root cause was in fact:

OPSMAN_URI=https://ec2-xx.eu-west-1.compute.amazonaws.com

and with fly intercept:

./pcf-pipelines/tasks/allow-only-patch-upgrades/task.sh
Checking if you are applying an allowed patch upgrade @ https://ec2-xx.eu-west-1.compute.amazonaws.com
could not execute "deployed-products": failed to retrieve deployed products could not make api request to diagnostic_report endpoint: token could not be retrieved from target url: Post https://https/uaa/oauth/token: dial tcp: lookup https on 10.0.0.2:53: no such host

So I think the script functions/allow_only_patch_upgrades.sh could have better stderr stdout to troubleshoot this better.

cf-gitbot commented 7 years ago

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

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

abbyachau commented 7 years ago

Hi @avasseur-pivotal, thanks for reporting this issue. In a separate and unrelated story, we've since removed the allow-only-patch-upgrades script.

As for the original reason for your error, we have a story scheduled to clarify the name for OPSMAN_URI so to clarify to users that they should not include the protocol as part of the parameter.

Please do not hesitate to get in touch should you have any questions or feedback.

abbyachau commented 7 years ago

Hi @avasseur-pivotal, thanks again for this. Closing this issue because we've removed the allow-only-patch-upgrades job, and we've also changed the name of the OPSMAN_URI for clarity (see https://www.pivotaltracker.com/n/projects/1472134/stories/148112387). If you have any feedback regarding this, please do not hesitate to open a new issue. Thanks!