Hi,

Agree. Updated code pushed.

On 06/11/2013 01:38 PM, cdearborn wrote:
> In chef/cookbooks/quantum/recipes/common_install.rb:
>
>> @@ -166,6 +162,21 @@
>>    action :enable
>>  end
>>
>> +
>> +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")
>> +
>>  #env_filter = " AND nova_config_environment:nova-config-#{node[:tempest][:nova_instance]}"
>
> 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")
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/crowbar/barclamp-quantum/pull/37/files#r4631741>.
>


-- 
Tomasz Paszkowski
Senior Software Engineer SUSE Linux Enterprise Applications
SUSE LINUX Products GmbH
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
Maxfeldstraße 5
90409 Nürnberg
Germany