Log the error in rep_windows when failing to curl azure endpoint
[#165923841](https://www.pivotaltracker.com/story/show/165923841)
@@ -9,6 +9,8 @@ $zone_flag=""
$azure_fd=$(C:\var\vcap\packages\rep_windows\gocurl.exe -max-time "5s" $url)
if ($LASTEXITCODE -eq 0){
$zone_flag="-zone=z${azure_fd}"
+ } else {
+ Write-Error "Failed to curl azure metadata endpoint for fault domain"
}
$url="http://169.254.169.254/metadata/instance/compute/zone?api-version=2017-12-01&format=text"
$azure_fd=$(C:\var\vcap\packages\rep_windows\gocurl.exe -max-time "5s" -H "Metadata=true" $url)
@@ -16,6 +18,8 @@ $zone_flag=""
if (! [string]::IsNullOrEmpty($azure_fd)) {
$zone_flag=""
}
+ } else {
+ Write-Error "Failed to curl azure metadata endpoint for availability zone"
}
$ErrorActionPreference = "Stop";
<% end %>
