rng_dev_path in nova.conf template configurable in node attribute

added attribute to make rng_dev_path in nova.conf configurable with the
node attribute default['openstack']['compute']['libvirt']['rng_dev_path']. Default is set to nil to let this parameter stay an optional one.

Change-Id: I1bcf67eec0b8918a3ba644d76cafb20ab89ce704
This commit is contained in:
Jan Klare 2014-09-05 17:18:10 +02:00
parent ed61c09041
commit f099dbed05
5 changed files with 16 additions and 1 deletions

View File

@ -6,6 +6,7 @@ This file is used to list changes made in each version of cookbook-openstack-com
* Upgrading to Juno
* Sync conf files with Juno
* Upgrading berkshelf from 2.0.18 to 3.1.5
* rng_dev_path in nova.conf configured from node attribute
## 9.3.1
* Move auth configuration from api-paste.ini to nova.conf

View File

@ -249,6 +249,7 @@ Libvirt Configuration Attributes
* `openstack["compute"]["libvirt"]["live_migration_uri"]` - Migration target URI (any included "%s" is replaced with the migration target hostname).
* `openstack["compute"]["libvirt"]["rbd"]["rbd_user"]` - The cephx user used for accessing the RBD pool used for block storage. (Which pool to use is passed by cinder when nova-compute is instructed to mount a volume.)
* `openstack["compute"]["libvirt"]["rbd"]["rbd_secret_name"]` - The name of the databag item containing the UUID shared between Cinder and nova-compute. `libvirt_rbd` will define a libvirt secret with this UUID, containing the `rbd_user`'s password. The password itself will be retrieved using `get_password` on the service `rbd_block_storage`. Creating the cephx user in a Ceph cluster has to be done outside of the scope of this cookbook.
* `openstack["compute"]["libvirt"]["rng_dev_path"]` - A path to a device that will be used as source of entropy on the host. Permitted options are: /dev/random or /dev/hwrng (string value)
Scheduler Configuration Attributes
----------------------------------

View File

@ -216,6 +216,8 @@ default['openstack']['compute']['libvirt']['unix_sock_rw_perms'] = '0770'
default['openstack']['compute']['libvirt']['libvirt_inject_key'] = true
default['openstack']['compute']['libvirt']['libvirt_inject_password'] = false
default['openstack']['compute']['libvirt']['libvirt_inject_partition'] = -2
# A path to a device that will be used as source of entropy on the host. Permitted options are: /dev/random or /dev/hwrng (string value)
default['openstack']['compute']['libvirt']['rng_dev_path'] = nil
# VM Images format. Acceptable values are: raw, qcow2, lvm,
# rbd, default. If default is specified, then use_cow_images
# flag is used instead of this one. (string value)

View File

@ -69,6 +69,15 @@ describe 'openstack-compute::nova-common' do
)
end
it 'has no rng_dev_path by default' do
expect(chef_run).not_to render_file(file.name).with_content(/^rng_dev_path=/)
end
it 'has rng_dev_path config if provided from attribute' do
node.set['openstack']['compute']['libvirt']['rng_dev_path'] = '/dev/random'
expect(chef_run).to render_file(file.name).with_content(%r{^rng_dev_path=/dev/random$})
end
it 'has dnsmasq_config_file' do
expect(chef_run).to render_file(file.name).with_content(/^dnsmasq_config_file=$/)
end

View File

@ -542,7 +542,9 @@ disk_cachemodes=<%= node["openstack"]["compute"]["config"]["disk_cachemodes"] %>
# A path to a device that will be used as source of entropy on
# the host. Permitted options are: /dev/random or /dev/hwrng
# (string value)
#rng_dev_path=<None>
<% if node["openstack"]["compute"]["libvirt"]["rng_dev_path"] -%>
rng_dev_path=<%= node["openstack"]["compute"]["libvirt"]["rng_dev_path"] %>
<% end -%>
#
# Options defined in nova.virt.libvirt.imagecache