chef-boneyard / knife-oraclecloud

Knife plugin for Oracle Cloud Infrastructure Classic
Apache License 2.0
4 stars 5 forks source link

knife.rb configuration #5

Closed matthewbaldwin closed 8 years ago

matthewbaldwin commented 8 years ago

installed chefDK via brew.

Added the following to /Users/matt/chef-repo/.chef to the knife.rb file in the directory

knife[:oraclecloud_username] = 'matthew@foo.com' knife[:oraclecloud_password] = 'password' knife[:oraclecloud_api_url] = 'https://api.compute.us0.oraclecloud.com' knife[:oraclecloud_domain] = 'myIDDOMAIN'

command: knife oraclecloud server list

I get the following error.

ERROR: Network Error: getaddrinfo: nodename nor servname provided, or not known Check your knife configuration and network settings

There are no other entries in the knife.rb file.

Thoughts?

adamleff commented 8 years ago

I believe your knife[:oraclecloud_api_url] entry is incorrect.

$ host https://api.compute.us0.oraclecloud.com
Host https://api.compute.us0.oraclecloud.com not found: 3(NXDOMAIN)

Fix that setting and you should be fine. If that doesn't correct the issue, please run knife with -VV so we get additional error logging and the resulting stack trace.

Thanks!

adamleff commented 8 years ago

Sorry, I jumped too quick at that conclusion, it's only partially right :) I left in the https:// in my host command which is wrong.

However, I do note bizarre behavior when I run the correct host command:

host api.compute.us0.oraclecloud.com
api.compute.us0.oraclecloud.com has address 92.242.140.21
Host api.compute.us0.oraclecloud.com not found: 3(NXDOMAIN)

If I run dig/host a few times, sometimes it works, and sometimes it doesn't. I suspect the oraclecloud.com DNS is experiencing an issue.

Please provide the output of knife oraclecloud server list -VV so we can verify that is indeed the case. Thanks!

matthewbaldwin commented 8 years ago

Thanks...user error! I had the wrong api url. I appreciate the assist!

adamleff commented 8 years ago

If only all issues were so easy! Glad we could help, and thanks for using the gem.