Not sure if this has been posted or not but figured I would post it anyways since I just got done talking to an agent.
I was having major issues with attaching public IPs to my instances.
Hopefully this helps someone else.
Chat Started: 03-07-2012 21:47:31
Holt G.: Thank you for contacting HP Cloud Services! My name is Holt, how may I help you today?
You: I have been having this issue for weeks now, constantly failing to attach a public IP
Holt G.: Ah I see. What browser are you using?
You: But have tried Firefox and IE
Holt G.: Ah ok, so what happens when you try to attach a public IP? The icon spins and nothing ever happens or is there any error messages given?
You: An error message always appears and the licon spins "forever"
Holt G.: AH I see. What does the error message say?
You: "Failed to allocate public IP address"
Holt G.: Ok I see. Have you ever been able to attach a public IP to any instances?
You: A couple a while back, after many attempts
Holt G.: Ok, lets try something. Do you have any instances with a public IP still attached?
Holt G.: Ok, SSH into one of them real quick, and we are going to check out a couple things using the NOVA API.
Holt G.: you may have to set it up real quick if you have never used nova, here is the doc on how to install it : https://connect.hpcloud.com/article/python-novaclient-installation
Holt G.: Its only a few steps though, so I can hang around if you need to do that real quick
You: Alright, will do. Just a second.
Holt G.: For sure, let me know once you have nova installed or if you run into any issues setting it up
You: Alright, done
Holt G.: ok so type 'nova help'
Holt G.: Does this bring up a bunch of commands?
Holt G.: If so, then nova was installed correctly
Holt G.: Ok cool
Holt G.: ok so type 'nova floating-ip-list'
You: "Invalid OpenStack Nova credentials"
Holt G.: Ah yea, that means your info just wasnt entered correctly in step 3 of that doc. So you entered those export statements into the bashrc file and sourced it after eh?
Holt G.: can you copy and paste me those export statements you entered in the bashrc file? Removing your password of course...just want to make sure the format is right
You: export NOVA_USERNAME=YOUR_EMAILexport NOVA_PASSWORD=YOUR_PASSWORDexport NOVA_PROJECT_ID=YOUR_EMAIL-default-tenantexport NOVA_URL=https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/export
Holt G.: ah, i see the issue. you need to put in your own info
You: I didn't actually change anything as I didn't create an account
Holt G.: Oh sorry, that is your cloud account info, so the same email and such you use to log into the management console
Holt G.: for example export NOVA_USERNAME = firstname.lastname@example.org export NOVA_PASSWORD = ABC123....and so on
Holt G.: you only need to replace info f or the username, password, and projectID export statments, the other 3 are fine as they are
Holt G.: so the 3rd one would look like, export NOVA_PROJECT_ID = email@example.com
You: alright, will do. Just a second.
Holt G.: This is so NOVA can authorize with your credentials so it can do stuff with your instances.
Holt G.: and make sure you source the bashrc file when done editing that info after you save it
You: Alright, did that, got it working. The nova command is now spitting out info
Holt G.: Awesome! Ok it should show a bunch of IPS and their related instances. Do you see any IPs that are not associated with an instance?
Holt G.: ok, so we can delete those, so type 'nova floating-ip-delete IPADRESS' (such as 'nova floating-ip-delete 220.127.116.11)
+| Ip | Instance Id | Fixed Ip | Pool |+
+| 18.104.22.168 | None | None | || 22.214.171.124 | None | None | || 126.96.36.199 | None | None | || 188.8.131.52 | None | None | || 184.108.40.206 | None | None | || 220.127.116.11 | None | None | || 18.104.22.168 | None | None | || 22.214.171.124 | None | None | || 126.96.36.199 | None | None | || 188.8.131.52 | None | None | || 184.108.40.206 | None | None | || 220.127.116.11 | None | None | || 18.104.22.168 | None | None | || 22.214.171.124 | None | None | || 126.96.36.199 | None | None | || 188.8.131.52 | None | None | || 184.108.40.206 | None | None | || 220.127.116.11 | None | None | || 18.104.22.168 | 44666 | 10.6.17.228 | || 22.214.171.124 | 44667 | 10.6.17.229 | |+
You: well that formatting didn't work, sorry about that.
Holt G.: Its ok, basically you want to delete all the public IPs that have no instance associated with them with the previously stated command
Holt G.: Ill give you a few min to do that
You: Alright, will do. Thank you.
Holt G.: No problem, let me know once you have done that
Holt G.: If this ends up working, ill explain what happened too as well so you know what the problem was and why this fixed it
You: Alright, removed all the ones needed
Holt G.: Cool. Now go to your management console, refresh the page (if you are still in it), and try to attach a public IP to another instance and let me know how that goes.
You: Same issue unfortunately.
Holt G.: Hmm, try to boot up a fresh instance and see if you can attach one
You: Alright, just a moment.
Holt G.: Cool, no rush
You: Deleted an instance, created a new one, tried attaching a public IP, same issue.
Holt G.: Same error or does the icon just spin now with no error?
You: Same error and same spinning icon
Holt G.: Ok. Do this real quick, go back into that instance with nova and just type that 'nova floating-ip-list' command again
Holt G.: And see what it shows
Holt G.: Let me know if its still showing those IPs you deleted
You: Nope, only the instances that have an IP. The ones deleted are gone.
Holt G.: Ah, ok. So one another thing to try real quick, sorry just eliminating variables here, go into the other compute cluster (availability zone) and try to attach a public IP on a fresh instance. So if you are in AZ2 right now try to do that in AZ1
You: Alright, just a moment
Holt G.: or vice versa, if you are trying this in AZ1 then try AZ2
Holt G.: Ok cool
You: Alright, progress. Deleted a instance in AZ2, created a new one, attached a public IP successfully.
Holt G.: Ah good to hear!
Holt G.: Let me get you up to speed on what the issue is here...so basically
Holt G.: There is a 20 public IP limit per availability zone. Sometimes when you delete an instance with a public IP the instance will be deleted but the public IP will still be floating around as apart of the 20 limit rule, hence why we did that NOVA stuff to delete those IPs not associated with any instances. So even if you had 1 instance with a public IP attached, there could be 19 others still floating around taking up space as apart of the 20 IP limit per AZ.
Holt G.: So if thats the case, when you try to create a new one, it will give you that message because there are 20 IPS floating around, attached to an instance or not. Normally when you delete an instance the pub IP should be deleted as well. What may be happening to your original AZ
Holt G.: is that NOVA is just being slow on deleting those floating IPs. Its doing stuff still behind the scenes
You: Alright, that makes sense. But when we cleared out the floating IPs in AZ1 shouldn't that have fixed some of those issues?
You: Ah, gotcha
Holt G.: Yes thats absolutely correct
Holt G.: So lets do this. Im going to make a case for you
Holt G.: And email you back in about an hour to see if you can attach any public IPs then for that AZ giving issues
Holt G.: If you still cant, then there is some else going on and I will escalate the ticket to our devs to see whats going on!
You: Alright, sounds good to me.
Thank you so much for all your help.
Holt G.: No problem Cole! This is what i am here for
You: Just one more quick question
Holt G.: For sure, whats up?
You: With Nova, is that linked to each area or the account as a whole? As in, when I cleared out the floating IPs using my AZ1 box did that clear up and issues I previously had with AZ2? Since I was never able to attach a public IP in AZ2 until just a couple minutes ago? If not, would it be a good idea to SSH into one of my AZ2 boxes and run the same nova process?
Holt G.: Ah, yes it is per availability zone. So if you set up nova within an instance on AZ1 you can only do stuff with nova for the instances and IPs in that AZ. Did you setup NOVA in the same AZ as the one that was having issues? If not then yes you will have to do the same nova process for the other AZ real quick
You: When we originally setup NOVA, that was on AZ1, which is the area still having issues. I did not set it up on AZ2, although AZ2 was having the same exact issue as AZ1. But for some reason after we did all of that on AZ1 and then moved over to AZ2, I was able to attach a public IP on AZ2. Just a bit confused why AZ2 started working out of the blue like that.
Holt G.: Oh I see, yea that is kinda weird..hmm...if you want you can try to go into AZ2 and setup NOVA real quick and clear out some floating IPs we can see if that helps AZ1?
You: Sure thing. Give me a few minutes.
Holt G.: Sounds good, let me know once you give that a go
You: Alright, setup nova on AZ2, has no floating IPs, just the instances with IPs that I want.
Holt G.: Ok thats cool. Try to go into AZ1 real quick and see if you can attach any now.
You: Alright, in AZ1 I still can't attach public IPs to existing instances. Give me a sec and I will delete one and try creating a new one.
Holt G.: Ok yea, if still the same issue with a new one than I will create that case and escalate it for further investigation
You: Same issue...
Holt G.: Ok. Ill go ahead and do that case stuff. We did have a couple issues on our end pop up within the past couple hours that may be effected that those floating ips from releasing 100% properly.
Holt G.: Im going to email you shortly just to gather some more info and I will pass along the info to our devs so they can see what exactly is going on.
You: Alright, sounds good to me. At least I have one more instance working now than I did before. haha. I really appreciate all the help and your patience.
You: Will do, sounds great.
Holt G.: Ah, no problem Cole! And yea good thing we made some progress!
Anything else other than the original issue?
You: I think you have done everything you can for the time being. Thanks again.
Holt G.: You're welcome. You will hear from me soon via email. Have a nice day!
You: You too, take care.
This chat has been ended by the operator.
if you have floating ips, delete them using 'nova floating-ip-delete IP_ADDRESS'
They ended up filing a ticket for the issue but I was able to get one more instance up, although I think that may have just been luck?!