title: Knife ec2: need to avoid re-boostraping of server after hostname change
body: <p>I might be doing something wrong, but here is the situation. Standalone Chef server 12.3.0. CentOS 6.3 running on AWS.
  During execution of <code>knife bootstrap</code> I am applying <a href="https://supermarket.chef.io/cookbooks/hostname" rel="nofollow">hostname:default</a> recipe to change server's FQDN along with some other recipes. Everything iseems to be fine. Chef server shows newly boostrapped instance, but <strong>Node Name</strong> column is still showing old FQDN, smth like <em>ip-x-x-x-x.aws-region-name.compute.internal</em>.</p>
  
  <p>Then I try to ssh this host and run <code>chef-client</code> I am getting following error:</p>
  
  <pre><code>[ec2-user@newHostName ~]$ sudo chef-client  
  Starting Chef Client, version 12.3.0
  
  Chef encountered an error attempting to load the node data for "newHostName"
  Authentication Error:
  ----------------
  Failed to authenticate to the chef server (http 401).
  
  Server Response:
  ----------------
  Failed to authenticate as 'newHostName'. Ensure that your node_name and client key are correct.
  
  Relevant Config Settings:
  -------------------------
  chef_server_url   "https://chefServerDomain/organizations/organizationName"
  node_name         "newHostName"
  client_key        "/etc/chef/client.pem"
  
  If these settings are correct, your client_key may be invalid, or
  you may have a chef user with the same client name as this node.
  
  [2015-05-04T12:36:03-07:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
  Chef Client failed. 0 resources updated in 0.962848623 seconds
  [2015-05-04T12:36:03-07:00] ERROR: 401 "Unauthorized"
  [2015-05-04T12:36:03-07:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
  </code></pre>
  
  <p>I have checked closed issue <a href="https://github.com/3ofcoins/chef-cookbook-hostname/issues/8" rel="nofollow">#8</a> on GitHub, according to which I need manually change <em>client.rb</em> file and include <strong>node_name</strong> parameter. At the same time Chef client.rb documentation indicates that I should not do that :</p>
  
  <blockquote>
    <p>node_name is used to determine which configuration should be applied
    and to set the client_name    (which is the name used when
    authenticating to a Chef server). The default value is set
    automatically to    be the FQDN of the chef-client, as detected by
    Ohai. In general, leaving this setting blank and letting    Ohai
    assign the FQDN of the node as the node_name during each chef-client
    run is the recommended    approach. </p>
  </blockquote>
  
  <p>After cleaning up <strong>/etc/chef/*</strong> folder, removing this instance from Chef server and re-bootstrapping EC2 instance again I was able to make it work. FQDN was displayed correctly in Chef server under <strong>Node Name</strong> column as <em>newServerName</em>. </p>
  
  <p>Could you please advise, what should I do to avoid double bootsrapping? </p>