1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

Bug #2156: Role stores last vm name used

(cherry picked from commit 17a651378dfadbf6fde7134941ec621f5bfa6e2d)
This commit is contained in:
Carlos Martín 2013-07-22 16:38:13 +02:00
parent 3056486068
commit 48d1ac4162

View File

@ -236,8 +236,11 @@ module OpenNebula
def deploy(scale_up=false)
n_nodes = cardinality() - get_nodes.size
@body['last_vmname'] ||= 0
n_nodes.times { |i|
vm_name = "#{@body['name']}_#{i}_(service_#{@service.id()})"
vm_name = "#{@body['name']}_#{@body['last_vmname']}_(service_#{@service.id()})"
@body['last_vmname'] += 1
template_id = @body['vm_template']