-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ipaddress gem breaks aws-sdk RESTXMLClient #49
Comments
Unfortunately the reproduction needs AWS access keys which I can't obviously give here :( |
Thanks for the bug report. One of the goals of IPAddress 1.0 is to remove all monkey patching. There's not much but I definitely want to clean up the code. I'll let you know when master is updated so you can check if the bug is still there. |
@garo can you confirm if this happens with AWS-SDK v2 which was released last month? |
This one will be tricky. There is no sandbox env for Route53, so the only way to test API calls is to purchase a subscription, etc. I was hoping to use pry to get the http request sent from the sdk to the server to see exactly where the issue originates from. What Ruby version are you using, 1.8 by any chance? |
I think this may be the monkey patch causing this: #140 It's on it's way out. Closing this issue. Let me know if you don't think this is the fix. |
ipaddress is used with the Chef Ohai component, which caused a really bizarre problem: When aws-sdk (1.51.0, the newest atm) is used to do a create_health_check request it can't correctly send xml property named "IPAddress" to the aws api.
How to reproduce with irb:
This prints that the following data is sent to the api:
"<CreateHealthCheckRequest xmlns=\"https://route53.amazonaws.com/doc/2013-04-01/\">\n <CallerReference>foo</CallerReference>\n <HealthCheckConfig>\n <Type>HTTP</Type>\n <ResourcePath>/check</ResourcePath>\n </HealthCheckConfig>\n</CreateHealthCheckRequest>"
(notice that there's no
<IPAddress>54.84.217.101</IPAddress>
tag)Now another irb session without ipaddress gem:
prints:
"<CreateHealthCheckRequest xmlns=\"https://route53.amazonaws.com/doc/2013-04-01/\">\n <CallerReference>foo</CallerReference>\n <HealthCheckConfig>\n <IPAddress>54.84.217.101</IPAddress>\n <Type>HTTP</Type>\n <ResourcePath>/check</ResourcePath>\n </HealthCheckConfig>\n</CreateHealthCheckRequest>"
So the ipaddress module is somehow monkey-patching something which breaks the aws-cli. the aws-cli builds the requests based on a yaml config which maps ruby property names into xml tags. Editing this yml and replacing the "IPAddress" tag definition with another name, say "IPAddress2" will result that the tag is rendered correctly.
There's at least one other user who was struct with this very same bug: https://forums.aws.amazon.com/thread.jspa?threadID=128785
The text was updated successfully, but these errors were encountered: