Commit 2a01586b authored by Rafael Monnerat's avatar Rafael Monnerat

kvm: introduce sticky-computer parameter

  Sticky computer on kvm cluster, will make the requester (root instance on this case), request
  the children on the same computer as itself.
parent 3c5b51c5
......@@ -35,7 +35,12 @@ config-use-ipv6 = {{ dumps(slapparameter_dict.get('use-ipv6', False)) }}
<= request-common
software-type = kvm
name = {{ instance_name }}
{% if kvm_parameter_dict.get('sticky-computer', '') -%}
sla-computer_guid = ${slap-connection:computer-id}
{% else -%}
sla-computer_guid = {{ dumps(kvm_parameter_dict.get('computer-guid', '')) }}
{% endif -%}
sla-network_guid = {{ dumps(kvm_parameter_dict.get('network-guid', '')) }}
sla-project_guid = {{ dumps(kvm_parameter_dict.get('project-guid', '')) }}
{% if kvm_parameter_dict.get('state', '') == 'stopped' -%}
......
......@@ -108,7 +108,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/instance-kvm-cluster.cfg.jinja2.in
mode = 644
md5sum = f1557302898102159441575e82a1da2c
md5sum = fa40e4729c27236c655f66966e43becf
download-only = true
on-update = true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment