Skip to content
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

Cant launch cluster in VPC - WARNING: undefined method `group_id' for nil:NilClass #295

Open
willejs opened this issue Jun 3, 2013 · 13 comments

Comments

@willejs
Copy link

willejs commented Jun 3, 2013

When trying to launch a cluster, i receive the following error:

http://pastebin.com/r29jSrWd

Really cant understand exactly why or where this is coming from, scanned the code and tripple checked the cluster definition against docs and examples, with no luck.

It is creating the security group and rules, but then fails.

@temujin9
Copy link
Contributor

temujin9 commented Jun 4, 2013

I believe the offending statement may be the auto_elastic_ip: see #268 for more details. For now, the workaround is to manually create and assign an elastic_ip.

Closing this as a duplicate.

@temujin9 temujin9 closed this as completed Jun 4, 2013
@willejs
Copy link
Author

willejs commented Jun 4, 2013

@temujin9 sorry, i should have said. I tried it without auto_elastic_ip, and also declaring an elastic_ip and got the same error and resulting stack trace. i just retried that too and have the same issue.

I thought that maybe it wasnt fetching the group id of the security group it had created?

@temujin9
Copy link
Contributor

temujin9 commented Jun 4, 2013

Hrm; okay, that's certainly possible. Two things to try:

  1. Name the security group you're using without a dash; there may be something that's parsing that name incorrectly.
  2. Update to the latest gem, by running bundle update in your homebase, and try again.

Let me know if either of those fixes your problem. If it's the former, I'll reopen this, since that's a novel bug.

@willejs
Copy link
Author

willejs commented Jun 5, 2013

I removed the dash, and im already running ironfan (4.10.3), but the problem still persists.

thanks for your help

@temujin9
Copy link
Contributor

temujin9 commented Jun 5, 2013

Latest is 4.10.4, which shouldn't change this at all. Okay, reopening, this is novel.

Can you drop the security group statement entirely? I want to see if it's the one you're stating, or one of the built-in groups, that's causing this.

@temujin9 temujin9 reopened this Jun 5, 2013
@willejs
Copy link
Author

willejs commented Jun 5, 2013

I just deleted the statement, and it still presents the same error. What exactly do you mean by built in groups?

@temujin9
Copy link
Contributor

temujin9 commented Jun 5, 2013

The facet and the cluster both should be creating security groups named
after them. Can you check to see if either of those are missing?

Cheers,

Nathaniel Eliot
T9 Productions

On Wed, Jun 5, 2013 at 11:59 AM, willejs notifications@github.com wrote:

I just deleted the statement, and it still presents the same error. What
exactly do you mean by built in groups?


Reply to this email directly or view it on GitHubhttps://github.com//issues/295#issuecomment-18991714
.

@willejs
Copy link
Author

willejs commented Jun 5, 2013

So, it seems that its actually creating the cluster and facet security groups in ec2 not in the vpc atall.
The additional declared groups (e.g. ssh-vpc) are created in the vpc.

Strange? Im going to have a read of the code later to see if i can see whats going on. any ideas?

@willejs
Copy link
Author

willejs commented Jun 10, 2013

Couldent see anything obvious when i browsed through the source. Any chance you could have a quick look?

@lyrixx
Copy link

lyrixx commented Jun 10, 2013

Hello.
I got an similar issue.

My conf:

facet :frontend do
    cloud(:ec2).elastic_ip 'xxx.xxx.xxx.xxx'
end

Stack trace:

WARNING: Error running #<Ironfan::Broker::Computer(server=#<Ironfan::Dsl::Server(name="0", run_list_items=c{ ubuntu, apt, sensiolabs_git, role[git_d1-cluster], role[git
_d1-frontend-facet] }, clouds=c{ ec2 }, volumes=c{ postgres, git }, environment="git_d1", cluster_role=#<Ironfan::Dsl::Role>, facet_role=#<Ironfan::Dsl::Role>, cluster_
name="git_d1", facet_name="frontend")>, resources=c{ elastic_ip, ebs_volume__git_d1-frontend-0-postgres, ebs_volume__git_d1-frontend-0-git, keypair, security_group__git
_admin, security_group__git_d1 }, drives=c{ postgres, git, root, ephemeral0 }, providers=c{ chef, iaas })>:
WARNING: undefined method `include?' for #<Ironfan::Dsl::Ec2:0x9466b90>
ERROR: undefined method `include?' for #<Ironfan::Dsl::Ec2:0x9466b90> (NoMethodError)
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan/provider/ec2/elastic_ip.rb:62:in `save!'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan/broker/computer.rb:96:in `block in save'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan/broker/computer.rb:96:in `each'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan/broker/computer.rb:96:in `save'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan/broker/computer.rb:79:in `launch'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan/broker/computer.rb:316:in `block in launch'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan.rb:35:in `block (3 levels) in parallel'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan.rb:134:in `safely'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan.rb:34:in `block (2 levels) in parallel'
ERROR: /var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan/provider/ec2/elastic_ip.rb:62:in `save!'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan/broker/computer.rb:96:in `block in save'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan/broker/computer.rb:96:in `each'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan/broker/computer.rb:96:in `save'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan/broker/computer.rb:79:in `launch'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan/broker/computer.rb:316:in `block in launch'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan.rb:35:in `block (3 levels) in parallel'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan.rb:134:in `safely'
/var/lib/gems/1.9.1/gems/ironfan-4.10.4/lib/ironfan.rb:34:in `block (2 levels) in parallel'
WARNING: Error launching #<NoMethodError: undefined method `include?' for #<Ironfan::Dsl::Ec2:0x9466b90>>; skipping after-launch tasks

@lyrixx
Copy link

lyrixx commented Jun 10, 2013

Note: I got the same stack trace if I move the code outside the face block

@temujin9
Copy link
Contributor

@willejs - I'm 90% certain there's something b0rked about the implementation of security groups against VPC, such that it's creating those automatic groups as regular groups instead of VPC groups. I don't remember it doing so in past, so it's likely a regression, but its been a while since I last used the VPC setup.

I can't promise a high-speed fix on this one: with the transition to private consulting, I'm juggling a lot of balls. I can say that bug-fixes take priority over new features, and so this will probably get addressed fairly soon. If you're feeling gutsy, the steps to start tracking down the problem yourself are very basically: a) clone the Ironfan repo, b) point your homebase at the clone, c) start dropping in diagnostic code snippets, and trying commands you know will exercise those snippets. Lemme know if you go this route and want additional pointers.

@lyrixx - this looks like a different problem; could you please open a new issue?

@lyrixx
Copy link

lyrixx commented Jun 10, 2013

@temujin9 Ok. I open a new issue at #298

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants