Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
73
Merge Requests
73
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
ea41a867
Commit
ea41a867
authored
Sep 13, 2016
by
Nicolas Wavrant
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pbs: adds migration code for management of known_host file
parent
f6501731
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
pbs.py
slapos/recipe/pbs.py
+4
-0
No files found.
slapos/recipe/pbs.py
View file @
ea41a867
...
...
@@ -254,6 +254,10 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
# 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'
)):
# Migration code: if known_hosts file contains entry with just IP, then it
# is updated to use [IP]:port. It allows to share same IP among partitions
if
parsed_url
.
hostname
in
known_hosts_file
:
del
known_hosts_file
[
parsed_url
.
hostname
]
known_hostname
=
"[
%
s]:
%
s"
%
(
parsed_url
.
hostname
,
parsed_url
.
port
)
known_hosts_file
[
known_hostname
]
=
entry
[
'server-key'
]
.
strip
()
...
...
Nicolas Wavrant
@Nicolas
mentioned in merge request
!1206 (merged)
·
Jul 07, 2022
mentioned in merge request
!1206 (merged)
mentioned in merge request !1206
Toggle commit list
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