Skip to content

Commit

Permalink
[aws|compute] tags are reset when reloading. fog#570.
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanegan committed Oct 22, 2011
1 parent 16040a0 commit c1c4386
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fog/aws/models/compute/server.rb
Expand Up @@ -169,10 +169,10 @@ def save
data = connection.run_instances(image_id, 1, 1, options)
merge_attributes(data.body['instancesSet'].first)

if self.tags
if tags = self.tags
# expect eventual consistency
Fog.wait_for { self.reload rescue nil }
for key, value in self.tags
for key, value in (self.tags = tags)
connection.tags.create(
:key => key,
:resource_id => self.identity,
Expand Down

0 comments on commit c1c4386

Please sign in to comment.