#13 new
ehaselwanter

building manifest fails

Reported by ehaselwanter | December 10th, 2008 @ 01:12 PM

don't know if I'm doing something wrong but for

pool :netociety do
cloud :app do using :vb instances 1..1 end end

i get:

vb is ec2 with a hardcoded response

  def launch_new_instance!(num=1)

instance = ec2.run_instances(

:image_id => (ami || Base.ami),

:user_data => "",

:minCount => 1,

:maxCount => num,

:key_name => (keypair || Base.keypair),

:availability_zone => (availabilty_zone || Base.availabilty_zone),

:instance_type => "#{size || Base.size}",

:group_id => ["#{security_group || Base.security_group}"])

    begin

h = EC2ResponseObject.get_hash_from_response(instance)

h= {
:instance_id => "resp.instanceId", :name => "resp.instanceId", :ip => "192.168.0.6" , :status => "running", # resp.instanceState.name, :launching_time => Date.today.to_s.parse_datetime , #resp.launchTime.parse_datetime, :internal_ip => "resp.privateDnsName", :keypair => "netociety_app", :security_group => "group" } #h = instance.instancesSet.item.first rescue Exception => e h = instance end h end

  def describe_instances
    id = 0
    x = get_instances_description.each_with_index do |h,i|
      if h[:status] == "running"
        inst_name = id == 0 ? "master" : "node#{id}"
        id += 1
      else
        inst_name = "#{h[:status]}_node#{i}"
      end
      h.merge!({
        :name => inst_name,
        :hostname => h[:ip],
        :ip => h[:ip],
        :index => i,
        :launching_time => (h[:launching_time])
      })
    end.sort {|a,b| a[:index] <=> b[:index] }
  end
  # Get the s3 description for the response in a hash format
  def get_instances_description
    [{
    :instance_id => "resp.instanceId",
    :name => "resp.instanceId",
    :ip => "192.168.0.6" ,
    :status => "running", # resp.instanceState.name,
    :launching_time =>  Date.today.to_s.parse_datetime , #resp.launchTime.parse_datetime,
    :internal_ip => "resp.privateDnsName",
    :keypair => "netociety_app",
    :security_group => "group"
    }]

EC2ResponseObject.get_descriptions(ec2.describe_instances)

  end

*** Starting cloud app 1 running instances (1 - 1)
Starting the master instance
Launching and configuring the master
Requesting to launch new instance

Waiting for there to be no pending instances...

Provisioning master...
Building new manifest configuration file (forced: false)
Building manifest
/Users/ehaselwanter/NetBeansProjects/poolparty/bin/../lib/poolparty/poolparty/resources/class_package.rb:25:in classpackage_with_self'ruby(18107) malloc: *** mmap(size=478150656) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug ruby(18107) malloc: *** mmap(size=478150656) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug : undefined methodname' for #Hash:0x19a4df8 (NoMethodError) from /Users/ehaselwanter/NetBeansProjects/poolparty/bin/../lib/poolparty/poolparty/cloud.rb:177:in build_short_manifest' from /Users/ehaselwanter/NetBeansProjects/poolparty/bin/../lib/poolparty/poolparty/cloud.rb:175:ineach' from /Users/ehaselwanter/NetBeansProjects/poolparty/bin/../lib/poolparty/poolparty/cloud.rb:175:in build_short_manifest' from /Users/ehaselwanter/NetBeansProjects/poolparty/bin/../lib/poolparty/core/object.rb:22:inreturning' from /Users/ehaselwanter/NetBeansProjects/poolparty/bin/../lib/poolparty/poolparty/cloud.rb:171:in build_short_manifest' from /Users/ehaselwanter/NetBeansProjects/poolparty/bin/../lib/poolparty/poolparty/cloud.rb:160:inbuild_manifest' from /Users/ehaselwanter/NetBeansProjects/poolparty/bin/../lib/poolparty/poolparty/cloud.rb:124:in build_and_store_new_config_file' from /Users/ehaselwanter/NetBeansProjects/poolparty/bin/../lib/poolparty/helpers/provisioner_base.rb:174:insetup_runner' ... 9 levels... from /Users/ehaselwanter/NetBeansProjects/poolparty/bin/../lib/poolparty/poolparty/cloud.rb:17:in with_cloud' from /Users/ehaselwanter/NetBeansProjects/poolparty/bin/cloud-start:12 from /Users/ehaselwanter/NetBeansProjects/poolparty/bin/cloud-start:11:ineach' from /Users/ehaselwanter/NetBeansProjects/poolparty/bin/cloud-start:11

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Elastic cloud computing framework

People watching this ticket

Pages