F5Networks / f5-cloud-libs-azure

Azure specific implementations for f5-cloud-libs
Apache License 2.0
6 stars 1 forks source link

Unable to connect remotely to Azure with 2.7.0 #7

Open dstokesf5 opened 5 years ago

dstokesf5 commented 5 years ago

I am using the following command (sensitive information replaced with ****):

/usr/bin/f5-rest-node /config/cloud/as3/node_modules/\@f5devcentral/f5-cloud-libs/scripts/getNodes.js console -o /dev/null --log-level error --cloud azure --member-tag foo=bar --member-address-type public --provider-options resourceGroup:****,subscriptionId:****,tenantId:****,clientId:***

When trying to use the getNodes.js script with cloud set to "azure" I get the following error with 2.7.0:

2019-01-08T21:23:18.935Z error:  getNodes.js error code: ECONNREFUSED message: connect ECONNREFUSED 169.254.169.254:80

2.6.0 works as expected.

garrettdieckmann commented 5 years ago

If an Azure Environment is not specified, cloud-libs will attempt to query the instance metadata to determine which Azure environment it is running in.

Would it be an option to pass in an Azure environment when running remotely?

dstokesf5 commented 5 years ago

What should I pass in for the environment for a normal Azure instance? Is there a list of allowed environment values somewhere? I am having a hard time finding documentation on the provider options.

Also, this appears to be an API breaking change. If this project is following semantic versioning, this should not be done in a minor release.

dstokesf5 commented 5 years ago

A value of "Azure" for the environment seems to be working as a work-around for this issue.

garrettdieckmann commented 5 years ago

Agreed, this probably should have either been released as a major version, for supporting running f5-cloud-libs-azure outside of Azure.

Given the work-around of providing 'Azure' as the environment, does this resolve the issue encountered?

dstokesf5 commented 5 years ago

@garrettdieckmann Yes, the work-around works. This issue can probably be closed now.