Couldn't the above code be replaced with just:
quantums = search(:node, "roles:quantum-server AND roles:quantum-config-#{node[:nova][:quantum_instance]}") 
quantum = quantums.first || raise("Quantum instance '#{node[:nova][:quantum_instance]}' for nova not found")