Ask Your Question
0

instance name already exists error when launch a new instance

asked 2013-05-16 09:31:36 -0500

lifubj gravatar image
I launched 3 instances successfully, with nova.conf  instance_name_template=newTest-%08x, so the instance names would be: newTest-00000001, newTest-00000002, newTest-00000003. (I'm using powervm for testing, but this situation may happen on other platforms, in my case, the instances are in the hypervisor, not on my computer)

the problem is:  when I  restart my computer, without deleting the instances.
and then rerun openstack and launch instance, with the same config file, error ocures:

2013-05-14 14:48:37 TRACE nova.openstack.common.rpc.amqp raise exception.InstanceExists(name=instance['name']) 2013-05-14 14:48:37 TRACE nova.openstack.common.rpc.amqp InstanceExists: Instance newTest-00000001 already exists.

newTest-00000001 still exists in hypervisor, but the default name will set from newTest-00000001, conflict occurs. after 3 times of error launching, the name would be newTest-00000004, then the fouth time of launching will success.

I know it is because when my computer shut down, the data store in database would be lost, but the instances launched before would still in the hypervisor, so next time the openstack running, the local database is clean, and the instance name will begin with newTest-00000001, and confict with the instance name on the hypervisor.

but does anyone know how to fix this problem, without deleting everthing I launched in the hypervisor? is this a bug? or I've done something wrong?

edit retag flag offensive close merge delete

7 answers

Sort by ยป oldest newest most voted
0

answered 2013-05-22 01:44:27 -0500

lifubj gravatar image

I still need some time to get the script work, but I think your answers did solve this problem, thanks a lot.

edit flag offensive delete link more
0

answered 2013-05-22 01:44:41 -0500

lifubj gravatar image

Thanks Jay Lau, that solved my question.

edit flag offensive delete link more
0

answered 2013-05-17 01:31:30 -0500

lifubj gravatar image

Hi, Jay, Yes I'm using devstack to build Openstack on Ubuntu12.04. Any more info do I need to provide, please let me know. thanks.

edit flag offensive delete link more
0

answered 2013-05-16 13:53:10 -0500

jay-lau-513 gravatar image

Hi Daniel,

Are you using devstack? Which version of OpenStack are you using?

Can you describe your environment more clear?

edit flag offensive delete link more
0

answered 2013-05-17 14:31:10 -0500

jay-lau-513 gravatar image

OK, when you compute restart, please do not relaunch devstack but try to restart all service directly.

Refer to http://www.scalegrid.net/blog/?p=52 for detail, you may want to do some update for the script to match your version for devstack. Thanks.

edit flag offensive delete link more
0

answered 2013-05-21 03:29:36 -0500

lifubj gravatar image

Jay, Thanks for your answer, I think this may solve my problem, since I checked my mysql database. but could you tell me how to restart all services correctly, I still got some problems to manual start openstack services. I use ps -ef | grep nova to check the services after I run devstack and keep the record for manual restarting. do you have any sugestions? Thanks.

edit flag offensive delete link more
0

answered 2013-05-21 13:23:27 -0500

jay-lau-513 gravatar image

You may also want to start up keystone and glance.

Does the script help?

wget http://www.scalegrid.net/blog/wp-cont... mv ./restart_stack.txt ./restart_stack.sh chmod 775 ./restart_stack.sh ./restart_stack.sh

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-05-16 09:31:36 -0500

Seen: 407 times

Last updated: May 22 '13