Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
106
Merge Requests
106
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
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
slapos/recipe/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