Only master node changes
Avoids logs messages and changes to on nodes other than master,
since these changes will be overwritten.
@@ -937,10 +937,15 @@ class Djinn
}
enforce_options
+ # We need to make sure this node is listed in the started nodes.
+ find_me_in_locations
+ return "Error: Couldn't find me in the node map" if @my_index.nil?
+
# From here on we do more logical checks on the values we received.
# The first one is to check that max and min are set appropriately.
# Max and min needs to be at least the number of started nodes, it
# needs to be positive. Max needs to be no smaller than min.
+ if my_node.is_shadow?
@state_change_lock.synchronize {
if Integer(@options['max_machines']) < @nodes.length
Djinn.log_warn("max_machines is less than the number of nodes!")
@@ -956,10 +961,6 @@ class Djinn
end
}
- # We need to make sure this node is listed in the started nodes.
- find_me_in_locations
- return "Error: Couldn't find me in the node map" if @my_index.nil?
-
@state_change_lock.synchronize {
ENV['EC2_URL'] = @options['ec2_url']
if @options['ec2_access_key'].nil?
@@ -968,6 +969,7 @@ class Djinn
@options['ec2_url'] = @options['EC2_URL']
end
}
+ end
'OK'
end
