aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/profile/base/sshd.pp
diff options
context:
space:
mode:
authorOliver Walsh <owalsh@redhat.com>2017-09-06 11:19:48 +0100
committerOliver Walsh <owalsh@redhat.com>2017-09-20 11:51:17 +0100
commit68c6f280b1ca77f9c01dac257e0a603f51809eb7 (patch)
treef802f15fb4404441b90e9c5002d4222971c416dd /manifests/profile/base/sshd.pp
parent4a16f486e0207e47883cbc4c89293d786b9aa230 (diff)
Support for Ocata-Pike live-migration over ssh
In Ocata all live-migration over ssh is performed on the default ssh port (22). In Pike the containerized live-migration over ssh is on port 2022 as the docker host's sshd is using port 22. To allow live migration during upgrade we need to temporarily pin the Pike computes to port 22 and in the final converge we can switch over to port 2022. This patch make the necessary puppet-tripleo change to allow this: - Adds support in sshd profile for listening on multiple ports. - Adds a profile to allow proxying to the containerized sshd from the baremetal sshd Change-Id: I0b80b81711f683be539939e7d084365ff63546d3 Related-bug: 1714171 (cherry picked from commit 05a413c34fa1266d38bf991a1f5ed2795631f0b7)
Diffstat (limited to 'manifests/profile/base/sshd.pp')
-rw-r--r--manifests/profile/base/sshd.pp17
1 files changed, 15 insertions, 2 deletions
diff --git a/manifests/profile/base/sshd.pp b/manifests/profile/base/sshd.pp
index 3f0245d..22520e9 100644
--- a/manifests/profile/base/sshd.pp
+++ b/manifests/profile/base/sshd.pp
@@ -31,11 +31,16 @@
# Hash of SSHD options to set. See the puppet-ssh module documentation for
# details.
# Defaults to {}
+#
+# [*port*]
+# SSH port or list of ports to bind to
+# Defaults to [22]
class tripleo::profile::base::sshd (
$bannertext = hiera('BannerText', undef),
$motd = hiera('MOTD', undef),
- $options = {}
+ $options = {},
+ $port = [22],
) {
if $bannertext and $bannertext != '' {
@@ -67,10 +72,18 @@ class tripleo::profile::base::sshd (
$sshd_options_motd = {}
}
+ if $options['Port'] {
+ $sshd_options_port = {'Port' => unique(concat(any2array($options['Port']), $port))}
+ }
+ else {
+ $sshd_options_port = {'Port' => unique(any2array($port))}
+ }
+
$sshd_options = merge(
$options,
$sshd_options_banner,
- $sshd_options_motd
+ $sshd_options_motd,
+ $sshd_options_port
)
# NB (owalsh) in puppet-ssh hiera takes precedence over the class param