Use one common part to request pbs

Current way was expecting return values that are not present in slaves
parent 6758aaf9
...@@ -37,11 +37,8 @@ parts = ...@@ -37,11 +37,8 @@ parts =
[request-pull-backup-server] [request-pull-backup-server]
<= slap-connection <= request-pbs-common
recipe = slapos.cookbook:request
name = PBS (Pull Backup Server) name = PBS (Pull Backup Server)
software-url = ${slap-connection:software-release-url}
software-type = pull-backup
return = ssh-key notification-url feeds-url return = ssh-key notification-url feeds-url
slave = false slave = false
...@@ -113,11 +110,8 @@ config-authorized-key = ${request-pull-backup-server:connection-ssh-key} ...@@ -113,11 +110,8 @@ config-authorized-key = ${request-pull-backup-server:connection-ssh-key}
config-proxy-url = ${publish-connection-informations:url} config-proxy-url = ${publish-connection-informations:url}
[request-pull-backup-server-apache-1] [request-pull-backup-server-apache-1]
<= request-pull-backup-server <= request-pbs-common
slap-connection
recipe = slapos.cookbook:request
name = PBS pulling from Apache 1 name = PBS pulling from Apache 1
software-url = ${slap-connection:software-release-url}
config = url name type server-key notify notification-id frequency config = url name type server-key notify notification-id frequency
config-url = ssh://nobody@[${dropbear-server:host}]:${dropbear-server:port}/${rdiff-backup-server:path} config-url = ssh://nobody@[${dropbear-server:host}]:${dropbear-server:port}/${rdiff-backup-server:path}
config-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-apache config-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-apache
...@@ -129,11 +123,8 @@ config-frequency = 30 * * * * ...@@ -129,11 +123,8 @@ config-frequency = 30 * * * *
slave = true slave = true
[request-pull-backup-server-apache-2] [request-pull-backup-server-apache-2]
<= request-pull-backup-server <= request-pbs-common
slap-connection
recipe = slapos.cookbook:request
name = PBS pulling from Apache 2 name = PBS pulling from Apache 2
software-url = ${slap-connection:software-release-url}
config = url name type server-key notify notification-id frequency config = url name type server-key notify notification-id frequency
config-url = ssh://nobody@[${dropbear-server:host}]:${dropbear-server:port}/${rdiff-backup-server:path} config-url = ssh://nobody@[${dropbear-server:host}]:${dropbear-server:port}/${rdiff-backup-server:path}
config-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-apache config-name = ${slap-connection:computer-id}-${slap-connection:partition-id}-apache
...@@ -146,11 +137,8 @@ slave = true ...@@ -146,11 +137,8 @@ slave = true
[request-pull-backup-server-apache-backup-1] [request-pull-backup-server-apache-backup-1]
<= request-pull-backup-server <= request-pbs-common
slap-connection
recipe = slapos.cookbook:request
name = PBS pushing to ${request-apache-backup-1:name} name = PBS pushing to ${request-apache-backup-1:name}
software-url = ${slap-connection:software-release-url}
config = url name type server-key on-notification config = url name type server-key on-notification
config-url = ${request-apache-backup-1:connection-ssh-url} config-url = ${request-apache-backup-1:connection-ssh-url}
config-name = ${request-pull-backup-server-apache-1:config-name} config-name = ${request-pull-backup-server-apache-1:config-name}
...@@ -160,11 +148,8 @@ config-on-notification = ${request-pull-backup-server:connection-feeds-url}${req ...@@ -160,11 +148,8 @@ config-on-notification = ${request-pull-backup-server:connection-feeds-url}${req
slave = true slave = true
[request-pull-backup-server-apache-backup-2] [request-pull-backup-server-apache-backup-2]
<= request-pull-backup-server <= request-pbs-common
slap-connection
recipe = slapos.cookbook:request
name = PBS pushing to ${request-apache-backup-2:name} name = PBS pushing to ${request-apache-backup-2:name}
software-url = ${slap-connection:software-release-url}
config = url name type server-key on-notification config = url name type server-key on-notification
config-url = ${request-apache-backup-2:connection-ssh-url} config-url = ${request-apache-backup-2:connection-ssh-url}
config-name = ${request-pull-backup-server-apache-2:config-name} config-name = ${request-pull-backup-server-apache-2:config-name}
......
...@@ -108,20 +108,22 @@ config-number = {{id}} ...@@ -108,20 +108,22 @@ config-number = {{id}}
## WARNING : SLAVES ARE ALLOCATED AT RANDOM, THIS NEEDS TO BE FIXED. ## WARNING : SLAVES ARE ALLOCATED AT RANDOM, THIS NEEDS TO BE FIXED.
{% for id in range(1,nbbackup|int) %} [request-pbs-common]
[request-pbs-{{namebase}}-{{id}}]
<= slap-connection <= slap-connection
recipe = slapos.cookbook:request recipe = slapos.cookbook:request
name = PBS ({{namebase}} / {{id}})
software-url = ${slap-connection:software-release-url} software-url = ${slap-connection:software-release-url}
software-type = pull-backup software-type = pull-backup
{% for id in range(1,nbbackup|int) %}
[request-pbs-{{namebase}}-{{id}}]
<= request-pbs-common
name = PBS ({{namebase}} / {{id}})
return = ssh-key notification-url feeds-url return = ssh-key notification-url feeds-url
slave = false slave = false
[request-pull-backup-server-{{namebase}}-{{id}}] [request-pull-backup-server-{{namebase}}-{{id}}]
<= request-pbs-{{namebase}}-{{id}} <= request-pbs-common
slap-connection
name = PBS {{id}} pulling from ${request-{{namebase}}:name} name = PBS {{id}} pulling from ${request-{{namebase}}:name}
config = url name type server-key on-notification notify notification-id title config = url name type server-key on-notification notify notification-id title
config-url = ${request-{{namebase}}:connection-ssh-url} config-url = ${request-{{namebase}}:connection-ssh-url}
...@@ -135,8 +137,7 @@ config-title = Pulling from {{namebase}} ...@@ -135,8 +137,7 @@ config-title = Pulling from {{namebase}}
slave = true slave = true
[request-pull-backup-server-{{namebase}}-backup-{{id}}] [request-pull-backup-server-{{namebase}}-backup-{{id}}]
<= request-pbs-{{namebase}}-{{id}} <= request-pbs-common
slap-connection
name = PBS pushing on ${request-{{namebase}}-pseudo-replicating-{{id}}:name} name = PBS pushing on ${request-{{namebase}}-pseudo-replicating-{{id}}:name}
config = url name type server-key on-notification notify notification-id title config = url name type server-key on-notification notify notification-id title
config-url = ${request-{{namebase}}-pseudo-replicating-{{id}}:connection-ssh-url} config-url = ${request-{{namebase}}-pseudo-replicating-{{id}}:connection-ssh-url}
......
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