Exception: Chef::Exceptions::CookbookVersionSelection::UnsatisfiableRunListItem

Inherits:
StandardError
  • Object
show all
Defined in:
lib/chef/exceptions.rb

Overview

In run_list expansion and resolution, a constraint was unsatisfiable.

This exception may not be the complete error report. If you resolve the misconfiguration represented by this exception and re-solve, you may get another exception

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, run_list_item, non_existent_cookbooks, most_constrained_cookbooks) ⇒ UnsatisfiableRunListItem

most_constrained_cookbooks: if I were to remove constraints regarding these cookbooks, I would get a solution or move on to the next error (deeper in the graph). An item in this list may be unsatisfiable, but when resolved may also reveal further unsatisfiable constraints; this condition would not be reported.



172
173
174
175
176
177
178
# File 'lib/chef/exceptions.rb', line 172

def initialize(message, run_list_item, non_existent_cookbooks, most_constrained_cookbooks)
  super(message)

  @run_list_item = run_list_item
  @non_existent_cookbooks = non_existent_cookbooks
  @most_constrained_cookbooks = most_constrained_cookbooks
end

Instance Attribute Details

#most_constrained_cookbooksObject (readonly)

Returns the value of attribute most_constrained_cookbooks.



164
165
166
# File 'lib/chef/exceptions.rb', line 164

def most_constrained_cookbooks
  @most_constrained_cookbooks
end

#non_existent_cookbooksObject (readonly)

Returns the value of attribute non_existent_cookbooks.



164
165
166
# File 'lib/chef/exceptions.rb', line 164

def non_existent_cookbooks
  @non_existent_cookbooks
end

#run_list_itemObject (readonly)

Returns the value of attribute run_list_item.



163
164
165
# File 'lib/chef/exceptions.rb', line 163

def run_list_item
  @run_list_item
end

Instance Method Details

#to_json(*a) ⇒ Object



180
181
182
183
184
185
186
187
188
# File 'lib/chef/exceptions.rb', line 180

def to_json(*a)
  result = {
    "message" => message,
    "unsatisfiable_run_list_item" => run_list_item,
    "non_existent_cookbooks" => non_existent_cookbooks,
    "most_constrained_cookbooks" => most_constrained_cookbooks
  }
  result.to_json(*a)
end