Skip to content

Instantly share code, notes, and snippets.

View cwjohnston's full-sized avatar

Cameron Johnston cwjohnston

View GitHub Profile
root@chef:~# /etc/init.d/chef-solr start
* Starting chef-solr chef-solr
[Fri, 23 Apr 2010 19:08:13 +0000] INFO: About to change privilege to chef:chef
/usr/lib/ruby/1.8/ohai/system.rb:120:in `join': can't convert nil into String (TypeError)
from /usr/lib/ruby/1.8/ohai/system.rb:120:in `all_plugins'
from /usr/lib/ruby/1.8/ohai/system.rb:117:in `each'
from /usr/lib/ruby/1.8/ohai/system.rb:117:in `all_plugins'
from /usr/lib/ruby/1.8/chef/client.rb:121:in `run_ohai'
from /usr/lib/ruby/1.8/chef/client.rb:126:in `determine_node_name'
from /usr/lib/ruby/1.8/chef/client.rb:147:in `build_node'
hosts = {}
localhost = nil
search(:node, "*", %w(ipaddress fqdn dns_aliases)) do |n|
# node own's record, store in localhost
if n["ipaddress"] == node[:ipaddress]
localhost = n
else
hosts[n["ipaddress"]] = n
end
not_if do (File.symlink?("#{node[:apache][:dir]}/mods-enabled/#{params[:name]}.load") and
((File.exists?("#{node[:apache][:dir]}/mods-available/#{params[:name]}.conf"))?
(File.symlink?("#{node[:apache][:dir]}/mods-enabled/#{params[:name]}.conf")):(true)))
end
#
# Cookbook Name:: drtr
# Recipe:: default
#
# Copyright 2009, Blue Coat Systems Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
precursor:~ cwj$ knife ssh "run_list:recipe\[drtr\]" "hostname -f" -l debug
DEBUG: Signing the request as ops
DEBUG: Sending HTTP Request via GET to chef.uk1.es.bluecoat.com:4000//search/node?q=run_list:recipe%5C[drtr%5C]&sort=&start=0&rows=20
DEBUG: Adding drtr6.uk1.es.bluecoat.com
DEBUG: Adding drtr5.uk1.es.bluecoat.com
DEBUG: Adding drtr3.uk1.es.bluecoat.com
DEBUG: Adding drtr1.uk1.es.bluecoat.com
DEBUG: Adding drtr7.uk1.es.bluecoat.com
DEBUG: Adding drtr2.uk1.es.bluecoat.com
DEBUG: Adding drtr4.uk1.es.bluecoat.com
merb : worker (port 4000) ~ Started request handling: Thu May 06 16:41:02 +0000 2010
merb : worker (port 4000) ~ Params: {"name"=>"dontrateme.drp.es.bluecoat.com", "action"=>"create", "admin"=>false, "controller"=>"chef_server_api/clients"}
[Thu, 06 May 2010 16:41:02 +0000] INFO: Authenticating client chef-validator
merb : worker (port 4000) ~ Failed to authenticate! - (Merb::ControllerExceptions::Unauthorized)
/usr/share/chef-server-api/app/controllers/application.rb:78:in `authenticate_every'
/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:346:in `send'
/usr/lib/ruby/1.8/merb-core/controller/abstract_controller.rb:346:in `_call_filters'
--
/usr/lib/ruby/1.8/merb-core/server.rb:143:in `fork'
/usr/lib/ruby/1.8/merb-core/server.rb:143:in `daemonize'
<% @node[:block_device].each do |blockdev| -%>
<% if blockdev =~ /^sd./ %>
KERNEL=="<%= blockdev %>", SUBSYSTEM=="block", RUN+="/bin/sh -c '/bin/echo 190 > /sys$DEVPATH/device/timeout'"
<% end %>
<% end %>
sparkplug:chef-repo cwj$ knife ssh "run_list:recipe\[drtr\]" "date" -l debug
DEBUG: Signing the request as ops
DEBUG: Sending HTTP Request via GET to chef.drp.es.bluecoat.com:4000//search/node
DEBUG: Adding drtr7.drp.es.bluecoat.com
DEBUG: Adding drtr1.drp.es.bluecoat.com
DEBUG: Adding drtr6.drp.es.bluecoat.com
DEBUG: Adding drtr3.drp.es.bluecoat.com
DEBUG: Adding drtr2.drp.es.bluecoat.com
DEBUG: Adding drtr5.drp.es.bluecoat.com
DEBUG: Adding drtr4.drp.es.bluecoat.com
sparkplug:~ cwj$ knife ssh "recipe:drtr" date -l debug
DEBUG: Signing the request as ops
DEBUG: Sending HTTP Request via GET to chef.drp.es.bluecoat.com:4000//search/node
DEBUG: Adding drtr6.drp.es.bluecoat.com
DEBUG: Adding drtr4.drp.es.bluecoat.com
DEBUG: Adding drtr5.drp.es.bluecoat.com
DEBUG: Adding drtr7.drp.es.bluecoat.com
DEBUG: Adding drtr1.drp.es.bluecoat.com
DEBUG: Adding drtr3.drp.es.bluecoat.com
DEBUG: Adding drtr2.drp.es.bluecoat.com
Knife search works:
precursor:chef-repo cwj$ knife search node "run_list:role\[es_manager\]" | egrep fqdn
"fqdn": "master.drp.es.bluecoat.com",
"server_fqdn": "chef.drp.es.bluecoat.com",
search in recipe does not:
search(:node, "run_list:role\[es_manager\]") do |manager|