lib/chef-workflow/support/scheduler.rb
#
# Teardown a single group -- modifies the solved formula. Be careful to
# resupply dependencies if you use this, as nothing will resolve until you
# resupply it.
#
# This takes an optional argument to wait for the group to be solved before
# attempting to tear it down. Setting this to false effectively says, "I know
# what I'm doing", and you should feel bad if you file an issue because you
# supplied it.
#
Teardown a single group -- modifies the solved formula. Be careful to
resupply dependencies if you use this, as nothing will resolve until you
resupply it.

This takes an optional argument to wait for the group to be solved before
attempting to tear it down. Setting this to false effectively says, "I know
what I'm doing", and you should feel bad if you file an issue because you
supplied it.
Teardown a single group -- modifies the solved formula . Be careful to resupply dependencies if you use this as nothing will resolve until you resupply it . This takes an optional argument to wait for the group to be solved before attempting to tear it down . Setting this to false effectively says " I know what I ' m doing " and you should feel bad if you file an issue because you supplied it .
def teardown_group(group_name, wait=true)
    wait_for(group_name) if wait
    dependent_items = vm_dependencies.partition { |k,v| v.include?(group_name) }.first.map(&:first)
    if_debug do
      $stderr.puts "Trying to terminate #{group_name}, found #{dependent_items.inspect} depending on it"
    end
    @solved_mutex.synchronize do
      dependent_and_working = @working.keys & dependent_items
      if dependent_and_working.count > 0
        $stderr.puts "#{dependent_and_working.inspect} are depending on #{group_name}, which you are trying to deprovision."
        $stderr.puts "We can't resolve this problem for you, and future converges may fail during this run that would otherwise work."
        $stderr.puts "Consider using wait_for to better control the dependencies, or turning serial provisioning on."
      end
      deprovision_group(group_name)
    end
  end
def teardown_group ( group_name , wait = true ) wait_for ( group_name ) if wait dependent_items = vm_dependencies . partition { | k , v | v . include? ( group_name ) } . first . map ( & :first ) if_debug do $stderr . puts "Trying to terminate #{group_name}, found #{dependent_items.inspect} depending on it" end @solved_mutex . synchronize do dependent_and_working = @working . keys & dependent_items if dependent_and_working . count > 0 $stderr . puts "#{dependent_and_working.inspect} are depending on #{group_name}, which you are trying to deprovision." $stderr . puts "We can't resolve this problem for you, and future converges may fail during this run that would otherwise work." $stderr . puts "Consider using wait_for to better control the dependencies, or turning serial provisioning on." end deprovision_group ( group_name ) end end
Teardown a single group -- modifies the solved formula.
Teardown a single group -- modifies the solved formula .
group_name
<not_specific>
wait
<not_specific>