Since database::client is already included from both the nova and quantum recipes that include this recipe, this entire section of added code is not needed and should be removed:

env_filter = " AND database_config_environment:database-config-#{node[:quantum][:database_instance]}" 
sqls = search(:node, "roles:database-server#{env_filter}") || [] 
if sqls.length > 0 
  sql = sqls[0] 
  sql = node if sql.name == node.name 
else 
  sql = node 
end 

include_recipe "database::client"  
backend_name = Chef::Recipe::Database::Util.get_backend_name(sql)  

Chef::Log.info("Configuring Quantum to use #{backend_name} backend")