This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Tue, 04 Jan 2011 20:39:33 +0000] ERROR: Re-raising exception: NameError - uninitialized constant Sys | |
/tmp/chef-solo/cookbooks/rackspace/libraries/proctable.rb:25:in `getProcPid' | |
/tmp/chef-solo/cookbooks/rackspace/definitions/proc.rb:26:in `block in from_file' | |
/opt/ruby/lib/ruby/gems/chef-0.9.8/lib/chef/mixin/recipe_definition_dsl_core.rb:50:in `instance_eval' | |
/opt/ruby/lib/ruby/gems/chef-0.9.8/lib/chef/mixin/recipe_definition_dsl_core.rb:50:in `method_missing' | |
/tmp/chef-solo/cookbooks/rackspace/recipes/mckick.rb:16:in `from_file' | |
/opt/ruby/lib/ruby/gems/chef-0.9.8/lib/chef/mixin/from_file.rb:30:in `instance_eval' | |
/opt/ruby/lib/ruby/gems/chef-0.9.8/lib/chef/mixin/from_file.rb:30:in `from_file' | |
/opt/ruby/lib/ruby/gems/chef-0.9.8/lib/chef/cookbook_version.rb:337:in `load_recipe' | |
/opt/ruby/lib/ruby/gems/chef-0.9.8/lib/chef/mixin/language_include_recipe.rb:40:in `block in include_recipe' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
require 'sys/proctable' | |
rescue LoadError | |
Chef::Log.warn("Missing gem 'sys-proctable'") | |
end | |
require 'timeout' | |
module Rackspace | |
def self.getProcPid(name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class File | |
def flocked? &block | |
status = flock LOCK_EX|LOCK_NB | |
case status | |
when false | |
return true | |
when 0 | |
begin | |
block ? block.call : false | |
ensure |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fcntl' | |
class File | |
def flocked? &block | |
flockstruct = [Fcntl::F_RDLCK, 0, 0, 0, 0].pack("ssqqi") | |
fcntl Fcntl::F_GETLK, flockstruct | |
status = flockstruct.unpack("ssqqi")[0] | |
case status | |
when Fcntl::F_UNLCK | |
return false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'chef/provider/package/apt' | |
class Chef | |
class Provider | |
class Package | |
class Apt | |
class Safe < Chef::Provider::Package::Apt | |
def install_package(name, version) | |
Rackspace::Locks.wait_on_lock(new_resource.timeout) | |
run_command_with_systems_locale( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execute "yum check-update" do | |
action :nothing | |
end | |
template "/etc/yum.repos.d/cloudkick.repo" do | |
mode "0644" | |
source "cloudkick.repo.erb" | |
notifies :run, resources(:execute => "yum check-update"), :immediately | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default[:kernel][:newinstall] = "default" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
default[:username][:password] = nil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pychef import Node | |
n = Node.init("foo") | |
n["mysql"]["tunable"]["key_buffer_size"] = "64M" | |
# or | |
attributes = { "mysql" : { "tunable" : { "key_buffer_size" : "64M" } } } | |
n.add_override(attributes) | |
run_list = "role[bigrole], recipe[chef-client::service]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Creating debian-6.0.1-i686/chef-full-0.10.10-1-debian-6.0.1-i686.sh on Cloud Files | |
Traceback (most recent call last): | |
File "shearline.py", line 21, in <module> | |
cf_object.send(item) | |
File "/Library/Python/2.7/site-packages/cloudfiles/utils.py", line 45, in decorator | |
return f(*args, **kwargs) | |
File "/Library/Python/2.7/site-packages/cloudfiles/storage_object.py", line 509, in send | |
http.send(chunk) | |
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 773, in send | |
self.sock.sendall(data) |
OlderNewer