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

B #5110: race condition vdc (#266)

Signed-off-by: Jorge Lobo <jlobo@opennebula.io>
This commit is contained in:
Jorge Miguel Lobo Escalona 2020-09-29 14:42:26 +02:00 committed by GitHub
parent 742d7109f3
commit f4dc20b187
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,8 +138,12 @@ class SunstoneServer < CloudServer
if OpenNebula.is_error?(rc)
return [500, rc.to_json]
else
resource.info
return [201, resource.to_json]
rc = resource.info
if OpenNebula.is_error?(rc)
return [201, "{\"#{kind.upcase}\": {\"ID\": \"#{resource.id}\"}}"]
else
return [201, resource.to_json]
end
end
end
@ -217,6 +221,7 @@ class SunstoneServer < CloudServer
return [404, resource.to_json]
end
rc = resource.perform_action(action_json)
if OpenNebula.is_error?(rc)
return [500, rc.to_json]
else