Преглед на файлове

add option to globally disable rng device

related to bug: PROD-20139

Change-Id: I32fee91f22e0963ec60de63b4c6e020df92f9f3b
pull/73/head
Ondrej Smola преди 6 години
родител
ревизия
c7f6cfcb4f
променени са 2 файла, в които са добавени 12 реда и са изтрити 3 реда
  1. +3
    -0
      README.rst
  2. +9
    -3
      salt/control/virt.sls

+ 3
- 0
README.rst Целия файл

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

+ 9
- 3
salt/control/virt.sls Целия файл

@@ -20,6 +20,11 @@ update-guestfs-appliance:

{%- 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() %}

{%- if node.name is defined %}
@@ -30,7 +35,6 @@ update-guestfs-appliance:

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


salt_control_virt_{{ cluster_name }}_{{ node_name }}:
module.run:
- name: virtng.init
@@ -41,8 +45,10 @@ salt_control_virt_{{ cluster_name }}_{{ node_name }}:
- start: True
- disk: {{ size.disk_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 %}
- kwargs:
seed: True

Loading…
Отказ
Запис