Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos-caddy
Commits
9aba1e65
Commit
9aba1e65
authored
Nov 21, 2014
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
resilient stack/kvm: add ignore-known-hosts-file parameter.
parent
8bc96bdb
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
4 deletions
+18
-4
slapos/recipe/pbs.py
slapos/recipe/pbs.py
+4
-1
software/kvm/common.cfg
software/kvm/common.cfg
+1
-1
software/kvm/instance-kvm-resilient-input-schema.json
software/kvm/instance-kvm-resilient-input-schema.json
+6
-0
software/kvm/instance-kvm-resilient-test.cfg.jinja2
software/kvm/instance-kvm-resilient-test.cfg.jinja2
+1
-0
stack/resilient/buildout.cfg
stack/resilient/buildout.cfg
+2
-2
stack/resilient/instance-pull-backup.cfg.in
stack/resilient/instance-pull-backup.cfg.in
+2
-0
stack/resilient/template-replicated.cfg.in
stack/resilient/template-replicated.cfg.in
+2
-0
No files found.
slapos/recipe/pbs.py
View file @
9aba1e65
...
@@ -244,7 +244,10 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
...
@@ -244,7 +244,10 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
promise_dict
)
promise_dict
)
path_list
.
append
(
promise
)
path_list
.
append
(
promise
)
known_hosts_file
[
parsed_url
.
hostname
]
=
entry
[
'server-key'
]
# Create known_hosts file by default.
# In some case, we don't want to create it (case where we share IP mong partitions)
if
not
self
.
isTrueValue
(
self
.
options
.
get
(
'ignore-known-hosts-file'
)):
known_hosts_file
[
parsed_url
.
hostname
]
=
entry
[
'server-key'
]
notifier_wrapper_path
=
os
.
path
.
join
(
self
.
options
[
'wrappers-directory'
],
slave_id
)
notifier_wrapper_path
=
os
.
path
.
join
(
self
.
options
[
'wrappers-directory'
],
slave_id
)
rdiff_wrapper_path
=
notifier_wrapper_path
+
'_raw'
rdiff_wrapper_path
=
notifier_wrapper_path
+
'_raw'
...
...
software/kvm/common.cfg
View file @
9aba1e65
...
@@ -108,7 +108,7 @@ on-update = true
...
@@ -108,7 +108,7 @@ on-update = true
[template-kvm-resilient-test]
[template-kvm-resilient-test]
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm-resilient-test.cfg.jinja2
url = ${:_profile_base_location_}/instance-kvm-resilient-test.cfg.jinja2
#md5sum = 8b6bd057721a8e4d84c5cd62a97cffe6
md5sum = 166d08a8b7455180975a5a604a2bdeb2
mode = 0644
mode = 0644
download-only = true
download-only = true
on-update = true
on-update = true
...
...
software/kvm/instance-kvm-resilient-input-schema.json
View file @
9aba1e65
...
@@ -40,6 +40,12 @@
...
@@ -40,6 +40,12 @@
"description"
:
"Amount of backup(s) to create. Each backup consists of a Pull Backup Server and a clone."
,
"description"
:
"Amount of backup(s) to create. Each backup consists of a Pull Backup Server and a clone."
,
"type"
:
"integer"
,
"type"
:
"integer"
,
"default"
:
2
"default"
:
2
},
"ignore-known-hosts-file"
:
{
"title"
:
"Ignore known_hosts file"
,
"description"
:
"Set either to fill known_hosts file for ssh or not. Useful if main instance and PBS are using the same IP (slapos proxy, webrunner)."
,
"type"
:
"boolean"
,
"default"
:
false
}
}
}
}
}
}
...
...
software/kvm/instance-kvm-resilient-test.cfg.jinja2
View file @
9aba1e65
...
@@ -60,6 +60,7 @@ config-virtual-hard-drive-url = ${slap-parameter:virtual-hard-drive-url}
...
@@ -60,6 +60,7 @@ config-virtual-hard-drive-url = ${slap-parameter:virtual-hard-drive-url}
config-virtual-hard-drive-md5sum = ${slap-parameter:virtual-hard-drive-md5sum}
config-virtual-hard-drive-md5sum = ${slap-parameter:virtual-hard-drive-md5sum}
config-resiliency-backup-periodicity = */5 * * * *
config-resiliency-backup-periodicity = */5 * * * *
config-resilient-clone-number = 1
config-resilient-clone-number = 1
config-ignore-known-hosts-file = true
return = ipv6
return = ipv6
# XXX What to do?
# XXX What to do?
sla-computer_guid = ${slap-connection:computer-id}
sla-computer_guid = ${slap-connection:computer-id}
...
...
stack/resilient/buildout.cfg
View file @
9aba1e65
...
@@ -63,13 +63,13 @@ mode = 0644
...
@@ -63,13 +63,13 @@ mode = 0644
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-pull-backup.cfg.in
url = ${:_profile_base_location_}/instance-pull-backup.cfg.in
output = ${buildout:directory}/instance-pull-backup.cfg
output = ${buildout:directory}/instance-pull-backup.cfg
md5sum =
08b80d1b7beb1610077151904526a2e
c
md5sum =
3866b0d4d2872f693b7d9519a668e6b
c
mode = 0644
mode = 0644
[template-replicated]
[template-replicated]
recipe = slapos.recipe.download
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template-replicated.cfg.in
url = ${:_profile_base_location_}/template-replicated.cfg.in
md5sum =
a21d751078dbf1fc80ecb93a6f499287
md5sum =
c781ae17375c26b08b2a11bd9b800db8
mode = 0644
mode = 0644
destination = ${buildout:directory}/template-replicated.cfg.in
destination = ${buildout:directory}/template-replicated.cfg.in
...
...
stack/resilient/instance-pull-backup.cfg.in
View file @
9aba1e65
...
@@ -136,6 +136,7 @@ run-directory = $${basedirectory:run}
...
@@ -136,6 +136,7 @@ run-directory = $${basedirectory:run}
# XXX: this should be named "notifier-host"
# XXX: this should be named "notifier-host"
notifier-url = http://[$${notifier:host}]:$${notifier:port}
notifier-url = http://[$${notifier:host}]:$${notifier:port}
slave-instance-list = $${slap-parameter:slave_instance_list}
slave-instance-list = $${slap-parameter:slave_instance_list}
ignore-known-hosts-file = $${slap-parameter:ignore-known-hosts-file}
#----------------
#----------------
...
@@ -235,6 +236,7 @@ identity-file = $${basedirectory:ssh-home}/id_rsa
...
@@ -235,6 +236,7 @@ identity-file = $${basedirectory:ssh-home}/id_rsa
[slap-parameter]
[slap-parameter]
slave_instance_list = []
slave_instance_list = []
ignore-known-hosts-file = false
...
...
stack/resilient/template-replicated.cfg.in
View file @
9aba1e65
...
@@ -154,6 +154,7 @@ software-type = pull-backup
...
@@ -154,6 +154,7 @@ software-type = pull-backup
[request-pbs-{{namebase}}-{{id}}]
[request-pbs-{{namebase}}-{{id}}]
<= request-pbs-common
<= request-pbs-common
name = PBS ({{namebase}} / {{id}})
name = PBS ({{namebase}} / {{id}})
config-ignore-known-hosts-file = ${slap-parameter:ignore-known-hosts-file}
return = ssh-key notification-url feeds-url
return = ssh-key notification-url feeds-url
slave = false
slave = false
{% if sla_parameter_dict == {} -%}
{% if sla_parameter_dict == {} -%}
...
@@ -231,6 +232,7 @@ sla-instance_guid = ${request-pbs-{{namebase}}-{{id}}:instance_guid}
...
@@ -231,6 +232,7 @@ sla-instance_guid = ${request-pbs-{{namebase}}-{{id}}:instance_guid}
{{namebase}}{{id}}-computer-guid =
{{namebase}}{{id}}-computer-guid =
pbs-{{namebase}}{{id}}-computer-guid =
pbs-{{namebase}}{{id}}-computer-guid =
{% endfor %}
{% endfor %}
ignore-known-hosts-file = false
{% endmacro %}
{% endmacro %}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment