Ask Your Question
1

How to have 2 values for same key under same section in ini configuration file?

asked 2016-09-12 03:57:06 -0500

karthikeayan gravatar image

updated 2016-09-13 01:54:35 -0500

Red Cricket gravatar image

Hi,

I want to achieve something like below in nova.conf

scheduler_available_filters = nova.scheduler.filters.all_filters
scheduler_available_filters = myfilter.MyFilter

I have tried, nova_config and ini_setting resources, but both of them do not allow duplicates with different exception.

How to achieve the above with puppet in puppet way?

edit retag flag offensive close merge delete

Comments

Are you using the https://forge.puppet.com/openstack/nova module?

Red Cricket gravatar imageRed Cricket ( 2016-09-12 22:13:46 -0500 )edit

yes, am using the same..

karthikeayan gravatar imagekarthikeayan ( 2016-09-13 01:02:47 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2016-09-13 01:41:31 -0500

Red Cricket gravatar image

updated 2016-09-13 01:44:29 -0500

If you are using the openstack-nova module you need to pass an array of filter strings to the nova:scheduler::filter class via the scheduler_available_filters parameter.

Here's the comment in their code (https://github.com/openstack/puppet-n...)

# [*scheduler_available_filters*]
#   (optional) An array with filter classes available to the scheduler.
#   Example: ['first.filter.class', 'second.filter.class']
#   Defaults to ['nova.scheduler.filters.all_filters']

So your puppet code would look something like this:

class { 'nova:scheduler::filter':
     ...
     scheduler_available_filters => ['nova.scheduler.filters.all_filters', 'myfiler.MyFilter'],
     ....
}

Or if you are using hiera ...

nova:scheduler::filter::scheduler_available_filters:
  - 'nova.scheduler.filters.all_filters'
  - 'myfiler.MyFilter'
edit flag offensive delete link more

Comments

great. But we are not using the latest nova module, this is not working for me.

karthikeayan gravatar imagekarthikeayan ( 2016-09-14 05:45:54 -0500 )edit

what version are you using?

Red Cricket gravatar imageRed Cricket ( 2016-09-14 12:50:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-09-12 03:57:06 -0500

Seen: 63 times

Last updated: Sep 13 '16