浏览代码

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

正在加载...
取消
保存