Issue Details (XML | Word | Printable)

Key: CHEF-1291
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Daniel DeLeo
Reporter: Adam Jacob
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Chef

Deploy resource seems to re-apply the whole recipe stack, not just the portion we specify

Created: 07/Jun/10 08:31 PM   Updated: 08/Jun/10 05:01 PM   Resolved: 08/Jun/10 05:01 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 0.9.0

Triage Status: Triaged


 Description  « Hide

When you use the deploy resource, it appears that we re-deploy the entire recipe every time we call the callback. probably related to the switch to a run context.

[Mon, 07 Jun 2010 20:26:33 +0000] DEBUG: deploy[opscode-audit] using Chef::Provider::Deploy::Revision
[Mon, 07 Jun 2010 20:26:33 +0000] DEBUG: Executing git ls-remote git@github.com:opscode/opscode-audit.git master
[Mon, 07 Jun 2010 20:26:33 +0000] DEBUG: Executing git ls-remote git@github.com:opscode/opscode-audit.git master
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: ---- Begin output of git ls-remote git@github.com:opscode/opscode-audit.git master ----
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: STDOUT: 06b67cb3a6be7075edaadebe1924bfcef9b3cbca	refs/heads/master
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: STDERR: 
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: ---- End output of git ls-remote git@github.com:opscode/opscode-audit.git master ----
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: Ran git ls-remote git@github.com:opscode/opscode-audit.git master returned 0
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: Already deployed app at /srv/opscode-audit/releases/06b67cb3a6be7075edaadebe1924bfcef9b3cbca, and it is the latest revision.  Use action :force_deploy to re-deploy this revision.
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: Processing directory[/srv/chef] on ec2-184-73-199-94.compute-1.amazonaws.com
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: directory[/srv/chef] using Chef::Provider::Directory
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: Processing deploy[chef] on ec2-184-73-199-94.compute-1.amazonaws.com
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: deploy[chef] using Chef::Provider::Deploy::Revision
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: Executing git ls-remote git://github.com/opscode/chef.git master
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: Executing git ls-remote git://github.com/opscode/chef.git master
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: ---- Begin output of git ls-remote git://github.com/opscode/chef.git master ----
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: STDOUT: 4330685034e5e59dc97a217306632b5d081e71f0	refs/heads/master
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: STDERR: 
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: ---- End output of git ls-remote git://github.com/opscode/chef.git master ----
[Mon, 07 Jun 2010 20:26:34 +0000] DEBUG: Ran git ls-remote git://github.com/opscode/chef.git master returned 0
[Mon, 07 Jun 2010 20:26:34 +0000] INFO: deploying branch: master
[Mon, 07 Jun 2010 20:26:34 +0000] INFO: ensuring proper ownership
b[Mon, 07 Jun 2010 20:26:35 +0000] INFO: updating the cached checkout
[Mon, 07 Jun 2010 20:26:35 +0000] INFO: Configuring remote tracking branches for repository git://github.com/opscode/chef.git at remote opscode
[Mon, 07 Jun 2010 20:26:35 +0000] INFO: Fetching updates from opscode and resetting to revison 4330685034e5e59dc97a217306632b5d081e71f0
[Mon, 07 Jun 2010 20:26:35 +0000] DEBUG: Executing git config remote.opscode.url git://github.com/opscode/chef.git && git config remote.opscode.fetch +refs/heads/*:refs/remotes/opscode/* && git fetch opscode && git fetch opscode --tags && git reset --hard 4330685034e5e59dc97a217306632b5d081e71f0
[Mon, 07 Jun 2010 20:26:35 +0000] DEBUG: ---- Begin output of git config remote.opscode.url git://github.com/opscode/chef.git && git config remote.opscode.fetch +refs/heads/*:refs/remotes/opscode/* && git fetch opscode && git fetch opscode --tags && git reset --hard 4330685034e5e59dc97a217306632b5d081e71f0 ----
[Mon, 07 Jun 2010 20:26:35 +0000] DEBUG: STDOUT: HEAD is now at 4330685 Merge branch 'CHEF-1240'
[Mon, 07 Jun 2010 20:26:35 +0000] DEBUG: STDERR: From git://github.com/opscode/chef
   a3be634..4330685  master     -> opscode/master
[Mon, 07 Jun 2010 20:26:35 +0000] DEBUG: ---- End output of git config remote.opscode.url git://github.com/opscode/chef.git && git config remote.opscode.fetch +refs/heads/*:refs/remotes/opscode/* && git fetch opscode && git fetch opscode --tags && git reset --hard 4330685034e5e59dc97a217306632b5d081e71f0 ----
[Mon, 07 Jun 2010 20:26:35 +0000] DEBUG: Ran git config remote.opscode.url git://github.com/opscode/chef.git && git config remote.opscode.fetch +refs/heads/*:refs/remotes/opscode/* && git fetch opscode && git fetch opscode --tags && git reset --hard 4330685034e5e59dc97a217306632b5d081e71f0 returned 0
[Mon, 07 Jun 2010 20:26:35 +0000] INFO: copying the cached checkout to /srv/chef/releases/4330685034e5e59dc97a217306632b5d081e71f0
[Mon, 07 Jun 2010 20:26:35 +0000] DEBUG: Executing cp -RPp /srv/chef/shared/cached-copy/. /srv/chef/releases/4330685034e5e59dc97a217306632b5d081e71f0
[Mon, 07 Jun 2010 20:26:35 +0000] DEBUG: ---- Begin output of cp -RPp /srv/chef/shared/cached-copy/. /srv/chef/releases/4330685034e5e59dc97a217306632b5d081e71f0 ----
[Mon, 07 Jun 2010 20:26:35 +0000] DEBUG: STDOUT: 
[Mon, 07 Jun 2010 20:26:35 +0000] DEBUG: STDERR: 
[Mon, 07 Jun 2010 20:26:35 +0000] DEBUG: ---- End output of cp -RPp /srv/chef/shared/cached-copy/. /srv/chef/releases/4330685034e5e59dc97a217306632b5d081e71f0 ----
[Mon, 07 Jun 2010 20:26:35 +0000] DEBUG: Ran cp -RPp /srv/chef/shared/cached-copy/. /srv/chef/releases/4330685034e5e59dc97a217306632b5d081e71f0 returned 0
[Mon, 07 Jun 2010 20:26:36 +0000] INFO: ensuring proper ownership
[Mon, 07 Jun 2010 20:26:36 +0000] INFO: Making pre-migration symlinks: 
[Mon, 07 Jun 2010 20:26:36 +0000] INFO: Running callback before_symlink code block
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Loading cookbook openssl's library file: /home/ubuntu/opsmaster/cookbooks/openssl/libraries/secure_password.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Loading cookbook dynect's providers from /home/ubuntu/opsmaster/cookbooks/dynect/providers/rr.rb
/usr/lib/ruby/gems/1.8/gems/chef-0.9.0.a4/bin/../lib/chef/provider.rb:111: warning: already initialized constant DynectRr
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Loaded contents of /home/ubuntu/opsmaster/cookbooks/dynect/providers/rr.rb into a provider named dynect_rr defined in Chef::Provider::DynectRr
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Loading cookbook dynect's resources from /home/ubuntu/opsmaster/cookbooks/dynect/resources/rr.rb
/usr/lib/ruby/gems/1.8/gems/chef-0.9.0.a4/bin/../lib/chef/resource.rb:339: warning: already initialized constant DynectRr
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Loaded contents of /home/ubuntu/opsmaster/cookbooks/dynect/resources/rr.rb into a resource named dynect_rr defined in Chef::Resource::DynectRr
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: node ec2-184-73-199-94.compute-1.amazonaws.com loading cookbook dynect's attribute file /home/ubuntu/opsmaster/cookbooks/dynect/attributes/default.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: node ec2-184-73-199-94.compute-1.amazonaws.com loading cookbook runit's attribute file /home/ubuntu/opsmaster/cookbooks/runit/attributes/default.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: node ec2-184-73-199-94.compute-1.amazonaws.com loading cookbook couchdb's attribute file /home/ubuntu/opsmaster/cookbooks/couchdb/attributes/couchdb.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting couchdb/dir to "/srv/couchdb/etc/couchdb" because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting couchdb/listen_port to "5984" because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting couchdb/listen_ip to "0.0.0.0" because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: node ec2-184-73-199-94.compute-1.amazonaws.com loading cookbook nginx's attribute file /home/ubuntu/opsmaster/cookbooks/nginx/attributes/nginx.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting nginx/version to "0.8.33" because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: node ec2-184-73-199-94.compute-1.amazonaws.com loading cookbook apache2's attribute file /home/ubuntu/opsmaster/cookbooks/apache2/attributes/default.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/listen_ports to ["80", "443"] because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/contact to "ops@example.com" because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/timeout to 300 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/keepalive to "On" because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/keepaliverequests to 100 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/keepalivetimeout to 5 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/servertokens to "Prod" because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/serversignature to "On" because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/traceenable to "On" because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/allowed_openids to [] because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/prefork/startservers to 16 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/prefork/minspareservers to 16 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/prefork/maxspareservers to 32 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/prefork/serverlimit to 400 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/prefork/maxclients to 400 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/prefork/maxrequestsperchild to 10000 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/worker/startservers to 4 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/worker/maxclients to 1024 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/worker/minsparethreads to 64 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/worker/maxsparethreads to 192 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/worker/threadsperchild to 64 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting apache/worker/maxrequestsperchild to 0 because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: node ec2-184-73-199-94.compute-1.amazonaws.com loading cookbook erlang's attribute file /home/ubuntu/opsmaster/cookbooks/erlang/attributes/erlang.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Not setting erlang/gui_tools to false because it has a normal value already
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: node ec2-184-73-199-94.compute-1.amazonaws.com loading cookbook rabbitmq's attribute file /home/ubuntu/opsmaster/cookbooks/rabbitmq/attributes/rabbitmq.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Loading cookbook runit's definitions from /home/ubuntu/opsmaster/cookbooks/runit/definitions/runit_service.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Loading cookbook munin's definitions from /home/ubuntu/opsmaster/cookbooks/munin/definitions/munin_plugin.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Loading cookbook unicorn's definitions from /home/ubuntu/opsmaster/cookbooks/unicorn/definitions/unicorn_config.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Loading cookbook nginx's definitions from /home/ubuntu/opsmaster/cookbooks/nginx/definitions/nginx_site.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Loading cookbook perl's definitions from /home/ubuntu/opsmaster/cookbooks/perl/definitions/cpan_module.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Loading cookbook apache2's definitions from /home/ubuntu/opsmaster/cookbooks/apache2/definitions/apache_conf.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Loading cookbook apache2's definitions from /home/ubuntu/opsmaster/cookbooks/apache2/definitions/apache_module.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Loading cookbook apache2's definitions from /home/ubuntu/opsmaster/cookbooks/apache2/definitions/web_app.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Loading cookbook apache2's definitions from /home/ubuntu/opsmaster/cookbooks/apache2/definitions/apache_site.rb
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: I am not loading opsmaster, because I have already seen it.
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Processing bash[install_gem_local] on ec2-184-73-199-94.compute-1.amazonaws.com
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: bash[install_gem_local] using Chef::Provider::Script
[Mon, 07 Jun 2010 20:26:36 +0000] DEBUG: Executing bash /tmp/chef-script20100607-9422-8eax32-0
 [Mon, 07 Jun 2010 20:28:52 +0000] DEBUG: ---- Begin output of bash /tmp/chef-script20100607-9422-8eax32-0 ----
[Mon, 07 Jun 2010 20:28:52 +0000] DEBUG: STDOUT: (in /srv/chef/releases/4330685034e5e59dc97a217306632b5d081e71f0/chef)
  Successfully built RubyGem
  Name: chef
  Version: 0.9.0.a6
  File: chef-0.9.0.a6.gem
Successfully installed highline-1.5.2
Successfully installed chef-0.9.0.a6
2 gems installed
Installing ri documentation for highline-1.5.2...
Installing ri documentation for chef-0.9.0.a6...
Installing RDoc documentation for highline-1.5.2...
Installing RDoc documentation for chef-0.9.0.a6...
(in /srv/chef/releases/4330685034e5e59dc97a217306632b5d081e71f0/chef-solr)
  Successfully built RubyGem
  Name: chef-solr
  Version: 0.9.0.a6
  File: chef-solr-0.9.0.a6.gem
Successfully installed chef-solr-0.9.0.a6
1 gem installed
Installing ri documentation for chef-solr-0.9.0.a6...


Sort Order: Ascending order - Click to sort in descending order
Daniel DeLeo added a comment - 08/Jun/10 05:01 PM

okay, the root cause of this is that cookbooks get loaded whenever a RunContext is created. I worked around this by cloning the run context and then assigning it an empty resource collection for recipe_eval


Daniel DeLeo added a comment - 08/Jun/10 05:01 PM

merged && pushed