Commit d86914d9 authored by Rafael Monnerat's avatar Rafael Monnerat

kvm: Monitor is not optional for resilient kvm

  This fixes bugs on the order of parts and duplicated sections introduced on:
    8d28b7e0
    d3df3b6e
parent f7561e36
...@@ -92,7 +92,7 @@ command = ...@@ -92,7 +92,7 @@ command =
[template] [template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg.in url = ${:_profile_base_location_}/instance.cfg.in
md5sum = 3544e25820d1511d153944fc36579986 md5sum = 733ee7530831229aeee0aeb3460ab2ee
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
...@@ -136,7 +136,7 @@ on-update = true ...@@ -136,7 +136,7 @@ on-update = true
recipe = hexagonit.recipe.download recipe = hexagonit.recipe.download
ignore-existing = true ignore-existing = true
url = ${:_profile_base_location_}/instance-kvm-import.cfg.jinja2.in url = ${:_profile_base_location_}/instance-kvm-import.cfg.jinja2.in
md5sum = d5d3b7debf3141913eac926830ea166d md5sum = 5e21ad759c148d26134ecefbb4d3d9f1
mode = 0644 mode = 0644
download-only = true download-only = true
on-update = true on-update = true
...@@ -155,7 +155,7 @@ recipe = hexagonit.recipe.download ...@@ -155,7 +155,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true ignore-existing = true
url = ${:_profile_base_location_}/instance-kvm-export.cfg.jinja2 url = ${:_profile_base_location_}/instance-kvm-export.cfg.jinja2
mode = 644 mode = 644
md5sum = 13276ead8cf5f9eda28e8dbda35a9bcf md5sum = c2ab8a5ff9d8cd351682382ea06b3328
download-only = true download-only = true
on-update = true on-update = true
......
{% set monitor = str(slapparameter_dict.get('enable-monitor', False)).lower() == 'true' -%}
[buildout] [buildout]
extends = extends =
{{ kvm_template }} {{ kvm_template }}
...@@ -17,10 +14,8 @@ parts += ...@@ -17,10 +14,8 @@ parts +=
novnc-promise novnc-promise
cron cron
frontend-promise frontend-promise
{% if monitor -%}
# monitor parts # monitor parts
monitor-base monitor-base
{% endif %}
# Create the exporter executable, which is a simple shell script # Create the exporter executable, which is a simple shell script
[exporter] [exporter]
......
...@@ -8,8 +8,6 @@ offline = true ...@@ -8,8 +8,6 @@ offline = true
# even extend the kvm instance profile. # even extend the kvm instance profile.
extends = extends =
{{ pbsready_import_template }} {{ pbsready_import_template }}
{% if str(slapparameter_dict.get('enable-monitor', True)).lower() == 'true' -%}
{{ ' ' ~ template_monitor }}
[resilient-publish-connection-parameter] [resilient-publish-connection-parameter]
monitor-base-url = ${publish:monitor-base-url} monitor-base-url = ${publish:monitor-base-url}
...@@ -30,7 +28,6 @@ password = {{ slapparameter_dict['monitor-password'] }} ...@@ -30,7 +28,6 @@ password = {{ slapparameter_dict['monitor-password'] }}
instance-configuration = instance-configuration =
raw takeover-url ${resilient-publish-connection-parameter:takeover-url} raw takeover-url ${resilient-publish-connection-parameter:takeover-url}
raw takeover-password ${resilient-publish-connection-parameter:takeover-password} raw takeover-password ${resilient-publish-connection-parameter:takeover-password}
{% endif -%}
[directory] [directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
......
...@@ -154,7 +154,6 @@ context = ...@@ -154,7 +154,6 @@ context =
key eggs_directory buildout:eggs-directory key eggs_directory buildout:eggs-directory
raw template_kvm_import ${template-kvm-import-script:location}/${template-kvm-import-script:filename} raw template_kvm_import ${template-kvm-import-script:location}/${template-kvm-import-script:filename}
raw pbsready_import_template ${pbsready-import:output} raw pbsready_import_template ${pbsready-import:output}
raw template_monitor ${monitor2-template:rendered}
key slapparameter_dict slap-configuration:configuration key slapparameter_dict slap-configuration:configuration
raw zcat_binary ${gzip:location}/bin/zcat raw zcat_binary ${gzip:location}/bin/zcat
raw gzip_binary ${gzip:location}/bin/gzip raw gzip_binary ${gzip:location}/bin/gzip
......
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