Browse Source

Merge "ensure that libvirt is running before creation of VM"

pull/73/head
Richard Felkl 6 years ago
parent
commit
84158fe1e5
2 changed files with 12 additions and 0 deletions
  1. +10
    -0
      salt/control/virt.sls
  2. +2
    -0
      salt/map.jinja

+ 10
- 0
salt/control/virt.sls View File



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


libvirt_service:
service.running:
- name: {{ control.virt_service }}
- enable: true
{%- if grains.get('noservices') %}
- onlyif: /bin/false
{%- endif %}

##Posibility to disable rng device globally for old libvirt version ##Posibility to disable rng device globally for old libvirt version
{%- if cluster.rng is defined %} {%- if cluster.rng is defined %}
{%- set rng = cluster.rng %} {%- set rng = cluster.rng %}
{%- endfor %} {%- endfor %}
{%- endif %} {%- endif %}
- unless: virsh list --all --name| grep -E "^{{ node_name }}.{{ cluster.domain }}$" - unless: virsh list --all --name| grep -E "^{{ node_name }}.{{ cluster.domain }}$"
- require:
- libvirt_service


#salt_control_seed_{{ cluster_name }}_{{ node_name }}: #salt_control_seed_{{ cluster_name }}_{{ node_name }}:
# module.run: # module.run:

+ 2
- 0
salt/map.jinja View File

{% if grains.get('oscodename') == 'trusty' %} {% if grains.get('oscodename') == 'trusty' %}
- libguestfs-tools - libguestfs-tools
{% endif %} {% endif %}
virt_service: 'libvirt-bin'


RedHat: RedHat:
virt_pkgs: virt_pkgs:
- libvirt-dev - libvirt-dev
- pkg-config - pkg-config
virt_service: 'libvirtd'
{%- endload %} {%- endload %}


{%- load_yaml as renderer_defaults %} {%- load_yaml as renderer_defaults %}

Loading…
Cancel
Save