Closed boechat107 closed 5 years ago
Thanks for reporting this.
Indeed, it seems that just splitting the result returned here would be sufficient, but I'm curious to understand under what circumstances multiple addresses are returned and what they mean.
Can you share some examples of what you get when multiple addresses are returned? Do you know what the difference is between the various returned addresses?
These are good questions, but I don't have good answers to them. I guess it is the ISP provider doing NAT on outbound connections. So, getting the public address is almost unpredictable... Does it make sense?
The problem happened only once so far, when I was working from a specific network. I confess I didn't check if the IPs made any sense.
I submitted the issue because I was unable to launch a cluster. However, thinking better now, I'm not sure if I would be able to do it even if this issue was fixed.
I posted a question about this on Stack Overflow to see if we can get more information about what's going on here.
OK. I've also searched for answers on Stack Overflow before, but I still don't know exactly what happened. I know that the network I was in has at least two different ISPs.
I'm also not sure about the influence of request headers. From my home network, these are screenshots using two different browsers, Opera and Firefox:
They used slightly different headers.
Using curl
I get the same response as Firefox.
For the network I'm in, "checkip" returns multiple IP addresses separated by commas. Flintrock just adds a subnet mask and tries to create the security group rules. Then I get the following exception:
Line where the exception is thrown: https://github.com/nchammas/flintrock/blob/master/flintrock/ec2.py#L600
Might a simple solution be just splitting the string and using only the first IP?