New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Security groups in facet misbehaving #158
Comments
+1 on the critical tag for this one :-) |
I think this is somewhat related, the first time we launch a server that creates a new security group, we get this sort of error:
|
Actually @meekmichael, I think the stack trace you've reported is unrelated. The bug you're talking about can probably be resolved with something like this:
|
I'm hot on the trail of this bug, but I could use some help from @mrflip or @temujin9 because the root cause appears to be deep in the bowels of the Ironfan code related to cluster resolution. Specifically if you expand the example above to a two-facet cluster: Ironfan.cluster 'tiny' do
cloud(:ec2) do
flavor 'm1.small'
security_group(:ssh).authorize_port_range(22)
mount_ephemerals
end
facet :web do
instances 1
cloud(:ec2) do
flavor 't1.micro'
security_group(:web).authorize_port_range(80)
end
end
facet :mysql do
instances 1
cloud(:ec2) do
flavor 'm1.xlarge'
security_group(:mysql).authorize_port_range(3306)
end
end
end then a few curious things happen:
This is happening in the call in cluster.resolve here: https://github.com/infochimps-labs/ironfan/blob/master/lib/ironfan/broker.rb#L16 Specifically, the actual corruption appears in https://github.com/infochimps-labs/ironfan/blob/master/lib/gorillib/resolution.rb#L47 at the moment when field_names == :facets. At that moment, the read_resolved_attribute call causes some internal pollution effects which can be noticed when Ironfan.load_cluster('sparky').cloud(:ec2) suddenly takes on the same "flavor" and "security_groups" attribute values that one would find in Ironfan.load_cluster('sparky').facets[:mysql].cloud(:ec2) Any help here would be greatly appreciated! |
Specs added for this issue when we get it nailed down. 0ca6884 |
Sorry for the reference noise! I need to look at my github settings to see how to prevent mentions in my own github account from appearing in the Infochimps issue tracking history. @hustonhoburg, do you mind letting me know if my pull request fixes the issue you're having? |
note: https://github.com/infochimps-labs/ironfan/tree/cloud_merge_borkage has the code from #175 merged on top of my recent changes Nick -- I don't know if saying 'WIP' in the commit does anything for that, but I know that github does understand it to be 'work in progress'. I also know a force push will not create duplicates (only the latest will show) but that of course requires nobody else noticing the branch you're forcing to. |
@nickmarden FYI, we tested this internally, and it fixes the issue. Thanks again. |
The following definition results in an instance with the
sparky
andsparky-web
security groups, but nossh
security group.However, removing the security group definition from the web facet, creates an instance with the
ssh
group as well as thesparky
andsparky-web
groups. Facet security group definitions seem to be clobbering those defined in the cluster?The text was updated successfully, but these errors were encountered: