On Monday, February 4, 2013 at 9:02 AM, Jay Pipes wrote:
Been trying to diagnose why something is happening in our environment,and can't seem to figure it out.Here is some commands showing the issue:"> 16:52:06:/opt/chef-repo# knife node showNode Name: c5r3.int.iad1.attcompute.comEnvironment: productionIP: 192.168.112.143Run List: role[iad1], role[openstack-identity]Roles: bootedRecipes: apt, ohai, chef-client::cron, users::sysadmins, openssh,sudo, reboot-handler, networking, raid, solPlatform: ubuntu 12.04Tags:"> 16:52:11:/opt/chef-repo# grep -n2 "admin_user"environments/production.json98- "demo"99- ],100: "admin_user": "ksadmin",101- "users": {102- "ksadmin": {"> 16:52:16:/opt/chef-repo# knife node showc5r3.int.iad1.attcompute.com -Fj | grep admin_user"> 16:52:28:/opt/chef-repo#From above, you can see that:a) The node in question has the production environmentb) The production environment has the keystone:admin_user attribute setto "ksadmin", not "admin"Unfortunately, when running chef-client on the node above, the override"ksadmin" value set in the environment's override_attributes does notget used. Instead, the recipe's default value of "admin" gets used,which results in a failure.Here is the output of chef-client on the node:and here is the code that is calling the above:Why doesn't a node's environment override_attributes get merged to thenode's attribute collection before chef-client runs? Why wouldconvergence need to occur before a node's environment attributes are setin the node's attributes collection?
A more general question would be: data is data, why on Earth do Chefsearches return different data about a node depending on whetherchef-client has run successfully on a node or not? I can understand thisbehaviour for automatic attributes from Ohai, but it does not make muchsense for any other attributes, IMHO.
Best,-jay
Archive powered by MHonArc 2.6.16.