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

key_path is not honored when provisioning machine. #484

Open
chrisduong opened this issue May 26, 2016 · 1 comment
Open

key_path is not honored when provisioning machine. #484

chrisduong opened this issue May 26, 2016 · 1 comment

Comments

@chrisduong
Copy link

chrisduong commented May 26, 2016

Hi,

I'm provisioning the machine with different key_name and key_path, bob and bob_2

require 'chef/provisioning/aws_driver'

with_driver 'aws::eu-west-1'

with_machine_options(
  convergence_options: {
  },
  bootstrap_options: {
    image_id: 'ami-7abd0209',
    subnet_id: 'subnet-ad0c3cda',
    security_group_ids: ['sg-bcbd9ed8'],
    instance_type: 't2.small',
    key_name: 'bob',
    key_path: '/Users/abc/.ssh/bob_2'
  },
  ssh_username: 'centos',
  transport_address_location: 'private_ip'
 )
  • machine[cas5-test] action setup[2016-05-26T12:20:14+07:00] INFO: Processing machine[cas5-test] action setup (delivery-cluster::create-cas5-test line 59)
    [2016-05-26T12:20:23+07:00] INFO: [Aws::EC2::Client 200 2.745882 0 retries] describe_instances(instance_ids:["i-f060297a"])

[2016-05-26T12:20:24+07:00] INFO: [AWS EC2 200 1.329667 0 retries] describe_images(:filters=>[{:name=>"image-id",:values=>["ami-7abd0209"]}])

[2016-05-26T12:20:25+07:00] INFO: [AWS EC2 200 0.330377 0 retries] describe_subnets(:subnet_ids=>["subnet-ad0c3cda"])

[2016-05-26T12:20:25+07:00] INFO: [AWS EC2 200 0.389832 0 retries] describe_security_groups(:filters=>[{:name=>"group-id",:values=>["sg-bcbd9ed8"]}])

[2016-05-26T12:20:26+07:00] INFO: [Aws::EC2::Client 200 1.346546 0 retries] describe_instances(instance_ids:["i-f060297a"])

[2016-05-26T12:20:27+07:00] INFO: [Aws::EC2::Client 200 0.364847 0 retries] describe_instances(instance_ids:["i-f060297a"])

[2016-05-26T12:20:28+07:00] INFO: [Aws::EC2::Client 200 0.798169 0 retries] run_instances(image_id:"ami-7abd0209",subnet_id:"subnet-ad0c3cda",security_group_ids:["sg-bcbd9ed8"],instance_type:"t2.medium",key_name:"bob",max_count:1,min_count:1)

[2016-05-26T12:20:28+07:00] INFO: [Aws::EC2::Client 200 0.43222 0 retries] describe_instances(instance_ids:["i-8e652c04"])

[2016-05-26T12:20:28+07:00] INFO: [Aws::EC2::Client 200 0.418067 0 retries] create_tags(tags:[{key:"Name",value:"cas5-test"}],resources:["i-8e652c04"])

- Create cas5-test with AMI ami-7abd0209 in eu-west-1[2016-05-26T12:20:28+07:00] INFO: Processing chef_node[cas5-test] action create (basic_chef_client::block line 57)

- update node cas5-test at chefzero://localhost:8890
-   update normal.chef_provisioning.reference.allocated_at from "2016-05-26 05:09:59 UTC" to "2016-05-26 05:20:28 UTC"

[2016-05-26T12:20:29+07:00] INFO: [Aws::EC2::Client 200 0.413051 0 retries] describe_instances(instance_ids:["i-8e652c04"])

- waiting for cas5-test (i-8e652c04 on aws::eu-west-1) to become ready ...
- been waiting 0/120 -- sleeping 10 seconds for cas5-test (i-8e652c04 on aws::eu-west-1) to become ready ...[2016-05-26T12:20:30+07:00] INFO: [Aws::EC2::Client 200 0.4035 0 retries] describe_instances(instance_ids:["i-8e652c04"])


- been waiting 10/120 -- sleeping 10 seconds for cas5-test (i-8e652c04 on aws::eu-west-1) to become ready ...[2016-05-26T12:20:41+07:00] INFO: [Aws::EC2::Client 200 1.283138 0 retries] describe_instances(instance_ids:["i-8e652c04"])


- been waiting 20/120 -- sleeping 10 seconds for cas5-test (i-8e652c04 on aws::eu-west-1) to become ready ...[2016-05-26T12:20:53+07:00] INFO: [Aws::EC2::Client 200 1.840443 0 retries] describe_instances(instance_ids:["i-8e652c04"])


- been waiting 30/120 -- sleeping 10 seconds for cas5-test (i-8e652c04 on aws::eu-west-1) to become ready ...[2016-05-26T12:21:05+07:00] INFO: [Aws::EC2::Client 200 2.084856 0 retries] describe_instances(instance_ids:["i-8e652c04"])

[2016-05-26T12:21:05+07:00] INFO: Reading key bob from file /Users/cduong/.ssh/bob
[2016-05-26T12:21:05+07:00] INFO: 70318552257620 Executing sudo pwd on [email protected]

Even I specified key_path is bob_2, not bob, it's still calling, like the default key_name at user's home SSH folder.

@Afterglow
Copy link

This may be related to what I observed in #476

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

No branches or pull requests

2 participants