Foreman 1.4 and compute resources

Hi,

I'm trying to understand the templates for compute resources:

  • amazon only uses the assigned cloud-init template
  • openstack only uses the assigned finish template

Is this it? Because I can't see the cloud-init template on a new
amazon host and there is no finish template for a new amazon host.

Best regards,
Cristian Falcas

> Hi,
>
> I'm trying to understand the templates for compute resources:
> - amazon only uses the assigned cloud-init template
> - openstack only uses the assigned finish template
>
> Is this it? Because I can't see the cloud-init template on a new
> amazon host and there is no finish template for a new amazon host.
>

1.4 should have a new type of template called user data, but you first need
to mark your image that support userdata to use it.

Ohad

··· On Thu, Jan 30, 2014 at 3:35 PM, Cristian Falcas wrote:

Best regards,
Cristian Falcas


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/groups/opt_out.

Yes, by cloud-init I was thinking about user_data.

The thing is I can't put any finish templates to amazon hosts and no
user_data to openstack hosts.

··· On Thu, Jan 30, 2014 at 3:46 PM, Ohad Levy wrote: > > > > On Thu, Jan 30, 2014 at 3:35 PM, Cristian Falcas > wrote: >> >> Hi, >> >> I'm trying to understand the templates for compute resources: >> - amazon only uses the assigned cloud-init template >> - openstack only uses the assigned finish template >> >> Is this it? Because I can't see the cloud-init template on a new >> amazon host and there is no finish template for a new amazon host. > > > 1.4 should have a new type of template called user data, but you first need > to mark your image that support userdata to use it. > > Ohad >> >> >> Best regards, >> Cristian Falcas >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-users+unsubscribe@googlegroups.com. >> To post to this group, send email to foreman-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/groups/opt_out. > > > -- > You received this message because you are subscribed to the Google Groups > "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/groups/opt_out.

My main problem is that I can't start any hosts in amazon. It
rollbacks almost instantly.

Log:

==> /var/log/foreman/production.log <==

Started POST "/hosts" for 10.220.20.135 at 2014-01-30 09:42:34 -0500
Processing by HostsController#create as /
Parameters: {"utf8"=>"✓",
"authenticity_token"=>"y2ceSW+beC4NuRYvNbLQ1d05QmI8YRipm9zakCknBqs=",
"host"=>{"name"=>"sf", "organization_id"=>"12", "location_id"=>"17",
"hostgroup_id"=>"61", "compute_resource_id"=>"11",
"compute_profile_id"=>"", "environment_id"=>"2",
"puppet_ca_proxy_id"=>"1", "puppet_proxy_id"=>"1",
"puppetclass_ids"=>[""], "managed"=>"true",
"progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed",
"compute_attributes"=>{"flavor_id"=>"m1.small",
"availability_zone"=>"", "subnet_id"=>"subnet-495a7c0f",
"security_group_ids"=>[""], "managed_ip"=>"private",
"image_id"=>"ami-c9caf5a0"}, "mac"=>"", "domain_id"=>"9",
"architecture_id"=>"1", "operatingsystem_id"=>"14",
"provision_method"=>"image", "build"=>"1", "ptable_id"=>"1",
"disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"",
"enabled"=>"1", "comment"=>"", "overwrite"=>"false"},
"capabilities"=>"image"}
Rendering UserData template for sf.va-aws.company.net
Remove puppet certificate for sf.va-aws.company.net

==> /var/log/foreman/production.log <==
Rolling back due to a problem: [Set up compute instance
sf.va-aws.optymyze.net 2 failed [#<Host::Managed id: nil,
name: "sf.va-aws.optymyze.net", ip: nil, last_compile: nil,
last_freshcheck: nil, last_report: nil, updated_at: nil,
source_file_id: nil, created_at: nil, mac: nil, root_pass: nil,
serial: nil, puppet_status: 0, domain_id: 9, architecture_id: 1,
operatingsystem_id: 14, environment_id: 2, subnet_id: nil, ptable_id:
1, medium_id: nil, build: true, comment: "", disk: "", installed_at:
nil, model_id: nil, hostgroup_id: 61, owner_id: nil, owner_type: nil,
enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil,
image_file: nil, uuid: nil, compute_resource_id: 11, puppet_proxy_id:
1, certname: nil, image_id: 25, organization_id: 12, location_id: 17,
type: "Host::Managed", compute_profile_id: nil>, :setCompute]]
Remove puppet certificate for sf.va-aws.company.net

With openstack it seems that the floating IP issue is not fixed yet (I
use flat networking)? The hosts are launched successfully on
openstack, but foreman timeouts waiting for an IP.

Any ideas?

Best regards,

··· On Thu, Jan 30, 2014 at 4:01 PM, Cristian Falcas wrote: > Yes, by cloud-init I was thinking about user_data. > > The thing is I can't put any finish templates to amazon hosts and no > user_data to openstack hosts. > > On Thu, Jan 30, 2014 at 3:46 PM, Ohad Levy wrote: >> >> >> >> On Thu, Jan 30, 2014 at 3:35 PM, Cristian Falcas >> wrote: >>> >>> Hi, >>> >>> I'm trying to understand the templates for compute resources: >>> - amazon only uses the assigned cloud-init template >>> - openstack only uses the assigned finish template >>> >>> Is this it? Because I can't see the cloud-init template on a new >>> amazon host and there is no finish template for a new amazon host. >> >> >> 1.4 should have a new type of template called user data, but you first need >> to mark your image that support userdata to use it. >> >> Ohad >>> >>> >>> Best regards, >>> Cristian Falcas >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Foreman users" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to foreman-users+unsubscribe@googlegroups.com. >>> To post to this group, send email to foreman-users@googlegroups.com. >>> Visit this group at http://groups.google.com/group/foreman-users. >>> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Foreman users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to foreman-users+unsubscribe@googlegroups.com. >> To post to this group, send email to foreman-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/foreman-users. >> For more options, visit https://groups.google.com/groups/opt_out.

So the Amazon issue is now solved: the image that I had on the compute
resources was not valid anymore. Unfortunately there was no error
message indicating this.

··· On Thu, Jan 30, 2014 at 5:01 PM, Cristian Falcas wrote: > My main problem is that I can't start any hosts in amazon. It > rollbacks almost instantly. > > Log: > > ==> /var/log/foreman/production.log <== > > > Started POST "/hosts" for 10.220.20.135 at 2014-01-30 09:42:34 -0500 > Processing by HostsController#create as */* > Parameters: {"utf8"=>"✓", > "authenticity_token"=>"y2ceSW+beC4NuRYvNbLQ1d05QmI8YRipm9zakCknBqs=", > "host"=>{"name"=>"sf", "organization_id"=>"12", "location_id"=>"17", > "hostgroup_id"=>"61", "compute_resource_id"=>"11", > "compute_profile_id"=>"", "environment_id"=>"2", > "puppet_ca_proxy_id"=>"1", "puppet_proxy_id"=>"1", > "puppetclass_ids"=>[""], "managed"=>"true", > "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", > "compute_attributes"=>{"flavor_id"=>"m1.small", > "availability_zone"=>"", "subnet_id"=>"subnet-495a7c0f", > "security_group_ids"=>[""], "managed_ip"=>"private", > "image_id"=>"ami-c9caf5a0"}, "mac"=>"", "domain_id"=>"9", > "architecture_id"=>"1", "operatingsystem_id"=>"14", > "provision_method"=>"image", "build"=>"1", "ptable_id"=>"1", > "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"", > "enabled"=>"1", "comment"=>"", "overwrite"=>"false"}, > "capabilities"=>"image"} > Rendering UserData template for sf.va-aws.company.net > Remove puppet certificate for sf.va-aws.company.net > > ==> /var/log/foreman/production.log <== > Rolling back due to a problem: [Set up compute instance > sf.va-aws.optymyze.net 2 failed [# name: "sf.va-aws.optymyze.net", ip: nil, last_compile: nil, > last_freshcheck: nil, last_report: nil, updated_at: nil, > source_file_id: nil, created_at: nil, mac: nil, root_pass: nil, > serial: nil, puppet_status: 0, domain_id: 9, architecture_id: 1, > operatingsystem_id: 14, environment_id: 2, subnet_id: nil, ptable_id: > 1, medium_id: nil, build: true, comment: "", disk: "", installed_at: > nil, model_id: nil, hostgroup_id: 61, owner_id: nil, owner_type: nil, > enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, > image_file: nil, uuid: nil, compute_resource_id: 11, puppet_proxy_id: > 1, certname: nil, image_id: 25, organization_id: 12, location_id: 17, > type: "Host::Managed", compute_profile_id: nil>, :setCompute]] > Remove puppet certificate for sf.va-aws.company.net > > > With openstack it seems that the floating IP issue is not fixed yet (I > use flat networking)? The hosts are launched successfully on > openstack, but foreman timeouts waiting for an IP. > > Any ideas? > > Best regards, > > > > > On Thu, Jan 30, 2014 at 4:01 PM, Cristian Falcas > wrote: >> Yes, by cloud-init I was thinking about user_data. >> >> The thing is I can't put any finish templates to amazon hosts and no >> user_data to openstack hosts. >> >> On Thu, Jan 30, 2014 at 3:46 PM, Ohad Levy wrote: >>> >>> >>> >>> On Thu, Jan 30, 2014 at 3:35 PM, Cristian Falcas >>> wrote: >>>> >>>> Hi, >>>> >>>> I'm trying to understand the templates for compute resources: >>>> - amazon only uses the assigned cloud-init template >>>> - openstack only uses the assigned finish template >>>> >>>> Is this it? Because I can't see the cloud-init template on a new >>>> amazon host and there is no finish template for a new amazon host. >>> >>> >>> 1.4 should have a new type of template called user data, but you first need >>> to mark your image that support userdata to use it. >>> >>> Ohad >>>> >>>> >>>> Best regards, >>>> Cristian Falcas >>>> >>>> -- >>>> You received this message because you are subscribed to the Google Groups >>>> "Foreman users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send an >>>> email to foreman-users+unsubscribe@googlegroups.com. >>>> To post to this group, send email to foreman-users@googlegroups.com. >>>> Visit this group at http://groups.google.com/group/foreman-users. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Foreman users" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to foreman-users+unsubscribe@googlegroups.com. >>> To post to this group, send email to foreman-users@googlegroups.com. >>> Visit this group at http://groups.google.com/group/foreman-users. >>> For more options, visit https://groups.google.com/groups/opt_out.

Last i heard 1.4 was supposed to fix this? i'm also very keen to see this
bug fixed, as i dont need floating IP's either. I guess i wont be upgrading
yet…

the only way i've found around this is to provision using the floating IP,
then on your DNS server, freeze, edit, and thaw the DNS records Foreman
creates to point at the correct IP's, then disassociate the floating IP's.

··· On Thursday, January 30, 2014 11:01:09 PM UTC+8, Cristian Falcas wrote: > > > With openstack it seems that the floating IP issue is not fixed yet (I > use flat networking)? The hosts are launched successfully on > openstack, but foreman timeouts waiting for an IP. > > Any ideas? > >

1.4.1 contained a fix for this, Foreman now cycles through all the IPs
Fog returns, testing them for SSH access and then using the first one
that replies as the IP in Foreman. Feedback welcome :slight_smile:

··· On 4 March 2014 00:55, Rowcliffe Browne wrote: > On Thursday, January 30, 2014 11:01:09 PM UTC+8, Cristian Falcas wrote: >> >> >> With openstack it seems that the floating IP issue is not fixed yet (I >> use flat networking)? The hosts are launched successfully on >> openstack, but foreman timeouts waiting for an IP. >> >> Any ideas? >> > > Last i heard 1.4 was supposed to fix this? i'm also very keen to see this > bug fixed, as i dont need floating IP's either. I guess i wont be upgrading > yet...