knife convergeで、以下のようなノード名たちがあるとき、 cent7-t01 t01 t01を指定(name:t01)したつもりが、cnet7-t01ノードを対象にしてしまうみたい。 cent7-t01をcent7_t01に変更すると想定の動作をした。
$ knife node list cent7-t01 t01 $ grep -A4 '"name' nodes/*.json nodes/cent7-t01.json: "name": "cent7-t01", nodes/cent7-t01.json- "normal": { nodes/cent7-t01.json- "knife_zero": { nodes/cent7-t01.json- "host": "192.168.1.17" nodes/cent7-t01.json- }, -- nodes/t01.json: "name": "t01", nodes/t01.json- "normal": { nodes/t01.json- "knife_zero": { nodes/t01.json- "host": "localhost" nodes/t01.json- }, $ knife zero converge "name:t01" -a knife_zero.host --ssh-identity-file ~/.ssh/id_rsa_kitchen --ssh-user kitchen --ssh-port 22001 WARNING: Failed to connect to 192.168.1.17 -- Errno::EHOSTUNREACH: No route to host - connect(2) for 192.168.1.17:22001 ERROR: NoMethodErrorundefined method `forward' for nil:NilClass ERROR: /home/kaz/.chefdk/gem/ruby/2.1.0/gems/knife-zero-1.16.0/lib/knife-zero/bootstrap_ssh.rb:32:in `block in ssh_command' /home/kaz/.chefdk/gem/ruby/2.1.0/gems/knife-zero-1.16.0/lib/knife-zero/bootstrap_ssh.rb:30:in `each' /home/kaz/.chefdk/gem/ruby/2.1.0/gems/knife-zero-1.16.0/lib/knife-zero/bootstrap_ssh.rb:30:in `ssh_command' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.8.1/lib/chef/knife/ssh.rb:557:in `run' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.8.1/lib/chef/knife.rb:421:in `block in run_with_pretty_exceptions' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.8.1/lib/chef/local_mode.rb:44:in `with_server_connectivity' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.8.1/lib/chef/knife.rb:420:in `run_with_pretty_exceptions' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.8.1/lib/chef/knife.rb:219:in `run' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.8.1/lib/chef/application/knife.rb:148:in `run' /opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems/chef-12.8.1/bin/knife:25:in `' /opt/chefdk/bin/knife:49:in `load' /opt/chefdk/bin/knife:49:in `
'
cent7_t01をcent-t01に変更
$ knife node list cent7_t01 t01 t02 $ grep -A4 '"name' nodes/*.json nodes/cent7_t01.json: "name": "cent7_t01", nodes/cent7_t01.json- "normal": { nodes/cent7_t01.json- "knife_zero": { nodes/cent7_t01.json- "host": "192.168.1.17" nodes/cent7_t01.json- }, -- nodes/t01.json: "name": "t01", nodes/t01.json- "normal": { nodes/t01.json- "knife_zero": { nodes/t01.json- "host": "localhost" nodes/t01.json- }, -- nodes/t02.json: "name": "t02", nodes/t02.json- "normal": { nodes/t02.json- "knife_zero": { nodes/t02.json- "host": "localhost" nodes/t02.json- }, $ knife zero converge "name:t01" -a knife_zero.host --ssh-identity-file ~/.ssh/id_rsa_kitchen --ssh-user kitchen --ssh-port 22001 localhost Starting Chef Client, version 12.11.18 localhost resolving cookbooks for run list: [] localhost Synchronizing Cookbooks: localhost Installing Cookbook Gems: localhost Compiling Cookbooks... localhost [2016-06-26T07:04:44+00:00] WARN: Node t01 has an empty run list. localhost Converging 0 resources localhost localhost Running handlers: localhost Running handlers complete localhost Chef Client finished, 0/0 resources updated in 01 seconds
















