node_name restriction in client.rb


#1

Ohai Chefs

I have a doubt and I coudn’t find related information in
http://docs.opscode.com/config_rb_client.html for the same; so I am writing to
confirm.

Is there a restriction to the number of characters for specifying node_name in
client.rb ?

Although the recommended is to use the default FQDN of the host I am planning
to have a more descriptive one which suits my needs.

Thanks
Aniket


#2

There isn’t a limit specified anywhere. It’s stored as a TEXT column in the Postgres database: https://github.com/opscode/chef_db/blob/master/priv/pgsql_schema.sql#L218

The node_name is used in URIs, sometimes servers enforce a limit of 1024 characters in URIs, so that could be a problem if your node names are in the 1000 character range. Though if you’re trying to encode that much information in the node name, you’d be better off putting that data in attributes.


Daniel DeLeo

On Friday, March 21, 2014 at 2:06 AM, asharad@adobe.com wrote:

Ohai Chefs

I have a doubt and I coudn’t find related information in
http://docs.opscode.com/config_rb_client.html for the same; so I am writing to
confirm.

Is there a restriction to the number of characters for specifying node_name in
client.rb ?

Although the recommended is to use the default FQDN of the host I am planning
to have a more descriptive one which suits my needs.

Thanks
Aniket