ggiamarchi / vagrant-openstack-provider

Use Vagrant to manage OpenStack Cloud instances.
MIT License
247 stars 101 forks source link

Fix heat stack create when multiple machines are declared #260

Closed ggiamarchi closed 8 years ago

ggiamarchi commented 8 years ago

Vagrant launches the stack creation for each machine. Obviously, the second time fails because the stack already exists.

2015-11-23 14:25 | DEBUG | response => code    : 409
2015-11-23 14:25 | DEBUG | response => headers : {:content_type=>"application/json; charset=UTF-8", :content_length=>"214", :x_openstack_request_id=>"req-7f959980-42bf-47ae-a1e8-bacb464e4506", :date=>"Mon, 23 Nov 2015 13:25:44 GMT"}
2015-11-23 14:25 | DEBUG | response => body    : {"explanation": "There was a conflict when trying to complete your request.", "code": 409, "error": {"message": "The Stack (vagrant) already exists.", "traceback": null, "type": "StackExists"}, "title": "Conflict"}

This patch avoid to run the stack creation multiple times. Now the stack creation is run only once before the first machine creation.

ggiamarchi commented 8 years ago

Self merge :smiling_imp: