- From: John Merrells <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: renaming a node
- Date: Fri, 2 Apr 2010 12:39:54 -0700
On Apr 2, 2010, at 12:17 PM, John Merrells wrote:
>
If the machine starts with fqdn A and the chef client registers a new node
>
on the chef server with name A, then the client starts fine. If I then
>
create a chef server node named B, with the webui, and then change the
>
hostname of the machine from A to B, in /etc/hosts and /etc/hostnames and
>
reboot, then the client silently fails to connect to the server. If I then
>
go into client.rb and set node_name=A then all is happy again. If I go
>
`ohai | grep fqdn` then I do get back B.....
>
>
The only thing I can think of is that the silence is a feature of the
>
security system.... so the client cert is now busted in some way... so the
>
client cert must be connected to the hostname somehow?
Worked it out. So, yes, the client key includes the node_name, so I had to
delete /etc/chef/client.pem, making sure that the validation.pem was there,
and then I restarted the chef client, which caused it to create a new client
key for the new node name.
This means that the cookbook that Michael Hale pointed out...
http://github.com/mikehale/cookbooks/blob/master/hostname/recipes/default.rb
...probably only works if the client.rb already contains the node_name
declaration.
John
--
John Merrells
http://johnmerrells.com
+1.415.244.5808
Archive powered by MHonArc 2.6.16.