Commit d6615b72 authored by Nicolas Wavrant's avatar Nicolas Wavrant

resilient: add prefix to a published parameter

In 95c05120, a published parameter "ssh-url" was added
to the webrunner, clashing with the existing "ssh-url" parameter used by the resilient
stack (which is extended by webrunner).
As the new "ssh-url" is public and read by customers, it doesn't make sense to rename
it to something more slaprunner-ished, more especially it already existis "ssh-command",
so if a second parameter was named "runner-ssh-url" it wouldn't make sense to the user...

This change had to be propagated to all the software releases extending the resilient stack.

Finally, I think that stacks should use namespaces to avoid conflicts with the software
releases extending them. Currently, we are doing the opposite and are using namespaces
for software release to avoid conflicting with their stack : for exemple, in stack/resilient
we have a section [sshd-raw-server] and in the software/slaprunner we have [runner-sshd-raw-server].
This situation will create clashes when one software release extends 2 stacks, as nothing
guarantees that 2 stacks have no conflicting section name, config file path, ...
parent c9b291ba
Pipeline #6573 failed with stage
in 0 seconds
...@@ -27,7 +27,7 @@ md5sum = 352f18067714501c8ccee55f8930d245 ...@@ -27,7 +27,7 @@ md5sum = 352f18067714501c8ccee55f8930d245
[template-kvm-resilient] [template-kvm-resilient]
filename = instance-kvm-resilient.cfg.jinja2 filename = instance-kvm-resilient.cfg.jinja2
md5sum = 6677ac6074f6be671fe8e8b8a6a4afe8 md5sum = 7d4b14660b7a30084aa7e023b0db50be
[template-kvm-import] [template-kvm-import]
filename = instance-kvm-import.cfg.jinja2.in filename = instance-kvm-import.cfg.jinja2.in
......
...@@ -64,7 +64,7 @@ promises = ${:etc}/promise ...@@ -64,7 +64,7 @@ promises = ${:etc}/promise
# Note: += doesn't work. # Note: += doesn't work.
return = return =
# Resilient related parameters # Resilient related parameters
url ssh-public-key ssh-url notification-id ip {{ monitor_return | join(' ') }} url ssh-public-key resilient-ssh-url notification-id ip {{ monitor_return | join(' ') }}
# KVM related parameters # KVM related parameters
# XXX: return ALL parameters (like nat rules), through jinja # XXX: return ALL parameters (like nat rules), through jinja
backend-url url ip backend-url url ip
......
...@@ -34,7 +34,7 @@ md5sum = b992bb3391de9d6d422bfa8011d8ffc4 ...@@ -34,7 +34,7 @@ md5sum = b992bb3391de9d6d422bfa8011d8ffc4
[template-resilient] [template-resilient]
filename = instance-resilient.cfg.jinja2 filename = instance-resilient.cfg.jinja2
md5sum = bed1c457aa9e54a59b64d167bdafe970 md5sum = 0f3d75ca834839c5ae04e9c26cca289a
[template_nginx_conf] [template_nginx_conf]
filename = nginx_conf.in filename = nginx_conf.in
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
{% set number_of_instances = 2 %} {% set number_of_instances = 2 %}
{% endif %} {% endif %}
{% set slaprunner_return = ['init-user', 'init-password', 'url', 'ssh-public-key', 'ssh-url', 'notification-id', 'ip', 'backend-url', 'url', 'ssh-command', 'webdav-url', 'public-url', 'git-public-url', 'git-private-url'] -%} {% set slaprunner_return = ['init-user', 'init-password', 'url', 'ssh-public-key', 'resilient-ssh-url', 'notification-id', 'ip', 'backend-url', 'url', 'ssh-url', 'ssh-command', 'webdav-url', 'public-url', 'git-public-url', 'git-private-url'] -%}
{% set monitor_return = ['monitor-base-url', 'monitor-url', 'monitor-user', 'monitor-password'] -%} {% set monitor_return = ['monitor-base-url', 'monitor-url', 'monitor-user', 'monitor-password'] -%}
{% set monitor_parameter = {'monitor-cors-domains': slapparameter_dict.pop('monitor-cors-domains', "monitor.app.officejs.com")} -%} {% set monitor_parameter = {'monitor-cors-domains': slapparameter_dict.pop('monitor-cors-domains', "monitor.app.officejs.com")} -%}
{% set monitor_dict = {'parameter': monitor_parameter, 'return': monitor_return, 'set-monitor-url': True} -%} {% set monitor_dict = {'parameter': monitor_parameter, 'return': monitor_return, 'set-monitor-url': True} -%}
......
...@@ -55,4 +55,4 @@ path = ${directory:www} ...@@ -55,4 +55,4 @@ path = ${directory:www}
# XXX-Cedric: change the request method to return everything from # XXX-Cedric: change the request method to return everything from
# getConnectionParameterDict() # getConnectionParameterDict()
[request-postgres] [request-postgres]
return = ssh-public-key ssh-url notification-id ip url return = ssh-public-key resilient-ssh-url notification-id ip url
...@@ -86,7 +86,7 @@ context = key templateapache instance-apache-php:output ...@@ -86,7 +86,7 @@ context = key templateapache instance-apache-php:output
import-list = file parts template-parts:destination import-list = file parts template-parts:destination
file replicated template-replicated:destination file replicated template-replicated:destination
md5sum = dca811871e293cf3ce1bfc52dd8dab64 md5sum = e679cbe62f17bb320a22444425e1401a
mode = 0644 mode = 0644
[instance-resilient] [instance-resilient]
...@@ -102,7 +102,7 @@ context = key buildout buildout:bin-directory ...@@ -102,7 +102,7 @@ context = key buildout buildout:bin-directory
import-list = file parts template-parts:destination import-list = file parts template-parts:destination
file replicated template-replicated:destination file replicated template-replicated:destination
md5sum = e8fd20a32c87853ecba2846f50cd0898 md5sum = 20b4f2d8125a4f9cab5b9145be6b47b5
mode = 0644 mode = 0644
[instance-postgres] [instance-postgres]
......
...@@ -17,7 +17,7 @@ parts += ...@@ -17,7 +17,7 @@ parts +=
# Bubble up the parameters # Bubble up the parameters
[request-apache] [request-apache]
return = url ssh-public-key ssh-url notification-id ip url backend_url return = url ssh-public-key resilient-ssh-url notification-id ip url backend_url
# XXX: hardcoded values # XXX: hardcoded values
config-postgres1-computer-guid = ${slap-parameter:postgres1-computer-guid} config-postgres1-computer-guid = ${slap-parameter:postgres1-computer-guid}
config-pbs-postgres1-computer-guid = ${slap-parameter:pbs-postgres1-computer-guid} config-pbs-postgres1-computer-guid = ${slap-parameter:pbs-postgres1-computer-guid}
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[pbsready] [pbsready]
filename = pbsready.cfg.in filename = pbsready.cfg.in
md5sum = 516482f89d7a3ebe4458a404eb4a575b md5sum = f3bf5e1d8bbfbb428c5bbe3a57d8cbe5
[pbsready-import] [pbsready-import]
filename = pbsready-import.cfg.in filename = pbsready-import.cfg.in
...@@ -30,7 +30,7 @@ md5sum = 57b9b421d233402e6d5177c69cf9567e ...@@ -30,7 +30,7 @@ md5sum = 57b9b421d233402e6d5177c69cf9567e
[template-replicated] [template-replicated]
filename = template-replicated.cfg.in filename = template-replicated.cfg.in
md5sum = 5369b039600e1df8b471ac4b41d5de60 md5sum = dba869ed13e001f2188c466673df4bbf
[template-parts] [template-parts]
filename = template-parts.cfg.in filename = template-parts.cfg.in
......
...@@ -273,5 +273,5 @@ recipe = slapos.cookbook:userinfo ...@@ -273,5 +273,5 @@ recipe = slapos.cookbook:userinfo
[resilient-publish-connection-parameter] [resilient-publish-connection-parameter]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
ssh-public-key = $${sshkeys-sshd:public-key-value} ssh-public-key = $${sshkeys-sshd:public-key-value}
ssh-url = ssh://$${user-info:pw-name}@[$${sshd-raw-server:host}]:$${sshd-port:port}/$${rdiff-backup-server:path} resilient-ssh-url = ssh://$${user-info:pw-name}@[$${sshd-raw-server:host}]:$${sshd-port:port}/$${rdiff-backup-server:path}
ip = $${slap-network-information:global-ipv6} ip = $${slap-network-information:global-ipv6}
...@@ -33,7 +33,7 @@ software-url = ${slap-connection:software-release-url} ...@@ -33,7 +33,7 @@ software-url = ${slap-connection:software-release-url}
{{heriteLeader}} {{heriteLeader}}
software-type = {{typeexport}} software-type = {{typeexport}}
name = {{namebase}}0 name = {{namebase}}0
return = ssh-public-key ssh-url notification-id ip {{ monitor_return }} return = ssh-public-key resilient-ssh-url notification-id ip {{ monitor_return }}
config-number = 0 config-number = 0
config-authorized-key = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}}-{{id}}:connection-ssh-key}{% endfor %} config-authorized-key = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}}-{{id}}:connection-ssh-key}{% endfor %}
...@@ -87,7 +87,7 @@ name = {{namebase}}{{id}} ...@@ -87,7 +87,7 @@ name = {{namebase}}{{id}}
software-url = ${slap-connection:software-release-url} software-url = ${slap-connection:software-release-url}
software-type = {{typeimport}} software-type = {{typeimport}}
return = ssh-public-key ssh-url notification-url ip takeover-url takeover-password {{ monitor_return }} return = ssh-public-key resilient-ssh-url notification-url ip takeover-url takeover-password {{ monitor_return }}
pbs-notification-id = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-{{id}}-push pbs-notification-id = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-{{id}}-push
...@@ -229,7 +229,7 @@ mode = 700 ...@@ -229,7 +229,7 @@ mode = 700
[request-pull-backup-server-{{namebase}}-{{id}}] [request-pull-backup-server-{{namebase}}-{{id}}]
<= request-pbs-common <= request-pbs-common
name = PBS {{id}} pulling from ${request-{{namebase}}:name} name = PBS {{id}} pulling from ${request-{{namebase}}:name}
config-url = ${request-{{namebase}}:connection-ssh-url} config-url = ${request-{{namebase}}:connection-resilient-ssh-url}
config-type = pull config-type = pull
config-server-key = ${request-{{namebase}}:connection-ssh-public-key} config-server-key = ${request-{{namebase}}:connection-ssh-public-key}
config-on-notification = ${request-{{namebase}}:connection-notification-id} config-on-notification = ${request-{{namebase}}:connection-notification-id}
...@@ -259,7 +259,7 @@ monitor-url-list = {{ monitor_url_list | join(' ') }} ...@@ -259,7 +259,7 @@ monitor-url-list = {{ monitor_url_list | join(' ') }}
[request-pull-backup-server-{{namebase}}-backup-{{id}}] [request-pull-backup-server-{{namebase}}-backup-{{id}}]
<= request-pbs-common <= request-pbs-common
name = PBS pushing on ${request-{{namebase}}-pseudo-replicating-{{id}}:name} name = PBS pushing on ${request-{{namebase}}-pseudo-replicating-{{id}}:name}
config-url = ${request-{{namebase}}-pseudo-replicating-{{id}}:connection-ssh-url} config-url = ${request-{{namebase}}-pseudo-replicating-{{id}}:connection-resilient-ssh-url}
config-type = push config-type = push
config-server-key = ${request-{{namebase}}-pseudo-replicating-{{id}}:connection-ssh-public-key} config-server-key = ${request-{{namebase}}-pseudo-replicating-{{id}}:connection-ssh-public-key}
config-on-notification = ${request-pbs-{{namebase}}-{{id}}:connection-feeds-url}${request-pull-backup-server-{{namebase}}-{{id}}:config-notification-id} config-on-notification = ${request-pbs-{{namebase}}-{{id}}:connection-feeds-url}${request-pull-backup-server-{{namebase}}-{{id}}:config-notification-id}
......
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