Browse Source

add option to globally disable rng device

related to bug: PROD-20139

Change-Id: I32fee91f22e0963ec60de63b4c6e020df92f9f3b
pull/73/head
Ondrej Smola 6 years ago
parent
commit
c7f6cfcb4f
2 changed files with 12 additions and 3 deletions
  1. +3
    -0
      README.rst
  2. +9
    -3
      salt/control/virt.sls

+ 3
- 0
README.rst View File

mycluster: mycluster:
domain: neco.virt.domain.com domain: neco.virt.domain.com
engine: virt engine: virt
#Option to set rng globaly
rng: false
node: node:
ubuntu1: ubuntu1:
provider: node01.domain.com provider: node01.domain.com
image: ubuntu.qcow image: ubuntu.qcow
size: medium size: medium
img_dest: /var/lib/libvirt/ssdimages img_dest: /var/lib/libvirt/ssdimages
#Rng defined on node will have higher priority then global one
rng: rng:
backend: /dev/urandom backend: /dev/urandom
model: random model: random

+ 9
- 3
salt/control/virt.sls View File



{%- if cluster.engine == "virt" %} {%- if cluster.engine == "virt" %}


##Posibility to disable rng device globally for old libvirt version
{%- if cluster.rng is defined %}
{%- set rng = cluster.rng %}
{%- endif %}

{%- for node_name, node in cluster.node.iteritems() %} {%- for node_name, node in cluster.node.iteritems() %}


{%- if node.name is defined %} {%- if node.name is defined %}


{%- set size = control.size.get(node.size) %} {%- set size = control.size.get(node.size) %}



salt_control_virt_{{ cluster_name }}_{{ node_name }}: salt_control_virt_{{ cluster_name }}_{{ node_name }}:
module.run: module.run:
- name: virtng.init - name: virtng.init
- start: True - start: True
- disk: {{ size.disk_profile }} - disk: {{ size.disk_profile }}
- nic: {{ size.net_profile }} - nic: {{ size.net_profile }}
{%- if node.rng is defined %}
- rng: {{ node.rng }}
{%- if node.rng is defined %}
- rng: {{ node.rng }}
{%- elif rng is defined %}
- rng: {{ rng }}
{%- endif %} {%- endif %}
- kwargs: - kwargs:
seed: True seed: True

Loading…
Cancel
Save