Project

General

Profile

Actions

Feature #3625

open

Provisioning a Windows Server on ec2 via Foreman Fails

Added by Kanwar Batra over 10 years ago. Updated about 10 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Compute resources
Target version:
-
Difficulty:
medium
Triaged:
Fixed in Releases:
Found in Releases:

Description

I am in the process of configuring a Windows 2008 ec2 instance . The following is what I've noticed

a) The provisioning cycle starts without any issue
b) The EC2 instances start on the AWS interface
c) The DNS gets registered
d) The Windows server build on Foreman abort with no clear message except stating "Waiting to Come online - 2001" Failed.

Actions #1

Updated by Kanwar Batra over 10 years ago

Foreman Log

usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'
Rolling back due to a problem: [Wait for wintest08.dev.cld.nimblefish.com to come online 2001 failed [#<Host::Managed id: 59, name: "wintest08.dev.cld.nimblefish.com", ip: "10.185.64.37", last_compile: nil, last_freshcheck: nil, last_report: nil, updated_at: "2013-11-11 18:10:07", source_file_id: nil, created_at: "2013-11-11 18:10:07", mac: nil, root_pass: nil, serial: nil, puppet_status: 0, domain_id: 1, architecture_id: 1, operatingsystem_id: 2, environment_id: 2, subnet_id: nil, ptable_id: nil, medium_id: nil, build: true, comment: "", disk: "", installed_at: nil, model_id: nil, hostgroup_id: 5, owner_id: nil, owner_type: nil, enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: "i-8cd169e8", compute_resource_id: 1, puppet_proxy_id: 1, certname: nil, image_id: 5, organization_id: nil, location_id: nil, type: "Host::Managed">, :setSSHWaitForResponse]]
ActiveRecord::Rollback
Redirected to https://amlnx-nfd-pup01.dev.cld.nimblefish.com/hosts/wintest08.dev.cld.nimblefish.com
Completed 302 Found in 362186ms (ActiveRecord: 44.6ms)

Actions #2

Updated by Dominic Cleal over 10 years ago

  • Tracker changed from Bug to Feature
  • Project changed from Smart Proxy to Foreman
  • Category set to Compute resources
  • Priority changed from High to Normal
  • translation missing: en.field_release deleted (1)

Foreman uses SSH to provision image-based virtual machines, so it'll be trying to SSH to your Windows host. We'd need to add support for some other way to support Windows.

Actions #3

Updated by Kanwar Batra over 10 years ago

I've installed cygwin and enabled ssh on the windows image, I've also set the PermitRootLogin withoutPassword so it can utilize the Keys, Is there any thing other than that I need to do, Please advise.

Thanks!

Actions #4

Updated by Dominic Cleal over 10 years ago

I guess it would need to install the SSH keys too, and ensure the username in the image configuration in Foreman is right. Check it works outside of Foreman first.

Actions #5

Updated by Kanwar Batra over 10 years ago

Thanks Dominic, I've generated a key on the foreman and added the public to the windows image. It works from the foreman host so I am going to see if it picks it up in the provisioning processs. Building updated AMI will keep you updated

Thanks!

Actions #6

Updated by Dominic Cleal over 10 years ago

Usually Foreman itself will generate a key and pass the public key to the EC2 API rather than using a standard one. Usually AMIs will contain a script that runs at boot, which queries the metadata available from the internal per-instance EC2 API to get the public key. There a small example here and you'll probably find more by searching for "latest/meta-data/public-keys" or guides on building AMIs.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AESDG-chapter-instancedata.html#instancedata-data-retrieval

Actions #7

Updated by Kanwar Batra over 10 years ago

Hi Dominic,

I have successfully deployed the Windows machine via Foreman, I had to put the Foreman Generated Public Key into my AMI so it will recognize for Trusted Auth. The SSH is setup using Cygwin.

The New Host provisioning  does go through the deploy and past the SSH module suggests it is running the script , However What I noticed is that it does not run any of the SSH commands.  Please let me know if you have any advise on what I can do to make the script run.

Thanks

Actions #8

Updated by Kanwar Batra over 10 years ago

Kanwar Batra wrote:

Foreman Log

usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/lib/phusion_passenger/request_handler/thread_handler.rb:108:in `main_loop'
/usr/lib/ruby/gems/1.8/gems/passenger-4.0.5/lib/phusion_passenger/request_handler.rb:441:in `block (3 levels) in start_threads'
Rolling back due to a problem: [Wait for wintest08.dev.cld.nimblefish.com to come online 2001 failed [#<Host::Managed id: 59, name: "wintest08.dev.cld.nimblefish.com", ip: "10.185.64.37", last_compile: nil, last_freshcheck: nil, last_report: nil, updated_at: "2013-11-11 18:10:07", source_file_id: nil, created_at: "2013-11-11 18:10:07", mac: nil, root_pass: nil, serial: nil, puppet_status: 0, domain_id: 1, architecture_id: 1, operatingsystem_id: 2, environment_id: 2, subnet_id: nil, ptable_id: nil, medium_id: nil, build: true, comment: "", disk: "", installed_at: nil, model_id: nil, hostgroup_id: 5, owner_id: nil, owner_type: nil, enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: "i-8cd169e8", compute_resource_id: 1, puppet_proxy_id: 1, certname: nil, image_id: 5, organization_id: nil, location_id: nil, type: "Host::Managed">, :setSSHWaitForResponse]]
ActiveRecord::Rollback
Redirected to https://,,,
Completed 302 Found in 362186ms (ActiveRecord: 44.6ms)

Actions #9

Updated by Kanwar Batra over 10 years ago

I have successfully deployed the Windows machine via Foreman, I had to put the Foreman Generated Public Key into my AMI so it will recognize for Trusted Auth. The SSH is setup using Cygwin.

The New Host provisioning does go through the deploy and past the SSH module suggests it is running the script , However What I noticed is that it does not run any of the SSH commands. Please let me know if you have any advise on what I can do to make the script run.

I can however run the same commands if I ssh into the Host and run it. I do notice that during ssh it prompts to accept key. Is there a way to pass StrictHostKeyChecking no to SSH via foreman to see if that is the reason for script not running

THanks

Actions #10

Updated by Kanwar Batra over 10 years ago

Foreman Log Info show below

SSH connection established to <Ipaddress> - executing template
negotiating protocol version
got KEXINIT from server
sending KEXINIT
negotiating algorithms
could not connect to ssh-agent
channel_open_confirmation: 0 0 0 32768
sending channel request "exec"
channel_window_adjust: 0 +2097152
channel_success: 0

Actions

Also available in: Atom PDF